Show / Hide Table of Contents

Class OctantF<P>

Single-precision Octant implementation.

Inheritance
System.Object
OctantF<P>
Implements
IOctant<float3, System.Single, P>
IBucket<float3, System.Single>
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 OctantF<P> : IOctant<float3, float, P>, IBucket<float3, float>
Type Parameters
Name Description
P

The type of the octants payload.

Constructors

OctantF()

Creates a new instance of type PtOctant.

Declaration
protected OctantF()

OctantF(float3, Single, IOctant<float3, Single, P>[])

Creates a new instance of type PtOctant.

Declaration
public OctantF(float3 center, float size, IOctant<float3, float, P>[] children = null)
Parameters
Type Name Description
float3 center

The center point of this octant, Center.

System.Single size

The size of this octant, Size.

IOctant<float3, System.Single, 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 float3 Center { get; set; }
Property Value
Type Description
float3

Children

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

Declaration
public IOctant<float3, float, P>[] Children { get; set; }
Property Value
Type Description
IOctant<float3, System.Single, P>[]

Guid

The globally unique identifier for this octant.

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

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; set; }
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; set; }
Property Value
Type Description
System.Int32

Size

Length, width and height of this Octant.

Declaration
public float Size { get; set; }
Property Value
Type Description
System.Single

Methods

CalcChildCenterAtPos(Int32)

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

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

The position in the parent octant.

Returns
Type Description
float3

CalcChildCenterAtPos(Int32, Single, float3)

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

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

The position in the parent octant.

System.Single parentSize

The size of the parent octant.

float3 parentCenter

The center of the parent octant.

Returns
Type Description
float3

CreateChild(Int32)

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

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

The position in the parent octant.

Returns
Type Description
IOctant<float3, System.Single, P>

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(PlaneF)

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

Declaration
public bool InsideOrIntersectingPlane(PlaneF plane)
Parameters
Type Name Description
PlaneF 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