OctreeNode.RemoveNode C# (CSharp) Method

RemoveNode() public method

public RemoveNode ( float x, float y, float z, object obj ) : object
x float
y float
z float
obj object
return object
    public object RemoveNode(float x, float y, float z, object obj)
    {
        return RemoveNode(new OctreeLeaf(x, y, z, obj));
    }

Same methods

OctreeNode::RemoveNode ( OctreeLeaf, leaf ) : object
OctreeNode::RemoveNode ( Vector3 vector, object obj ) : object
OctreeNode::RemoveNode ( double x, double y, double z, object obj ) : object

Usage Example

示例#1
0
 public object RemoveNode(OctreeLeaf leaf)
 {
     if (Branch == null)
     {
         // This must be the node that has it...
         for (int i = 0; i < Items.Count; i++)
         {
             var qtl = (OctreeLeaf)Items[i];
             if (leaf.LeafObject != qtl.LeafObject)
             {
                 continue;
             }
             Items.RemoveAt(i);
             return(qtl.LeafObject);
         }
     }
     else
     {
         OctreeNode node = GetChild(leaf.X, leaf.Y, leaf.Z);
         if (node != null)
         {
             return(node.RemoveNode(leaf));
         }
     }
     return(null);
 }
All Usage Examples Of OctreeNode::RemoveNode