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())); }
/// <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)); }
/// <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)); }
/// <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)); }