PlaneSlice |
public void SliceMeshGeometry3D( MeshGeometry3D meshGeometry3D, Transform3D transform, out MeshGeometry3D frontMeshGeometry3D, out MeshGeometry3D backMeshGeometry3D )
SliceMeshGeometry3D slices the MeshGeometry3D with this Plane and creates two new MeshGeometry3D objects: one with MeshGeometry3D that are in front of the plane (in the direction of plane's Normal vector) and one with MeshGeometry3D in the back of the plane. If MeshGeometry3D is fully in front (or in back) of the Plane, the the same instance of MeshGeometry3D is used. If the MeshGeometry3D intersects the Plane, it is sliced and new MeshGeometry3D objects are created from it.
Note for using with textured objects: SliceMeshGeometry3D correctly calculates sliced TextureCoordinates, but to show the texture correctly, the ViewportUnits on ImageBrush needs to be set to BrushMappingMode.Absolute. It should not be set to BrushMappingMode.RelativeToBoundingBox (a default value in WPF). In case of RelativeToBoundingBox, both sliced parts of the 3D model will still show the whole texture).