Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 4
0
 // TODO : I dont understand what on does
 public static CSG_Node On(CSG_Node a1)
 {
     return(a1.Clone());
 }
Exemplo n.º 5
0
 // Do nothing because inner is the default representation of an object
 public static CSG_Node Inner(CSG_Node a1)
 {
     return(a1.Clone());
 }
Exemplo n.º 6
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;
		}