internal static CSGTreeNode DuplicateInternal(CSGTreeNode node) { switch (node.Type) { case CSGNodeType.Brush: { var srcTreeBrush = (CSGTreeBrush)node; return(CSGTreeBrush.Create(srcTreeBrush.UserID, srcTreeBrush.LocalTransformation, srcTreeBrush.BrushMesh, srcTreeBrush.Operation, srcTreeBrush.Flags)); } case CSGNodeType.Tree: { var srcTree = (CSGTree)node; return(CSGTree.Create(srcTree.UserID, DuplicateChildNodesInternal(srcTree))); } case CSGNodeType.Branch: { var srcTreeBranch = (CSGTreeBranch)node; return(CSGTreeBranch.Create(srcTreeBranch.UserID, srcTreeBranch.Operation, DuplicateChildNodesInternal(srcTreeBranch))); } default: throw new NotImplementedException(); } }
public static ChiselWireframe CreateWireframe(CSGTreeBrush brush, int surfaceID) { if (!brush.Valid) { return(null); } return(CreateSurfaceWireframe(brush.NodeID, surfaceID)); }
public static ChiselWireframe CreateWireframe(CSGTreeBrush brush) { if (!brush.Valid) { return(null); } return(CreateBrushWireframe(brush.NodeID)); }
private static bool GetBrushOutlineValues(CSGTreeBrush brush, ref float3[] vertices, ref Int32[] visibleOuterLines) { ref var brushOutline = ref brush.Outline;
// TODO: generate outlines somewhere in managed code private static uint GetBrushOutlineHash(CSGTreeBrush brush) { return(brush.Outline.hash); }
public bool IsInTree(CSGTreeBrush brush) { return(DoesTreeContainBrush(treeNodeID, brush.NodeID)); }
public CSGTreeBrush CreateBrush(Int32 userID = 0, BrushMeshInstance brushMesh = default(BrushMeshInstance), CSGOperationType operation = CSGOperationType.Additive) { return(CSGTreeBrush.Create(userID, brushMesh, operation)); }