Class Tri3dUtil
Utility of tri3d_t. Include generator of triangles from points.
public static class Tri3dUtil
- Inheritance
-
Tri3dUtil
- Inherited Members
Methods
GenTrisByAlignedLists(IList<vec3d_t>, IList<vec3d_t>, IList<tri3d_t>)
public static void GenTrisByAlignedLists(IList<vec3d_t> ps, IList<vec3d_t> rrps, IList<tri3d_t> dst)
Parameters
GenTrisByAlignedLoops(IList<vec3d_t>, IList<vec3d_t>, IList<tri3d_t>)
Generates triangles between two aligned loops of points.
public static void GenTrisByAlignedLoops(IList<vec3d_t> ps, IList<vec3d_t> rrps, IList<tri3d_t> dst)
Parameters
psIList<vec3d_t>First loop of points
rrpsIList<vec3d_t>Second loop of points
dstIList<tri3d_t>The collection to add the generated triangles to
GenTrisByFan(IEnumerable<vec3d_t>)
Generates triangles in a fan pattern from a sequence of points; each triangle's normal is derived from its own vertices.
public static IEnumerable<tri3d_t> GenTrisByFan(this IEnumerable<vec3d_t> ps)
Parameters
psIEnumerable<vec3d_t>The sequence of points
Returns
- IEnumerable<tri3d_t>
An enumerable of triangles forming a fan
GenTrisByFan(IEnumerable<vec3d_t>, vec3d_t)
Generates triangles in a fan pattern from a sequence of points, all carrying the given face normal.
public static IEnumerable<tri3d_t> GenTrisByFan(this IEnumerable<vec3d_t> ps, vec3d_t faceNormal)
Parameters
psIEnumerable<vec3d_t>The sequence of points
faceNormalvec3d_tThe face normal for every triangle
Returns
- IEnumerable<tri3d_t>
An enumerable of triangles forming a fan
GenTrisByNumAlignment(List<vec3d_t>, List<vec3d_t>, IList<tri3d_t>)
Generates triangles between two lists of points with different numbers of points.
public static void GenTrisByNumAlignment(List<vec3d_t> psA, List<vec3d_t> psB, IList<tri3d_t> dst)
Parameters
psAList<vec3d_t>First list of points
psBList<vec3d_t>Second list of points
dstIList<tri3d_t>The collection to add the generated triangles to
GenTrisByQuad(vec3d_t, vec3d_t, vec3d_t, vec3d_t, IList<tri3d_t>)
Generates two triangles from a quadrilateral defined by four points.
public static void GenTrisByQuad(vec3d_t p0, vec3d_t p1, vec3d_t p2, vec3d_t p3, IList<tri3d_t> dst)
Parameters
p0vec3d_tFirst point of the quadrilateral
p1vec3d_tSecond point of the quadrilateral
p2vec3d_tThird point of the quadrilateral
p3vec3d_tFourth point of the quadrilateral
dstIList<tri3d_t>The collection to add the generated triangles to
GenTrisByStar(vec3d_t, IList<vec3d_t>, IList<tri3d_t>)
Generates triangles in a star pattern from a center point to a list of points.
public static void GenTrisByStar(vec3d_t starP, IList<vec3d_t> ps, IList<tri3d_t> dst)
Parameters
starPvec3d_tThe center point of the star
psIList<vec3d_t>The list of points forming the perimeter
dstIList<tri3d_t>The collection to add the generated triangles to
GenTrisByStar(IList<vec3d_t>, vec3d_t, IList<tri3d_t>)
Generates triangles in a star pattern from a list of points to a center point.
public static void GenTrisByStar(IList<vec3d_t> ps, vec3d_t starP, IList<tri3d_t> dst)
Parameters
psIList<vec3d_t>The list of points forming the perimeter
starPvec3d_tThe center point of the star
dstIList<tri3d_t>The collection to add the generated triangles to
GetSegmentsFromPlaneClip(IEnumerable<tri3d_t>, IFlat3d)
Gets line segments resulting from intersecting triangles with a clipping plane.
public static List<Segment3d> GetSegmentsFromPlaneClip(this IEnumerable<tri3d_t> tris, IFlat3d clipPlane)
Parameters
trisIEnumerable<tri3d_t>The collection of triangles to clip
clipPlaneIFlat3dThe clipping plane