OctreeNode.HasChildren C# (CSharp) Method

HasChildren() public method

public HasChildren ( ) : bool
return bool
    public bool HasChildren()
    {
        return Branch != null;
    }

Usage Example

Beispiel #1
0
        unsafe private int getReservedCount()
        {
            if (!isSubsampled)
            {
                return(1);

                fixed(OctreeNode *ptree = MemoryMarshal.Cast <byte, OctreeNode>(nodeBuffer))
                {
                    int reserved = 1;

                    for (nuint i = 0; i < 8; i++)
                    {
                        var node = ptree + i;
                        if (!OctreeNode.HasChildren(node))
                        {
                            reserved += 8;
                        }
                        else
                        {
                            ushort *children = (ushort *)node;
                            for (nuint j = 0; j < 8; j++)
                            {
                                if (children[j] == 0)
                                {
                                    reserved++;
                                }
                            }
                        }
                    }

                    return(reserved);
                }
        }

        unsafe private int getPixelCount()
All Usage Examples Of OctreeNode::HasChildren