Class Tri3dUtil
Utility of Tri3d. Include generator of triangles from points.
public static class Tri3dUtil
- Inheritance
-
Tri3dUtil
- Inherited Members
Methods
GenTrisByAlignedLists(IList<Vec3d>, IList<Vec3d>, IList<Tri3d>)
public static void GenTrisByAlignedLists(IList<Vec3d> ps, IList<Vec3d> rrps, IList<Tri3d> dst)
Parameters
GenTrisByAlignedLoops(IList<Vec3d>, IList<Vec3d>, IList<Tri3d>)
Generates triangles between two aligned loops of points.
public static void GenTrisByAlignedLoops(IList<Vec3d> ps, IList<Vec3d> rrps, IList<Tri3d> dst)
Parameters
psIList<Vec3d>First loop of points
rrpsIList<Vec3d>Second loop of points
dstIList<Tri3d>The collection to add the generated triangles to
GenTrisByFan(IEnumerable<Vec3d>, Vec3d)
Generates triangles in a fan pattern from a sequence of points.
public static IEnumerable<Tri3d> GenTrisByFan(this IEnumerable<Vec3d> ps, Vec3d faceNormal = null)
Parameters
psIEnumerable<Vec3d>The sequence of points
faceNormalVec3dOptional face normal for the triangles
Returns
- IEnumerable<Tri3d>
An enumerable of triangles forming a fan
GenTrisByNumAlignment(List<Vec3d>, List<Vec3d>, IList<Tri3d>)
Generates triangles between two lists of points with different numbers of points.
public static void GenTrisByNumAlignment(List<Vec3d> psA, List<Vec3d> psB, IList<Tri3d> dst)
Parameters
psAList<Vec3d>First list of points
psBList<Vec3d>Second list of points
dstIList<Tri3d>The collection to add the generated triangles to
GenTrisByQuad(Vec3d, Vec3d, Vec3d, Vec3d, IList<Tri3d>)
Generates two triangles from a quadrilateral defined by four points.
public static void GenTrisByQuad(Vec3d p0, Vec3d p1, Vec3d p2, Vec3d p3, IList<Tri3d> dst)
Parameters
p0Vec3dFirst point of the quadrilateral
p1Vec3dSecond point of the quadrilateral
p2Vec3dThird point of the quadrilateral
p3Vec3dFourth point of the quadrilateral
dstIList<Tri3d>The collection to add the generated triangles to
GenTrisByStar(Vec3d, IList<Vec3d>, IList<Tri3d>)
Generates triangles in a star pattern from a center point to a list of points.
public static void GenTrisByStar(Vec3d starP, IList<Vec3d> ps, IList<Tri3d> dst)
Parameters
starPVec3dThe center point of the star
psIList<Vec3d>The list of points forming the perimeter
dstIList<Tri3d>The collection to add the generated triangles to
GenTrisByStar(IList<Vec3d>, Vec3d, IList<Tri3d>)
Generates triangles in a star pattern from a list of points to a center point.
public static void GenTrisByStar(IList<Vec3d> ps, Vec3d starP, IList<Tri3d> dst)
Parameters
psIList<Vec3d>The list of points forming the perimeter
starPVec3dThe center point of the star
dstIList<Tri3d>The collection to add the generated triangles to
GetSegmentsFromPlaneClip(IEnumerable<Tri3d>, IFlat3d)
Gets line segments resulting from intersecting triangles with a clipping plane.
public static List<Segment3d> GetSegmentsFromPlaneClip(this IEnumerable<Tri3d> tris, IFlat3d clipPlane)
Parameters
trisIEnumerable<Tri3d>The collection of triangles to clip
clipPlaneIFlat3dThe clipping plane