Slices a triangle. Maintaines orientation.

Namespace:  ceometric.VectorGeometry
Assembly:  ceometric.VectorGeometry (in ceometric.VectorGeometry.dll) Version: 1.8.0.0 (1.8.0.0)

Syntax

C#
public List<Triangle> Slice(
	Plane slicingPlane,
	Triangle..::.SliceMethod slicingMethod,
	bool keepCoplanar,
	bool checkDegenerate
)
Visual Basic (Declaration)
Public Function Slice ( _
	slicingPlane As Plane, _
	slicingMethod As Triangle..::.SliceMethod, _
	keepCoplanar As Boolean, _
	checkDegenerate As Boolean _
) As List(Of Triangle)
Visual C++
public:
List<Triangle^>^ Slice(
	Plane^ slicingPlane, 
	Triangle..::.SliceMethod slicingMethod, 
	bool keepCoplanar, 
	bool checkDegenerate
)

Parameters

slicingPlane
Type: ceometric.VectorGeometry..::.Plane
A slicing plane.
slicingMethod
Type: ceometric.VectorGeometry..::.Triangle..::.SliceMethod
Determines which side to keep after slicing.
keepCoplanar
Type: System..::.Boolean
True if triangles coplanar to the slicing plane shall be kept, false otherwise.
checkDegenerate
Type: System..::.Boolean
True if newly created triangles shall be checked for degeneracy, false otherwise.

Return Value

Returns a list of triangular subdomains of the sliced triangle.

Remarks

If slicingMethod = KeepBoth, this list contains
  • 0 triangles if the plane is coplanar to the triangle.
  • 1 triangle if the plane does not intersect the triangle.
  • 1 triangle if the plane touches the triangle in just one vertex.
  • 1 triangle if the plane contains one edge of the triangle.
  • 2 triangles if the plane intersects and runs through one vertex.
  • 3 triangles if the plane intersects two edges of the triangle.
If KeepAbove is chosen, all triangles below the slicing plane are removed from the list. If KeepBelow is chosen, all triangles above the slicing plane are removed from the list.

See Also