All pastes #233210 Raw Edit

Untitled

public text v1 · immutable
·published 2006-11-01 20:37 UTC
rendered paste body
private struct TerrainQuadTreeNode
        {
            public BoundingBox BoundsInternal;
            public TerrainQuadTreeNodeType TypeInternal; //the type of node
            public uint[] ChildInternal; //the 4 children of this node

            public uint IDInternal; //the ID of this node
            public uint ParentIDInternal; //the parent ID of this node

            //This is only used if the type is LEAF
            public uint blockIndexInternal; //the index of the block used

            //Constructor for a NODE
            public TerrainQuadTreeNode(uint defaultBlockIndex)
            {
                this.BoundsInternal = new BoundingBox();
                this.ChildInternal = new uint[4];

                TypeInternal = TerrainQuadTreeNodeType.NODE;
                IDInternal = 0;
                ParentIDInternal = 0;
                
                this.blockIndexInternal = defaultBlockIndex;
            }
        };