BSPNode.cut C# (CSharp) Method

cut() public method

public cut ( ) : void
return void
    public void cut()
    {
        float choice = Random.Range(0,2);
        if (choice <=0.5){
            splitX (cube);
        }else{
            splitZ(cube);
        }
    }

Usage Example

コード例 #1
0
    //split the tree
    public void split(BSPNode _aNode)
    {
        if (_aNode.getLeftNode() != null){
            split(_aNode.getLeftNode());
        }else{
         	_aNode.cut();
            return;
        }

        if (_aNode.getLeftNode() != null){
            split(_aNode.getRightNode());
        }
    }
All Usage Examples Of BSPNode::cut