Tria3D Type
A type containing only static member functions for operations on 3D Triangles.
Static members
| Static member |
Description
|
|
|
|
|
|
Calculates the intersection parameter on the infinite Ray / Line3D with a 3D triangle. Fails if the ray /line - is parallel to the triangle plane, - lies in the triangle's plane, - passes outside the triangle, - has zero length. - a triangle edge has zero length. Use Tria3D.tryIntersectRay to get ValueNone instead.
|
Full Usage:
Tria3D.intersectRayXYZ (lnFromX, lnFromY, lnFromZ, lnToX, lnToY, lnToZ, ptAx, ptAy, ptAz, ptBx, ptBy, ptBz, ptCx, ptCy, ptCz)
Parameters:
float
lnFromY : float
lnFromZ : float
lnToX : float
lnToY : float
lnToZ : float
ptAx : float
ptAy : float
ptAz : float
ptBx : float
ptBy : float
ptBz : float
ptCx : float
ptCy : float
ptCz : float
Returns: float
|
Calculates the intersection parameter on the infinite Ray / Line3D with a 3D triangle. Fails if the ray/line - is parallel to the triangle plane, - lies in the triangle's plane, - passes outside the triangle, - has zero length. - a triangle edge has zero length. Use Tria3D.tryIntersectRayXYZ to get ValueNone instead.
|
Full Usage:
Tria3D.intersectTriaVectorsWithRay (lnFromX, lnFromY, lnFromZ, dirX, dirY, dirZ, ptAx, ptAy, ptAz, e1x, e1y, e1z, e2x, e2y, e2z)
Parameters:
float
lnFromY : float
lnFromZ : float
dirX : float
dirY : float
dirZ : float
ptAx : float
ptAy : float
ptAz : float
e1x : float
e1y : float
e1z : float
e2x : float
e2y : float
e2z : float
Returns: float
|
Finds the intersection parameter on the infinite Line3D with a 3D triangle. Fails if - any of the direction vectors are too small, - the line is parallel to the triangle plane, - the intersection point is outside the triangle. Use Tria3D.tryIntersectTriaVectorsWithRay to get ValueNone instead. lnFromX, lnFromY, lnFromZ are the start point of the line dirX, dirY, dirZ are the direction vector of the line (not the end point) ptAx, ptAy, ptAz is the triangle points e1x, e1y, e1z is the triangle edge1 vector (B-A) e2x, e2y, e2z is the triangle edge2 vector (C-A)
|
|
|
|
Checks if three points are in one line. This is a very fast check, but it is hard to find an appropriate tolerance. (Default is 0.001) This tolerance is the area of the parallelogram described by two vectors created from the 3 points. So it also returns TRUE if the points are equal or very close to each other. Returns FALSE for NaN input values. Use Tria3D.isLinear if you need better control over the actual tolerance distance. Uses the default maxAreaParallelogram of 0.001. Use Tria3D.isLinearFastWithin to set it.
|
|
Checks if three points are in one line. This is a very fast check, but it is hard to find an appropriate tolerance. The tolerance maxAreaParallelogram is the area of the parallelogram described by two vectors created from the 3 points. So it also returns TRUE if the points are equal or very close to each other. Returns FALSE for NaN input values. Use Tria3D.isLinearWithin if you need better control over the actual tolerance distance. Use Tria3D.isLinearFast for the default tolerance of 0.001.
|
|
Checks if three points are in one line. By finding the biggest angle in the triangle. And then measuring the distance from this point to the line defined by the other two points. Returns TRUE if this distance is less than distanceTolerance, or if two points are closer than distanceTolerance. Use Tria3D.isLinear for the default distanceTolerance of 1e-6.
|
|
|
Calculates the intersection point on the finite Line3D with a 3D triangle. Returns: ValueSome with the intersection point. ValueNone if the finite line - does not intersect the triangle, - has zero length. - a triangle edge has zero length.
|
|
|
Calculates the intersection parameter on the infinite Ray / Line3D with a 3D triangle. Returns: ValueSome with the parameter on the line. ValueNone if the ray /line - is parallel to the triangle plane, - lies in the triangle's plane, - passes outside the triangle, - has zero length. - a triangle edge has zero length.
|
Full Usage:
Tria3D.tryIntersectRayXYZ (lnFromX, lnFromY, lnFromZ, lnToX, lnToY, lnToZ, ptAx, ptAy, ptAz, ptBx, ptBy, ptBz, ptCx, ptCy, ptCz)
Parameters:
float
lnFromY : float
lnFromZ : float
lnToX : float
lnToY : float
lnToZ : float
ptAx : float
ptAy : float
ptAz : float
ptBx : float
ptBy : float
ptBz : float
ptCx : float
ptCy : float
ptCz : float
Returns: float voption
Modifiers: inline |
Calculates the intersection parameter on the infinite Ray / Line3D with a 3D triangle. Returns: ValueSome with the parameter on the line. ValueNone if the ray/line - is parallel to the triangle plane, - lies in the triangle's plane, - passes outside the triangle, - has zero length. - a triangle edge has zero length. Note: A degenerated linear triangle that still intersects with the line may sometimes return ValueSome or ValueNone depending on the order of input points.
|
Full Usage:
Tria3D.tryIntersectTriaVectorsWithRay (lnFromX, lnFromY, lnFromZ, dirX, dirY, dirZ, ptAx, ptAy, ptAz, e1x, e1y, e1z, e2x, e2y, e2z)
Parameters:
float
lnFromY : float
lnFromZ : float
dirX : float
dirY : float
dirZ : float
ptAx : float
ptAy : float
ptAz : float
e1x : float
e1y : float
e1z : float
e2x : float
e2y : float
e2z : float
Returns: float voption
|
Finds the intersection parameter on the infinite Line3D with a 3D triangle. Returns ValueNone if - any of the direction vectors are too small, - the line is parallel to the triangle plane, - the intersection point is outside the triangle. lnFromX, lnFromY, lnFromZ are the start point of the line dirX, dirY, dirZ are the direction vector of the line (not the end point) ptAx, ptAy, ptAz is the triangle points e1x, e1y, e1z is the triangle edge1 vector (B-A) e2x, e2y, e2z is the triangle edge2 vector (C-A)
|
Euclid