示例#1
0
        // TODO : I think this is what this means
        public static CSG_Node Compliment(CSG_Node a1)
        {
            CSG_Node a = a1.Clone();

            a.Invert();
            return(a);
        }
示例#2
0
        // Invert the object - inner is the default representation of an object
        public static CSG_Node Outer(CSG_Node a1)
        {
            CSG_Node a = a1.Clone();

            a.Invert();
            return(a);
        }
示例#3
0
        // Return a new CSG solid representing space both this solid and in the
        // solid `csg`. Neither this solid nor the solid `csg` are modified.
        public static CSG_Node Intersect(CSG_Node a1, CSG_Node b1)
        {
            CSG_Node a = a1.Clone();
            CSG_Node b = b1.Clone();

            a.Invert();
            b.ClipTo(a);
            b.Invert();
            a.ClipTo(b);
            b.ClipTo(a);
            a.Build(b.AllPolygons());
            a.Invert();

            CSG_Node ret = new CSG_Node(a.AllPolygons());

            return(ret);
        }