C# Class MeshCutter, virtual-loom

Exibir arquivo Open project: silknow/virtual-loom Class Usage Examples

Public Methods

Method Description
GetFirstVertex ( ) : Vector3,
MeshCutter ( int initialArraySize ) : System.Collections
SliceMesh ( Mesh mesh, Plane &slice ) : bool

Slice a mesh by the slice plane. We assume the plane is already in the mesh's local coordinate frame Returns posMesh and negMesh, which are the resuling meshes on both sides of the plane (posMesh on the same side as the plane's normal, negMesh on the opposite side)

Private Methods

Method Description
AddTriangle ( List, face, int t1, int t2, int t3 ) : void
FillBoundaryFace ( List, added ) : void
FillBoundaryGeneral ( List, added ) : void
FindRealPolygon ( List, pairs ) : List

Extract polygon from the pairs of vertices. Per example, two vectors that are colinear is redundant and only forms one side of the polygon

Method Details

GetFirstVertex() public method

public GetFirstVertex ( ) : Vector3,
return Vector3,

MeshCutter() public method

public MeshCutter ( int initialArraySize ) : System.Collections
initialArraySize int
return System.Collections

SliceMesh() public method

Slice a mesh by the slice plane. We assume the plane is already in the mesh's local coordinate frame Returns posMesh and negMesh, which are the resuling meshes on both sides of the plane (posMesh on the same side as the plane's normal, negMesh on the opposite side)
public SliceMesh ( Mesh mesh, Plane &slice ) : bool
mesh Mesh
slice Plane
return bool