Show / Hide Table of Contents

Class OctantD<P>

Double-precision Octant implementation.

Inheritance
System.Object
OctantD<P>
Implements
IOctant<double3, System.Double, P>
IBucket<double3, System.Double>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Fusee.Structures
Assembly: Fusee.Structures.dll
Syntax
public class OctantD<P> : IOctant<double3, double, P>, IBucket<double3, double>
Type Parameters
Name Description
P

The type of the octants payload.

Constructors

OctantD()

Creates a new instance of type PtOctant.

Declaration
protected OctantD()

OctantD(double3, Double, String, IOctant<double3, Double, P>[])

Creates a new instance of type PtOctant.

Declaration
public OctantD(double3 center, double size, string guid, IOctant<double3, double, P>[] children = null)
Parameters
Type Name Description
double3 center

The center point of this octant, Center.

System.Double size

The size of this octant, Size.

System.String guid
IOctant<double3, System.Double, P>[] children

The children of this octant - can be null.

Fields

Resolution

The Resolution of an Octant is defined by the minimum distance (spacing) between points. If the minimum distance between a point and its nearest neighbor is smaller then this distance, it will fall into a child octant.

Declaration
public double Resolution
Field Value
Type Description
System.Double

Properties

Center

Center of this Bucket in world space coordinates.

Declaration
public double3 Center { get; set; }
Property Value
Type Description
double3

Children

Children of this Octant. Must contain eight or null (leaf node) children.

Declaration
public IOctant<double3, double, P>[] Children { get; set; }
Property Value
Type Description
IOctant<double3, System.Double, P>[]

Guid

The globally unique identifier for this octant.

Declaration
public string Guid { get; set; }
Property Value
Type Description
System.String

IsLeaf

Is this octant a leaf node in the octree?

Declaration
public bool IsLeaf { get; set; }
Property Value
Type Description
System.Boolean

Level

The level of the octree this octant belongs to.

Declaration
public int Level { get; }
Property Value
Type Description
System.Int32

Payload

The payload of this octant.

Declaration
public List<P> Payload { get; set; }
Property Value
Type Description
System.Collections.Generic.List<P>

PosInParent

Integer that defines this octants position in its parent.

Declaration
public int PosInParent { get; }
Property Value
Type Description
System.Int32

Size

Length, width and height of this Octant.

Declaration
public double Size { get; set; }
Property Value
Type Description
System.Double

Methods

CalcChildCenterAtPos(Int32)

Returns the center of the child octant at the given position of the parent octant.

Declaration
protected double3 CalcChildCenterAtPos(int posInParent)
Parameters
Type Name Description
System.Int32 posInParent

The position in the parent octant.

Returns
Type Description
double3

CalcChildCenterAtPos(Int32, Double, double3)

Returns the center of the child octant at the given position of the parent octant from the parents center and size.

Declaration
public static double3 CalcChildCenterAtPos(int posInParent, double parentSize, double3 parentCenter)
Parameters
Type Name Description
System.Int32 posInParent

The position in the parent octant.

System.Double parentSize

The size of the parent octant.

double3 parentCenter

The center of the parent octant.

Returns
Type Description
double3

CreateChild(Int32)

Creates a child octant at the given position in its parent octant.

Declaration
public virtual IOctant<double3, double, P> CreateChild(int posInParent)
Parameters
Type Name Description
System.Int32 posInParent

The position in the parent octant.

Returns
Type Description
IOctant<double3, System.Double, P>

InsideOrIntersectingFrustum(FrustumD)

Checks if a viewing frustum lies within or intersects this Octant.

Declaration
public bool InsideOrIntersectingFrustum(FrustumD frustum)
Parameters
Type Name Description
FrustumD frustum

The frustum to test against.

Returns
Type Description
System.Boolean

false if fully outside, true if inside or intersecting.

InsideOrIntersectingFrustum(FrustumF)

Checks if this Octant lies within or intersects a Frustum. Returns true if one of the Frustum planes is intersecting this octant.

Declaration
public bool InsideOrIntersectingFrustum(FrustumF frustum)
Parameters
Type Name Description
FrustumF frustum

The frustum to test against.

Returns
Type Description
System.Boolean

false if fully outside, true if inside or intersecting.

InsideOrIntersectingFrustumFast(FrustumF)

Checks if this Octant lies within or intersects a Frustum. Assumes that we do not need to process this octant if the near plane is completely inside it.

Declaration
public bool InsideOrIntersectingFrustumFast(FrustumF frustum)
Parameters
Type Name Description
FrustumF frustum

The frustum to test against.

Returns
Type Description
System.Boolean

false if fully outside, true if inside or intersecting.

InsideOrIntersectingPlane(PlaneD)

Checks if a viewing frustum lies within or intersects this Octant.

Declaration
public bool InsideOrIntersectingPlane(PlaneD plane)
Parameters
Type Name Description
PlaneD plane

The plane to test against.

Returns
Type Description
System.Boolean

false if fully outside, true if inside or intersecting.

Implements

IOctant<T, K, P>
IBucket<T, K>
Generated by DocFX
GitHub Repo
Back to top