Exemple #1
0
 private Csg.Solid TransformedSolidOperation(Geometry.Solids.SolidOperation op)
 {
     if (Transform == null)
     {
         return(op._csg);
     }
     return(op.LocalTransform != null
                 ? op._csg.Transform(Transform.Concatenated(op.LocalTransform).ToMatrix4x4())
                 : op._csg.Transform(Transform.ToMatrix4x4()));
 }
Exemple #2
0
 /// <summary>
 /// Compute the union of two solid operations.
 /// </summary>
 /// <param name="a">The first solid.</param>
 /// <param name="b">The second solid.</param>
 /// <returns>A solid which is the union of a and b.</returns>
 public static Solid Union(SolidOperation a, SolidOperation b)
 {
     return(Union(a.Solid, a.LocalTransform, b.Solid, b.LocalTransform));
 }
Exemple #3
0
 /// <summary>
 /// Compute the intersection of two solid operations.
 /// </summary>
 /// <param name="a">The first solid.</param>
 /// <param name="b">The second solid.</param>
 /// <returns>A solid which is the the intersection of a and b.</returns>
 public static Solid Intersection(SolidOperation a, SolidOperation b)
 {
     return(Intersection(a.Solid, a.LocalTransform, b.Solid, b.LocalTransform));
 }
Exemple #4
0
 /// <summary>
 /// Compute the difference of two solid operations.
 /// </summary>
 /// <param name="a">The first solid.</param>
 /// <param name="b">The second solid.</param>
 /// <returns>A solid which is the difference of a and b.</returns>
 public static Solid Difference(SolidOperation a, SolidOperation b)
 {
     return(Difference(a.Solid, a.LocalTransform, b.Solid, b.LocalTransform));
 }