C# Класс 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.
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
_animation ].Matrix[
_innerNodes datastructures.BFSInnerNode[]
_leaves datastructures.BFSLeaf[]
boneCount uint
dimension float
frameCount uint

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
convert ( DynamicOctreeNode node ) : void

Converts a DynamicOctree into this BFSOctree.

Описание методов

BFSOctree() публичный Метод

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

export() публичный Метод

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.
Результат void

getChildCount() публичный статический Метод

Computes the child count from a given child mask.
public static getChildCount ( byte mask ) : byte
mask byte A child mask.
Результат byte

Описание свойств

_animation публичное свойство

public Matrix[,] _animation
Результат ].Matrix[

_innerNodes публичное свойство

public BFSInnerNode[],datastructures _innerNodes
Результат datastructures.BFSInnerNode[]

_leaves публичное свойство

public BFSLeaf[],datastructures _leaves
Результат datastructures.BFSLeaf[]

boneCount публичное свойство

public uint boneCount
Результат uint

dimension публичное свойство

public float dimension
Результат float

frameCount публичное свойство

public uint frameCount
Результат uint