C# Class datastructures.BFSOctree

Represents a compressed octree. The nodes are stored sequentially in memory as if they were traversed via BFS. Empty nodes are omitted completely. A node consists of two parts: "Positional data" and "visual data". The positional data determiens the octree hierarchy whereas the visual data is used for rendering. The positional data consits of a "child mask" (one byte in which every bit represents a child of the current node) and a "child pointer" that stores the index of the first child node within the BFSOctree. Thus the mask allows to compute the child count of the current node as well as the children's positions. node: (mask|child-ptr) index: 0 1 2 3 ... root node first child second child first child's first child ... (1001000|1) (00111011|3) (00010000|8) (00110100|36) ... See also DynamicOctree for more infos on the general octree structure used in this lib.
Afficher le fichier Open project: denniskb/asvo_cuda

Méthodes publiques

Свойство Type Description
_animation ].Matrix[
_innerNodes datastructures.BFSInnerNode[]
_leaves datastructures.BFSLeaf[]
boneCount uint
dimension float
frameCount uint

Méthodes publiques

Méthode Description
BFSOctree ( DynamicOctree octree )

Creates a new BFSOctree out of a DynamicOctree.

export ( string path ) : void

Exports this BFSOctree into a binary file format. Output-format: bytes: type/format: interpretation: ======================================================= 4 IEEE 32bit float dimension of the octree (which is a cube). 4 uint32 inner node count. 4 uint32 leaf node count. #inner-nodes * BFSInnerNode the inner nodes of the octree. sizeof(inner-node) #leaves * BFSLeaf the leaf nodes of the octree. sizeof(leaf-node) 4 uint32 frame count of the animation. 4 uint32 bone count of the octree. #frames * Matrix transformation matrices for every frame. #bones See also VisualData.export, BFSInnerNode.export and BFSLeaf.export for how the composed data types are being exported.

getChildCount ( byte mask ) : byte

Computes the child count from a given child mask.

Private Methods

Méthode Description
convert ( DynamicOctreeNode node ) : void

Converts a DynamicOctree into this BFSOctree.

Method Details

BFSOctree() public méthode

Creates a new BFSOctree out of a DynamicOctree.
public BFSOctree ( DynamicOctree octree )
octree DynamicOctree The DynamicOctree to create this BFSOctree out of.

export() public méthode

Exports this BFSOctree into a binary file format. Output-format: bytes: type/format: interpretation: ======================================================= 4 IEEE 32bit float dimension of the octree (which is a cube). 4 uint32 inner node count. 4 uint32 leaf node count. #inner-nodes * BFSInnerNode the inner nodes of the octree. sizeof(inner-node) #leaves * BFSLeaf the leaf nodes of the octree. sizeof(leaf-node) 4 uint32 frame count of the animation. 4 uint32 bone count of the octree. #frames * Matrix transformation matrices for every frame. #bones See also VisualData.export, BFSInnerNode.export and BFSLeaf.export for how the composed data types are being exported.
public export ( string path ) : void
path string The relative filepath to store the exported file at.
Résultat void

getChildCount() public static méthode

Computes the child count from a given child mask.
public static getChildCount ( byte mask ) : byte
mask byte A child mask.
Résultat byte

Property Details

_animation public_oe property

public Matrix[,] _animation
Résultat ].Matrix[

_innerNodes public_oe property

public BFSInnerNode[],datastructures _innerNodes
Résultat datastructures.BFSInnerNode[]

_leaves public_oe property

public BFSLeaf[],datastructures _leaves
Résultat datastructures.BFSLeaf[]

boneCount public_oe property

public uint boneCount
Résultat uint

dimension public_oe property

public float dimension
Résultat float

frameCount public_oe property

public uint frameCount
Résultat uint