Space Engineers
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Properties | List of all members
Sandbox.Engine.Voxels.MyOctreeNode Struct Reference

Public Member Functions

delegate TLeafData FilterFunction (TLeafData *pData, int lod)
 Computes filtered value given 8 values in child. More...
 
 MyOctreeNode (TLeafData allContent)
 
void ClearChildren ()
 
bool HasChild (int childIndex)
 
void SetChild (int childIndex, bool childPresent)
 
void SetAllData (TLeafData value)
 
void SetData (int childIndex, TLeafData data)
 
TLeafData GetData (int cellIndex)
 
TLeafData ComputeFilteredValue (FilterFunction filter, int lod)
 
bool AllDataSame ()
 
bool AllDataSame (TLeafData value)
 
override string ToString ()
 
bool AnyAboveIso ()
 

Static Public Member Functions

static MyOctreeNode ()
 
static unsafe void SetAllData (TLeafData *dst, TLeafData value)
 
static unsafe bool AllDataSame (TLeafData *pData)
 
static unsafe bool AllDataSame (TLeafData *pData, TLeafData value)
 

Public Attributes

const int CHILD_COUNT = 8
 
const int SERIALIZED_SIZE = CHILD_COUNT * sizeof(TLeafData) + 1
 
byte ChildMask
 
fixed TLeafData Data [CHILD_COUNT]
 

Static Public Attributes

static readonly FilterFunction ContentFilter
 
static readonly FilterFunction MaterialFilter
 

Properties

bool HasChildren [get]
 

Detailed Description

Definition at line 10 of file MyOctreeNode.cs.

Constructor & Destructor Documentation

static Sandbox.Engine.Voxels.MyOctreeNode.MyOctreeNode ( )
inlinestatic

Definition at line 28 of file MyOctreeNode.cs.

Sandbox.Engine.Voxels.MyOctreeNode.MyOctreeNode ( TLeafData  allContent)
inline

Definition at line 37 of file MyOctreeNode.cs.

Member Function Documentation

bool Sandbox.Engine.Voxels.MyOctreeNode.AllDataSame ( )
inline

Definition at line 101 of file MyOctreeNode.cs.

static unsafe bool Sandbox.Engine.Voxels.MyOctreeNode.AllDataSame ( TLeafData pData)
inlinestatic

Definition at line 106 of file MyOctreeNode.cs.

bool Sandbox.Engine.Voxels.MyOctreeNode.AllDataSame ( TLeafData  value)
inline

Definition at line 117 of file MyOctreeNode.cs.

static unsafe bool Sandbox.Engine.Voxels.MyOctreeNode.AllDataSame ( TLeafData pData,
TLeafData  value 
)
inlinestatic

Definition at line 122 of file MyOctreeNode.cs.

bool Sandbox.Engine.Voxels.MyOctreeNode.AnyAboveIso ( )
inline

Definition at line 281 of file MyOctreeNode.cs.

void Sandbox.Engine.Voxels.MyOctreeNode.ClearChildren ( )
inline

Definition at line 48 of file MyOctreeNode.cs.

TLeafData Sandbox.Engine.Voxels.MyOctreeNode.ComputeFilteredValue ( FilterFunction  filter,
int  lod 
)
inline

Definition at line 96 of file MyOctreeNode.cs.

delegate TLeafData Sandbox.Engine.Voxels.MyOctreeNode.FilterFunction ( TLeafData pData,
int  lod 
)

Computes filtered value given 8 values in child.

Parameters
pDataPointer to 8 values. Do NOT go further than that.
TLeafData Sandbox.Engine.Voxels.MyOctreeNode.GetData ( int  cellIndex)
inline

Definition at line 89 of file MyOctreeNode.cs.

bool Sandbox.Engine.Voxels.MyOctreeNode.HasChild ( int  childIndex)
inline

Definition at line 53 of file MyOctreeNode.cs.

void Sandbox.Engine.Voxels.MyOctreeNode.SetAllData ( TLeafData  value)
inline

Definition at line 71 of file MyOctreeNode.cs.

static unsafe void Sandbox.Engine.Voxels.MyOctreeNode.SetAllData ( TLeafData dst,
TLeafData  value 
)
inlinestatic

Definition at line 76 of file MyOctreeNode.cs.

void Sandbox.Engine.Voxels.MyOctreeNode.SetChild ( int  childIndex,
bool  childPresent 
)
inline

Definition at line 59 of file MyOctreeNode.cs.

void Sandbox.Engine.Voxels.MyOctreeNode.SetData ( int  childIndex,
TLeafData  data 
)
inline

Definition at line 82 of file MyOctreeNode.cs.

override string Sandbox.Engine.Voxels.MyOctreeNode.ToString ( )
inline

Definition at line 132 of file MyOctreeNode.cs.

Member Data Documentation

const int Sandbox.Engine.Voxels.MyOctreeNode.CHILD_COUNT = 8

Definition at line 12 of file MyOctreeNode.cs.

byte Sandbox.Engine.Voxels.MyOctreeNode.ChildMask

Definition at line 34 of file MyOctreeNode.cs.

readonly FilterFunction Sandbox.Engine.Voxels.MyOctreeNode.ContentFilter
static

Definition at line 25 of file MyOctreeNode.cs.

fixed TLeafData Sandbox.Engine.Voxels.MyOctreeNode.Data[CHILD_COUNT]

Definition at line 35 of file MyOctreeNode.cs.

readonly FilterFunction Sandbox.Engine.Voxels.MyOctreeNode.MaterialFilter
static

Definition at line 26 of file MyOctreeNode.cs.

const int Sandbox.Engine.Voxels.MyOctreeNode.SERIALIZED_SIZE = CHILD_COUNT * sizeof(TLeafData) + 1

Definition at line 14 of file MyOctreeNode.cs.

Property Documentation

bool Sandbox.Engine.Voxels.MyOctreeNode.HasChildren
get

Definition at line 44 of file MyOctreeNode.cs.


The documentation for this struct was generated from the following file: