GeometryUtilsInterface Class Reference

#include <geometryutils.h>

Detailed Description

2D and 3D geometrical utility functions.

Static Public Member Functions

static MAXON_METHOD Float LinearRemapToRange (Float value, Float from1, Float to1, Float from2, Float to2)
 
static MAXON_METHOD Float GetAngle2D (const Vector2d &direction1, const Vector2d &direction2)
 
static MAXON_METHOD Float InterpolatePointOnSegment (const Vector &segmentPoint1, const Vector &segmentPoint2, const Vector &point, Bool clamp=true)
 
static MAXON_METHOD Float InterpolatePointOnSegment2D (const Vector2d &segmentPoint1, const Vector2d &segmentPoint2, const Vector2d &point, Bool clamp=true)
 
static MAXON_METHOD Bool CalculateBestFitPlane (const Block< const Vector > &pointCloud, Vector &centroid, Vector &normal, Int iterMax=500)
 
static MAXON_METHOD Result< void > Points3Dto2D (const Block< const Vector > &points, const Vector &normal, Vector &basisVector0, Vector &basisVector1, Vector &translate, Bool checkDegenerated, WritableArrayInterface< Vector2d > &outPoints, Bool computeBasis=true)
 
static MAXON_METHOD Result< void > Points3Dto2D (const Block< const Vector > &points, const Vector &normal, Bool checkDegenerated, WritableArrayInterface< Vector2d > &outPoints)
 
static MAXON_METHOD Vector Point2Dto3D (const Vector2d &point, const Vector &basisVector0, const Vector &basisVector1, const Vector &translate)
 
static MAXON_METHOD Result< void > Points2Dto3D (const Block< const Vector2d > &points, const Vector &basisVector0, const Vector &basisVector1, const Vector &translate, WritableArrayInterface< Vector > &outPoints)
 
static MAXON_METHOD Float CalculateTriangleArea (const Vector &a, const Vector &b, const Vector &c)
 
static MAXON_METHOD Float CalculateSignedTriangleArea (const Vector &a, const Vector &b, const Vector &c)
 
static MAXON_METHOD Float CalculateQuadrangleArea (const Vector &a, const Vector &b, const Vector &c, const Vector &d)
 
static MAXON_METHOD Float CalculateOutlineArea (const Block< const Vector > &outlinePoints)
 
static MAXON_METHOD Vector CalculateOutlineNormal (const Block< const Vector > &points, const Block< const Int32 > &indices, Bool normalized=true)
 
static MAXON_METHOD Vector CalculateOutlineNormal (const Block< const Vector > &points, Bool normalize=true)
 
static MAXON_METHOD Bool IsVertexConvex (const Vector &vertex, const Vector &next, const Vector &pred, const Vector &up=Vector(0, 1, 0))
 
static MAXON_METHOD Result< void > CalculateMeanValueCoordinatesWeights (const Vector &point, const Block< const Vector > &outline, WritableArrayInterface< Float > &weights)
 
static MAXON_METHOD Bool IsVertexConvex2D (const Vector2d &vertex, const Vector2d &next, const Vector2d &pred)
 
static MAXON_METHOD Vector2d CalculateBarycentricCoordinate (const Vector &point, const Vector &a, const Vector &b, const Vector &c)
 
static MAXON_METHOD Vector CalculateBarycentricCoordinate3D (const Vector &point, const Vector &a, const Vector &b, const Vector &c)
 
static MAXON_METHOD Bool PointInTriangle (const Vector &point, const Vector &a, const Vector &b, const Vector &c)
 
static MAXON_METHOD Bool PointInTriangle2D (const Vector2d &point, const Vector2d &a, const Vector2d &b, const Vector2d &c)
 
static MAXON_METHOD Int GetPointInPolygonWindingNumber2D (Vector2d point, const Block< const Vector2d > &outline)
 
static MAXON_METHOD Int GetPointInPolygonWindingNumber2DExact (Vector2d point, const Block< const Vector2d > &outline)
 
static MAXON_METHOD Int GetPointInPolygonWindingNumber2D (Vector2d point, const Block< const Vector2d > &outline, Int &edgeHit)
 
static MAXON_METHOD Int GetPointInPolygonWindingNumber (Vector point, const Block< const Vector > &outline)
 
static MAXON_METHOD Int GetPointInPolygonWindingNumber (Vector point, const Block< const Vector > &outline, Int &edgeHit)
 
static MAXON_METHOD Bool PointInOutline2D (const Vector &point, const Block< const Vector2d > &outline)
 
static MAXON_METHOD Vector CalculateBisector (const Vector &v1, const Vector &v2, const Vector &up=Vector(0, 1, 0), Float w1=1.0, Float w2=1.0)
 
static MAXON_METHOD Bool CalculateCircumcenter2D (const Vector2d &a, const Vector2d &b, const Vector2d &c, Vector2d &center, Float &sqrRad, Float tolerance=GeomConstants::EPSILON4)
 
static MAXON_METHOD Bool CalculateCircumcenter (const Vector &a, const Vector &b, const Vector &c, Vector &center, Float &rad, Float tolerance=GeomConstants::EPSILON4)
 
static MAXON_METHOD Bool SegmentsIntersectionTest2D (const Vector2d &segment1Point1, const Vector2d &segment1Point2, const Vector2d &segment2Point1, const Vector2d &segment2Point2)
 
static MAXON_METHOD Bool IntersectsSegments2D (const Vector2d &segment1Point1, const Vector2d &segment1Point2, const Vector2d &segment2Point1, const Vector2d &segment2Point2, Vector2d &intersectionPoint, Float tolerance=0.0)
 
static MAXON_METHOD Vector LineLineDistance (const Vector &line1Point, const Vector &line1Dir, const Vector &line2Point, const Vector &line2Dir, Bool &parallel, Float &param1, Float &param2, Float tolerance=GeomConstants::EPSILON4)
 
static MAXON_METHOD Bool PointInSegment2D (const Vector2d &point, const Vector2d &segmentPoint1, const Vector2d &segmentPoint2, Float tolerance)
 
static MAXON_METHOD Bool PointInSegment (const Vector &point, const Vector &segmentPoint1, const Vector &segmentPoint2, Float tolerance=GeomConstants::EPSILON4)
 
static MAXON_METHOD Bool PointInHalfLine (const Vector &point, const Vector &halfLineOrigin, const Vector &halfLineDir, Float tolerance=GeomConstants::EPSILON4)
 
static MAXON_METHOD Bool IntersectLines (const Vector &line1Point, const Vector &line1Dir, const Vector &line2Point, const Vector &line2Dir, Vector &intersectionPoint, Float tolerance=GeomConstants::EPSILON4)
 
static MAXON_METHOD Bool IntersectLineSegment (const Vector &linePoint, const Vector &lineDir, const Vector &segmentPoint1, const Vector &segmentPoint2, Vector &intersectionPoint, Float tolerance=GeomConstants::EPSILON4)
 
static MAXON_METHOD Bool IntersectSegments (const Vector &segment1Point1, const Vector &segment1Point2, const Vector &segment2Point1, const Vector &segment2Point2, Vector &intersectionPoint, Float tolerance=GeomConstants::EPSILON4)
 
static MAXON_METHOD Bool IntersectHalfLines (const Vector &halfLine1Origin, const Vector &halfLine1Dir, const Vector &halfLine2Origin, const Vector &halfLine2Dir, Vector &intersectionPoint, Float tolerance=GeomConstants::EPSILON4)
 
static MAXON_METHOD Bool IntersectLineHalfLine (const Vector &linePoint, const Vector &lineDir, const Vector &halfLineOrigin, const Vector &halfLineDir, Vector &intersectionPoint, Float tolerance=GeomConstants::EPSILON4)
 
static MAXON_METHOD Bool IntersectHalfLineSegment (const Vector &halfLineOrigin, const Vector &halfLineDir, const Vector &segmentPoint1, const Vector &segmentPoint2, Vector &intersectionPoint, Float tolerance=GeomConstants::EPSILON4)
 
static MAXON_METHOD Bool IntersectPlanes (const Vector &plane1Point, const Vector &plane1Normal, const Vector &plane2Point, const Vector &plane2Normal, Vector &resLinePoint, Vector &resLineDirection, Float tolerance=GeomConstants::EPSILON4)
 
static MAXON_METHOD Bool IntersectLinePlane (const Vector &linePoint, const Vector &lineDir, const Vector &planePoint, const Vector &planeNormal, Vector &intersectionPoint, Float tolerance=GeomConstants::EPSILON4)
 
static MAXON_METHOD Bool IntersectLinePlane (const Vector &linePoint, const Vector &lineDir, const Vector &planePoint, const Vector &planeNormal, Vector &intersectionPoint, Float &param, Bool &samePlane, Float tolerance=GeomConstants::EPSILON4)
 
static MAXON_METHOD Bool IntersectSegmentPlane (const Vector &segmentPoint1, const Vector &segmentPoint2, const Vector &planePoint, const Vector &planeNormal, Vector &intersectionPoint, Float tolerance=GeomConstants::EPSILON4)
 
static MAXON_METHOD Bool IntersectHalfLinePlane (const Vector &halfLinePoint, const Vector &halfLineDir, const Vector &planePoint, const Vector &planeNormal, Vector &intersectionPoint, Float tolerance=GeomConstants::EPSILON4)
 
static MAXON_METHOD Bool IntersectLineTriangle (const Vector &linePoint, const Vector &lineDir, const Vector &a, const Vector &b, const Vector &c, Vector &intersectionPoint, Vector2d *barycCoords=nullptr, Float tolerance=GeomConstants::EPSILON4)
 
static MAXON_METHOD Bool IntersectHalfLineTriangle (const Vector &halfLineOrigin, const Vector &halfLineDir, const Vector &a, const Vector &b, const Vector &c, Vector &intersectionPoint, Vector2d *barycCoords=nullptr, Float tolerance=GeomConstants::EPSILON4)
 
static MAXON_METHOD Bool IntersectLineQuadrangle (const Vector &linePoint, const Vector &lineDir, const Vector &a, const Vector &b, const Vector &c, const Vector &d, Vector &intersectionPoint, Float tolerance=GeomConstants::EPSILON4)
 
static MAXON_METHOD Bool IntersectHalfLineQuadrangle (const Vector &halfLineOrigin, const Vector &halfLineDir, const Vector &a, const Vector &b, const Vector &c, const Vector &d, Vector &intersectionPoint, Float tolerance=GeomConstants::EPSILON4)
 
static MAXON_METHOD Bool IntersectSegmentTriangle (const Vector &segmentPoint1, const Vector &segmentPoint2, const Vector &a, const Vector &b, const Vector &c, Vector &intersectionPoint, Vector *barycCoords=nullptr, Float tolerance=GeomConstants::EPSILON4)
 
static MAXON_METHOD Bool TrianglesIntersectionTest (const Vector &t1a, const Vector &t1b, const Vector &t1c, const Vector &t2a, const Vector &t2b, const Vector &t2c, Float tolerance=GeomConstants::EPSILON4)
 
static MAXON_METHOD Bool CalculatePolygonPointST (const Vector &point, const Vector &pa, const Vector &pb, const Vector &pc, const Vector &pd, Bool isQuad, Float &s, Float &t, Float tolerance=GeomConstants::EPSILON4)
 
static MAXON_METHOD void InverseBilinarInterpolate (const Vector &pa, const Vector &pb, const Vector &pc, const Vector &pd, const Vector &point, Vector2d &bilinarVariables)
 
static MAXON_METHOD void InverseBilinarInterpolateNewton (const Vector &pa, const Vector &pb, const Vector &pc, const Vector &pd, const Vector &point, Int32 iterations, Vector2d &bilinarVariables)
 
static MAXON_METHOD void InverseBilinarInterpolate2D (const Vector2d &pa, const Vector2d &pb, const Vector2d &pc, const Vector2d &pd, const Vector2d &point, Vector2d &bilinarVariables)
 
static MAXON_METHOD void InverseBilinarInterpolate2DNewton (const Vector2d &pa, const Vector2d &pb, const Vector2d &pc, const Vector2d &pd, const Vector2d &point, Int32 iterations, Vector2d &bilinarVariables)
 
static MAXON_METHOD Vector BilinearInterpolate (const Vector &pa, const Vector &pb, const Vector &pc, const Vector &pd, const Float s, const Float t)
 
static MAXON_METHOD Float CalculateSignedTriangleArea (const Vector &a, const Vector &b, const Vector &c, const Vector &normal)
 
static MAXON_METHOD Result< void > CalculateMeanValueCoordinatesWeights (const Vector &point, const Block< const Vector > &outline, const Vector &normal, WritableArrayInterface< Float > &weights)
 

Private Member Functions

 MAXON_INTERFACE_NONVIRTUAL (GeometryUtilsInterface, MAXON_REFERENCE_NONE, "net.maxon.geom.geometryutils")
 

Member Function Documentation

◆ MAXON_INTERFACE_NONVIRTUAL()

MAXON_INTERFACE_NONVIRTUAL ( GeometryUtilsInterface  ,
MAXON_REFERENCE_NONE  ,
"net.maxon.geom.geometryutils"   
)
private

◆ LinearRemapToRange()

static MAXON_METHOD Float LinearRemapToRange ( Float  value,
Float  from1,
Float  to1,
Float  from2,
Float  to2 
)
static

Remaps a value from one range to another.

Parameters
[in]valueThe value to remap.
[in]from1First bound of source range.
[in]to1Second bound of source range.
[in]from2First bound of destination range.
[in]to2Second bound of destination range.
Returns
The remapped value.

◆ GetAngle2D()

static MAXON_METHOD Float GetAngle2D ( const Vector2d direction1,
const Vector2d direction2 
)
static

Gets the 2D angle between two direction vectors.

Parameters
[in]direction1First direction vector.
[in]direction2Second direction vector.
Returns
The angle value in between 0 and 2PI in radians.

◆ InterpolatePointOnSegment()

static MAXON_METHOD Float InterpolatePointOnSegment ( const Vector segmentPoint1,
const Vector segmentPoint2,
const Vector point,
Bool  clamp = true 
)
static

Calculates the normalized position of a point along a directed segment.

Parameters
[in]segmentPoint1First segment point.
[in]segmentPoint2Second segment point.
[in]pointThe point position along the segment line.
[in]clampIf true the resulting value will be clamped between 0 and 1.
Returns
The normalized position of the point on the segment.

◆ InterpolatePointOnSegment2D()

static MAXON_METHOD Float InterpolatePointOnSegment2D ( const Vector2d segmentPoint1,
const Vector2d segmentPoint2,
const Vector2d point,
Bool  clamp = true 
)
static

Calculates the normalized position of a 2D point along a directed segment.

Parameters
[in]segmentPoint1First segment point.
[in]segmentPoint2Second segment point.
[in]pointThe point position along the segment line.
[in]clampIf true the resulting value will be clamped between 0 and 1.
Returns
The normalized position of the point on the segment.

◆ CalculateBestFitPlane()

static MAXON_METHOD Bool CalculateBestFitPlane ( const Block< const Vector > &  pointCloud,
Vector centroid,
Vector normal,
Int  iterMax = 500 
)
static

Calculates the the best fit plane centroid and normal from a point cloud.

Parameters
[in]pointCloudA block filled with point coordinates.
[out]centroidThe resulting point cloud centroid.
[out]normalThe resulting plane normal.
[in]iterMaxMax iteration for computation.
Returns
True if successful otherwise false.

◆ Points3Dto2D() [1/2]

static MAXON_METHOD Result<void> Points3Dto2D ( const Block< const Vector > &  points,
const Vector normal,
Vector basisVector0,
Vector basisVector1,
Vector translate,
Bool  checkDegenerated,
WritableArrayInterface< Vector2d > &  outPoints,
Bool  computeBasis = true 
)
static

Projects 3D points as 2D points on a plane which is parallel to the points best fit plane and which passes through the origin of the world coordinate system.

Parameters
[in]pointsPoints 3D positions to project.
[in]normalThe normal vector of the plane onto which to project the points.
[in,out]basisVector0First basis vector of the 2D plane coordinate system.
[in,out]basisVector1Second basis vector of the 2D plane coordinate system.
[out]translateTranslation vector between the projection plane origin (which is the world CS origin) and the best fit plane origin (which is the orthogonal projection of the world CS origin to the fit plane). In other words, translation vector is the distance vector between the projection plane an the best fit planes.
[in]checkDegeneratedIf true try to avoid cases where the resulting 2d outline contains coincident vertices.
[out]outPointsArray containing 2D projected points positions.
[out]computeBasisCompute basis vectors from the normal and the input points if enabled.
Returns
OK on success. DegeneratedInputError if input points are collapsed in one point.

◆ Points3Dto2D() [2/2]

static MAXON_METHOD Result<void> Points3Dto2D ( const Block< const Vector > &  points,
const Vector normal,
Bool  checkDegenerated,
WritableArrayInterface< Vector2d > &  outPoints 
)
static

Projects 3D points as 2D points on a plane. Overloaded function.

Parameters
[in]pointsPoints 3D positions to project.
[in]normalThe normal vector of the plane onto which to project the points.
[in]checkDegeneratedIf true try to avoid cases where the resulting 2d outline contains coincident vertices.
[out]outPointsArray containing 2D projected points positions.
Returns
OK on success. DegeneratedInputError if input points are collapsed in one point.

◆ Point2Dto3D()

static MAXON_METHOD Vector Point2Dto3D ( const Vector2d point,
const Vector basisVector0,
const Vector basisVector1,
const Vector translate 
)
static

Calculates 3D world point coordinates from its 2D local coordinates.

Parameters
[in]pointPoint 2D local coordinates.
[in]basisVector0First basis vector of the 2D local coordinate system.
[in]basisVector1Second basis vector of the 2D local coordinate system.
[in]translateTranslation vector.
Returns
Point 3D world coordinates.

◆ Points2Dto3D()

static MAXON_METHOD Result<void> Points2Dto3D ( const Block< const Vector2d > &  points,
const Vector basisVector0,
const Vector basisVector1,
const Vector translate,
WritableArrayInterface< Vector > &  outPoints 
)
static

Calculates 3D world points coordinates from its 2D local coordinates.

Parameters
[in]pointsPoints 2D local coordinates.
[in]basisVector0First basis vector of the 2D local coordinate system.
[in]basisVector1Second basis vector of the 2D local coordinate system.
[in]translateTranslation vector.
[out]outPointsPoints 3D world coordinates.

◆ CalculateTriangleArea()

static MAXON_METHOD Float CalculateTriangleArea ( const Vector a,
const Vector b,
const Vector c 
)
static

Calculates the area of a triangle.

Parameters
[in]aTriangle point A.
[in]bTriangle point B.
[in]cTriangle point C.
Returns
Unsigned triangle area.

◆ CalculateSignedTriangleArea() [1/2]

static MAXON_METHOD Float CalculateSignedTriangleArea ( const Vector a,
const Vector b,
const Vector c 
)
static

Calculates the signed area of an oriented triangle. Sign is defined as the sign of the z coordinate of the triangle normal vector.

Parameters
[in]aTriangle point A.
[in]bTriangle point B.
[in]cTriangle point C.
Returns
Unsigned triangle area.

◆ CalculateQuadrangleArea()

static MAXON_METHOD Float CalculateQuadrangleArea ( const Vector a,
const Vector b,
const Vector c,
const Vector d 
)
static

Calculates the area of a quadrangle.

Parameters
[in]aQuadrangle point A.
[in]bQuadrangle Point B.
[in]cQuadrangle Point C.
[in]dQuadrangle Point D.
Returns
Unsigned area of Quadrangle.

◆ CalculateOutlineArea()

static MAXON_METHOD Float CalculateOutlineArea ( const Block< const Vector > &  outlinePoints)
static

Calculates the unsigned area of an outline defined by points in outlinePoints. If the points are not co-planar, they will be flattened on a "best fit" plane.

Parameters
[in]outlinePointsAn array with a point sequence.
Returns
The outline area.

◆ CalculateOutlineNormal() [1/2]

static MAXON_METHOD Vector CalculateOutlineNormal ( const Block< const Vector > &  points,
const Block< const Int32 > &  indices,
Bool  normalized = true 
)
static

Calculates the normal of an ngon outline.

Parameters
[in]pointsA list of points that includes the outline points.
[in]indicesThe indices in the points list for the outline points to use. The order is important.
[in]normalizedIf true, the output normal will be normalized.
Returns
The normal of the point outline.

◆ CalculateOutlineNormal() [2/2]

static MAXON_METHOD Vector CalculateOutlineNormal ( const Block< const Vector > &  points,
Bool  normalize = true 
)
static

Calculates the normal of an ngon outline.

Parameters
[in]pointsThe correctly ordered points that include the points for the outline.
[in]normalizeIf true, the output normal will be normalized.
Returns
The normal of the point outline.

◆ IsVertexConvex()

static MAXON_METHOD Bool IsVertexConvex ( const Vector vertex,
const Vector next,
const Vector pred,
const Vector up = Vector(0, 1, 0) 
)
static

A convexity test for vertex in between 2 other vertices in 3D space.

Parameters
[in]vertexThe vertex to check.
[in]nextThe next point.
[in]predThe prev point.
[in]upUp vector or the normal of the polygon.
Returns
True if vertex is convex otherwise false, in case of aligned point (angle == PI) return true.

◆ CalculateMeanValueCoordinatesWeights() [1/2]

static MAXON_METHOD Result<void> CalculateMeanValueCoordinatesWeights ( const Vector point,
const Block< const Vector > &  outline,
WritableArrayInterface< Float > &  weights 
)
static

Calculates the mean value coordinates weights for a point inside an outline.

Parameters
[in]pointThe point for which to calculate weights.
[in]outlineThe outline.
[in]weightsArray of weights. The amount of entries in the resulting array is the same amount of outline vertices.
Returns
OK on success.

◆ IsVertexConvex2D()

static MAXON_METHOD Bool IsVertexConvex2D ( const Vector2d vertex,
const Vector2d next,
const Vector2d pred 
)
static

A convexity test for vertex in between two other vertices in 2D.

Parameters
[in]vertexThe vertex to check.
[in]nextThe next point.
[in]predThe prev point.
Returns
True if vertex is convex otherwise false, in case of aligned point (angle == PI) return true.

◆ CalculateBarycentricCoordinate()

static MAXON_METHOD Vector2d CalculateBarycentricCoordinate ( const Vector point,
const Vector a,
const Vector b,
const Vector c 
)
static

Calculates the barycentric UV coordinate of a point within a triangle.

Parameters
[in]pointThe point.
[in]aTriangle vertex A.
[in]bTriangle vertex B.
[in]cTriangle vertex C.
Returns
The barycentric point coordinate. 'x' component of the vector is the coordinate of the point c, 'y' component of the vector is the coordinate of the point b.

◆ CalculateBarycentricCoordinate3D()

static MAXON_METHOD Vector CalculateBarycentricCoordinate3D ( const Vector point,
const Vector a,
const Vector b,
const Vector c 
)
static

Calculates the barycentric UVW coordinate of a point within a triangle.

Parameters
[in]pointThe point.
[in]aTriangle vertex A.
[in]bTriangle vertex B.
[in]cTriangle vertex C.
Returns
The barycentric point coordinate.

◆ PointInTriangle()

static MAXON_METHOD Bool PointInTriangle ( const Vector point,
const Vector a,
const Vector b,
const Vector c 
)
static

Checks if a point is inside a triangle.

Parameters
[in]pointThe point to test.
[in]aTriangle vertex A.
[in]bTriangle vertex B.
[in]cTriangle vertex C.
Returns
True if point is inside the triangle.

◆ PointInTriangle2D()

static MAXON_METHOD Bool PointInTriangle2D ( const Vector2d point,
const Vector2d a,
const Vector2d b,
const Vector2d c 
)
static

Checks if a point is inside triangle in 2D.

Parameters
[in]pointThe point to test.
[in]aTriangle vertex A.
[in]bTriangle vertex B.
[in]cTriangle vertex C.
Returns
True if point is inside the triangle.

◆ GetPointInPolygonWindingNumber2D() [1/2]

static MAXON_METHOD Int GetPointInPolygonWindingNumber2D ( Vector2d  point,
const Block< const Vector2d > &  outline 
)
static

Checks if a point is inside an outline.

Parameters
[in]pointThe point ot test.
[in]outlineThe array with outline points.
Returns
The resulting winding number, 0 means point is outside.

◆ GetPointInPolygonWindingNumber2DExact()

static MAXON_METHOD Int GetPointInPolygonWindingNumber2DExact ( Vector2d  point,
const Block< const Vector2d > &  outline 
)
static

Checks if a point is inside an outline. Exact yet slower version.

Parameters
[in]pointThe point ot test.
[in]outlineThe array with outline points.
Returns
The resulting winding number, 0 means point is outside.

◆ GetPointInPolygonWindingNumber2D() [2/2]

static MAXON_METHOD Int GetPointInPolygonWindingNumber2D ( Vector2d  point,
const Block< const Vector2d > &  outline,
Int edgeHit 
)
static

Checks if a point is inside an outline.

Parameters
[in]pointThe point ot test.
[in]outlineThe array with outline points.
[out]edgeHitIn case point lies on an outline edge this will be filled with the edge index, otherwise maxon::InvalidArrayIndex.
Returns
The resulting winding number, 0 means point is outside.

◆ GetPointInPolygonWindingNumber() [1/2]

static MAXON_METHOD Int GetPointInPolygonWindingNumber ( Vector  point,
const Block< const Vector > &  outline 
)
static

Checks if a point is inside an outline. Accepts 3d vectors but assumes points to lie in xy plane.

Parameters
[in]pointThe point to test.
[in]outlineThe array with outline points.
Returns
The resulting winding number. 0 means point is outside.

◆ GetPointInPolygonWindingNumber() [2/2]

static MAXON_METHOD Int GetPointInPolygonWindingNumber ( Vector  point,
const Block< const Vector > &  outline,
Int edgeHit 
)
static

Checks if a point is inside an outline. Accepts 3d vectors but assumes points to lie in xy plane.

Parameters
[in]pointThe point to test.
[in]outlineThe array with outline points.
[out]edgeHitIn case point lies on an outline edge, this will be filled with the edge index. Otherwise the value maxon::InvalidArrayIndex is set.
Returns
The resulting winding number. 0 means point is outside.

◆ PointInOutline2D()

static MAXON_METHOD Bool PointInOutline2D ( const Vector point,
const Block< const Vector2d > &  outline 
)
static

Checks if a point is inside an outline.

Parameters
[in]pointThe point ot test.
[in]outlineThe array with outline points.
Returns
True if the point is inside the outline.

◆ CalculateBisector()

static MAXON_METHOD Vector CalculateBisector ( const Vector v1,
const Vector v2,
const Vector up = Vector(0, 1, 0),
Float  w1 = 1.0,
Float  w2 = 1.0 
)
static

Calculates the 3D bisector angle using an up vector to identify the sliding surface. A custom weight for each side can optionally be specified.

Parameters
[in]v1First vector.
[in]v2Second vector.
[in]upThe up vector.
[in]w1Optional weight value for v1.
[in]w2Optional weight value for v2.
Returns
The bisector angle vector.

◆ CalculateCircumcenter2D()

static MAXON_METHOD Bool CalculateCircumcenter2D ( const Vector2d a,
const Vector2d b,
const Vector2d c,
Vector2d center,
Float sqrRad,
Float  tolerance = GeomConstants::EPSILON4 
)
static

Calculates the circumcenter and radius of a planar triangle.

Parameters
[in]aTriangle point A.
[in]bTriangle point B.
[in]cTriangle point C.
[out]centerTriangle circumcenter.
[out]sqrRadSquared radius of the circle defined by the triangle points.
[in]toleranceGeometric linear tolerance for the operation.
Returns
False if the points are collinear or if the triangle is collapsed, true otherwise.

◆ CalculateCircumcenter()

static MAXON_METHOD Bool CalculateCircumcenter ( const Vector a,
const Vector b,
const Vector c,
Vector center,
Float rad,
Float  tolerance = GeomConstants::EPSILON4 
)
static

Calculates the circumcenter and radius of a triangle.

Parameters
[in]aTriangle point A.
[in]bTriangle point B.
[in]cTriangle point C.
[out]centerTriangle circumcenter.
[out]radRadius of the circle defined by the triangle points.
[in]toleranceGeometric linear tolerance for the operation.
Returns
False if the points are collinear or if the triangle is collapsed, true otherwise.

◆ SegmentsIntersectionTest2D()

static MAXON_METHOD Bool SegmentsIntersectionTest2D ( const Vector2d segment1Point1,
const Vector2d segment1Point2,
const Vector2d segment2Point1,
const Vector2d segment2Point2 
)
static

Checks if two segments intersect in 2D space.

Parameters
[in]segment1Point1First segment point 1.
[in]segment1Point2First segment point 2.
[in]segment2Point1Second segment point 1.
[in]segment2Point2Second segment point 2.
Returns
True if the segments intersect in 2D.

◆ IntersectsSegments2D()

static MAXON_METHOD Bool IntersectsSegments2D ( const Vector2d segment1Point1,
const Vector2d segment1Point2,
const Vector2d segment2Point1,
const Vector2d segment2Point2,
Vector2d intersectionPoint,
Float  tolerance = 0.0 
)
static

Checks if two segment intersect in 2D space and calculates the intersection point (if any).

Parameters
[in]segment1Point1First segment point.
[in]segment1Point2First segment point.
[in]segment2Point1Second segment point.
[in]segment2Point2Second segment point.
[out]intersectionPointCalculated intersection point in xy plane.
[in]toleranceGeometric linear tolerance for the operation by default = 0.0.
Returns
True if the segments intersect in 2D.

◆ LineLineDistance()

static MAXON_METHOD Vector LineLineDistance ( const Vector line1Point,
const Vector line1Dir,
const Vector line2Point,
const Vector line2Dir,
Bool parallel,
Float param1,
Float param2,
Float  tolerance = GeomConstants::EPSILON4 
)
static

Calculates min distance for given lines, fill param1/param2 with parametrized distance form first point.

Parameters
[in]line1PointA point on first line.
[in]line1DirFirst line direction vector.
[in]line2PointA point on second line.
[in]line2DirSecond line direction vector.
[out]parallelThe function set it true if the tow line are parallel.
[out]param1Parametrized distance from fist line first point where the distance is calculated (p = line1Point + !line1Dir * param1)
[out]param2Parametrized distance from second line first point where the distance is calculated (p = line2Point + !line2Dir * param2)
[in]toleranceGeometric linear tolerance for the operation.
Returns
Distance Vector.

◆ PointInSegment2D()

static MAXON_METHOD Bool PointInSegment2D ( const Vector2d point,
const Vector2d segmentPoint1,
const Vector2d segmentPoint2,
Float  tolerance 
)
static

Checks if a point is on a line segment in 2D. The tolerance value is used for the colinearity test only, not for the boundary test.

Parameters
[in]pointThe point to check.
[in]segmentPoint11st Segment point.
[in]segmentPoint22nd Segment point.
[in]toleranceGeometric linear tolerance for the operation.
Returns
True if point is on segment, otherwise false.

◆ PointInSegment()

static MAXON_METHOD Bool PointInSegment ( const Vector point,
const Vector segmentPoint1,
const Vector segmentPoint2,
Float  tolerance = GeomConstants::EPSILON4 
)
static

Checks if a point is on a line segment in 3D. The tolerance value is used for the colinearity test only, not for the boundary test.

Parameters
[in]pointThe point to check.
[in]segmentPoint11st Segment point.
[in]segmentPoint22nd Segment point.
[in]toleranceGeometric linear tolerance for the operation.
Returns
True if point is on segment, otherwise false.

◆ PointInHalfLine()

static MAXON_METHOD Bool PointInHalfLine ( const Vector point,
const Vector halfLineOrigin,
const Vector halfLineDir,
Float  tolerance = GeomConstants::EPSILON4 
)
static

Checks if a point is on a half line .

Parameters
[in]pointThe point to check.
[in]halfLineOriginHalf line origin.
[in]halfLineDirHalf line direction.
[in]toleranceGeometric linear tolerance for the operation.
Returns
True if point is on half line, otherwise false.

◆ IntersectLines()

static MAXON_METHOD Bool IntersectLines ( const Vector line1Point,
const Vector line1Dir,
const Vector line2Point,
const Vector line2Dir,
Vector intersectionPoint,
Float  tolerance = GeomConstants::EPSILON4 
)
static

Checks for intersection between two lines and fills intersectionPoint with the intersection position.

Parameters
[in]line1PointA point on 1st line.
[in]line1Dir1st line direction vector.
[in]line2PointA point on 2nd line.
[in]line2Dir2nd line direction vector.
[out]intersectionPointResulting intersection position if intersection happens.
[in]toleranceGeometric linear tolerance for the operation.
Returns
True if an intersection happens otherwise false.

◆ IntersectLineSegment()

static MAXON_METHOD Bool IntersectLineSegment ( const Vector linePoint,
const Vector lineDir,
const Vector segmentPoint1,
const Vector segmentPoint2,
Vector intersectionPoint,
Float  tolerance = GeomConstants::EPSILON4 
)
static

Checks for line vs. segment intersection and fills intersection with the intersection position.

Parameters
[in]linePointA point on the line.
[in]lineDirLine direction vector.
[in]segmentPoint1First segment point.
[in]segmentPoint2Second segment point.
[out]intersectionPointResulting intersection position if intersection happens.
[in]toleranceGeometric linear tolerance for the operation.
Returns
True if an intersection happens otherwise false.

◆ IntersectSegments()

static MAXON_METHOD Bool IntersectSegments ( const Vector segment1Point1,
const Vector segment1Point2,
const Vector segment2Point1,
const Vector segment2Point2,
Vector intersectionPoint,
Float  tolerance = GeomConstants::EPSILON4 
)
static

Checks for segment vs. segment intersection and fills intersection with the intersection position.

Parameters
[in]segment1Point1First Segment first point.
[in]segment1Point2First Segment second point.
[in]segment2Point1Second Segment first point.
[in]segment2Point2Second Segment second point.
[out]intersectionPointResulting intersection position if intersection happens.
[in]toleranceGeometric linear tolerance for the operation.
Returns
True if an intersection happens otherwise false.

◆ IntersectHalfLines()

static MAXON_METHOD Bool IntersectHalfLines ( const Vector halfLine1Origin,
const Vector halfLine1Dir,
const Vector halfLine2Origin,
const Vector halfLine2Dir,
Vector intersectionPoint,
Float  tolerance = GeomConstants::EPSILON4 
)
static

Checks for halfline/halfline intersection and fills intersectionPoint with the intersection position.

Parameters
[in]halfLine1OriginStart point 1st half line.
[in]halfLine1Dir1st half line direction vector.
[in]halfLine2OriginStart point 2nd half line.
[in]halfLine2Dir2nd half line direction vector.
[out]intersectionPointResulting intersection position if intersection happens.
[in]toleranceGeometric linear tolerance for the operation.
Returns
True if an intersection happens otherwise false.

◆ IntersectLineHalfLine()

static MAXON_METHOD Bool IntersectLineHalfLine ( const Vector linePoint,
const Vector lineDir,
const Vector halfLineOrigin,
const Vector halfLineDir,
Vector intersectionPoint,
Float  tolerance = GeomConstants::EPSILON4 
)
static

Checks for line/halfline intersection and fills intersectionPoint with the intersection position.

Parameters
[in]linePointA point on the line.
[in]lineDirLine direction vector.
[in]halfLineOriginStart point of Half line.
[in]halfLineDirHalf line direction vector.
[out]intersectionPointIntersection position if intersection happens.
[in]toleranceGeometric linear tolerance for the operation.
Returns
True if an intersection happens otherwise false.

◆ IntersectHalfLineSegment()

static MAXON_METHOD Bool IntersectHalfLineSegment ( const Vector halfLineOrigin,
const Vector halfLineDir,
const Vector segmentPoint1,
const Vector segmentPoint2,
Vector intersectionPoint,
Float  tolerance = GeomConstants::EPSILON4 
)
static

Checks for halfLine/segment Intersection and fills intersectionPoint with the intersection position.

Parameters
[in]halfLineOriginStart point of Half line.
[in]halfLineDirHalf line direction vector.
[in]segmentPoint1First Segment point.
[in]segmentPoint2Second Segment point.
[out]intersectionPointIntersection position if intersection happens.
[in]toleranceGeometric linear tolerance for the operation.
Returns
True if an intersection happens otherwise false.

◆ IntersectPlanes()

static MAXON_METHOD Bool IntersectPlanes ( const Vector plane1Point,
const Vector plane1Normal,
const Vector plane2Point,
const Vector plane2Normal,
Vector resLinePoint,
Vector resLineDirection,
Float  tolerance = GeomConstants::EPSILON4 
)
static

Checks for plane/plane intersection and fills the intersection line.

Parameters
[in]plane1PointPlane 1 point.
[in]plane1NormalPlane 1 normal.
[in]plane2PointPlane 2 point.
[in]plane2NormalPlane 2 normal.
[out]resLinePointA point on the intersection line.
[out]resLineDirectionIntersection line direction.
[in]toleranceGeometric linear tolerance for the operation.
Returns
True if an intersection happens otherwise false.

◆ IntersectLinePlane() [1/2]

static MAXON_METHOD Bool IntersectLinePlane ( const Vector linePoint,
const Vector lineDir,
const Vector planePoint,
const Vector planeNormal,
Vector intersectionPoint,
Float  tolerance = GeomConstants::EPSILON4 
)
static

Checks for plane/Line intersection and fills intersectionPoint with the intersection position.

Parameters
[in]linePointA point on line.
[in]lineDirLine direction vector.
[in]planePointPlane point.
[in]planeNormalPlane normal.
[out]intersectionPointIntersection position if intersection happens.
[in]toleranceGeometric linear tolerance for the operation.
Returns
True if an intersection happens otherwise false. (line is parallel or lie on the plane)

◆ IntersectLinePlane() [2/2]

static MAXON_METHOD Bool IntersectLinePlane ( const Vector linePoint,
const Vector lineDir,
const Vector planePoint,
const Vector planeNormal,
Vector intersectionPoint,
Float param,
Bool samePlane,
Float  tolerance = GeomConstants::EPSILON4 
)
static

Checks for plane/line intersection and fills intersectionPoint with the intersection position.

Parameters
[in]linePointA point on line.
[in]lineDirLine direction vector.
[in]planePointPlane point.
[in]planeNormalPlane normal.
[out]intersectionPointIntersection position if intersection happens.
[in]toleranceGeometric linear tolerance for the operation.
Returns
True if an intersection happens otherwise false. (line is parallel or lie on the plane)

◆ IntersectSegmentPlane()

static MAXON_METHOD Bool IntersectSegmentPlane ( const Vector segmentPoint1,
const Vector segmentPoint2,
const Vector planePoint,
const Vector planeNormal,
Vector intersectionPoint,
Float  tolerance = GeomConstants::EPSILON4 
)
static

Checks for plane/segment intersection and fills intersectionPoint with the intersection position.

Parameters
[in]segmentPoint1Segment point 1.
[in]segmentPoint2Segment point 2.
[in]planePointPlane point.
[in]planeNormalPlane normal.
[out]intersectionPointIntersection position if intersection happens.
[in]toleranceGeometric linear tolerance for the operation.
Returns
True if an intersection happens otherwise false.

◆ IntersectHalfLinePlane()

static MAXON_METHOD Bool IntersectHalfLinePlane ( const Vector halfLinePoint,
const Vector halfLineDir,
const Vector planePoint,
const Vector planeNormal,
Vector intersectionPoint,
Float  tolerance = GeomConstants::EPSILON4 
)
static

Checks for plane/halfline intersection and fills intersectionPoint with the intersection position.

Parameters
[in]halfLinePointHalf line Origin.
[in]halfLineDirHalf line direction vector.
[in]planePointPlane point.
[in]planeNormalPlane normal.
[out]intersectionPointIntersection position if intersection happens.
[in]toleranceGeometric linear tolerance for the operation.
Returns
True if an intersection happens otherwise false.

◆ IntersectLineTriangle()

static MAXON_METHOD Bool IntersectLineTriangle ( const Vector linePoint,
const Vector lineDir,
const Vector a,
const Vector b,
const Vector c,
Vector intersectionPoint,
Vector2d barycCoords = nullptr,
Float  tolerance = GeomConstants::EPSILON4 
)
static

Checks for line/triangle intersection and fills intersectionPoint with the intersection position.

Parameters
[in]linePointA point on the line.
[in]lineDirThe line direction vector.
[in]aTriangle vertex.
[in]bTriangle vertex.
[in]cTriangle vertex.
[out]intersectionPointIntersection position if intersection happens.
[out]barycCoordsIn case of intersection the pointr is filled with barycentric coordinates of the hit point, can be nullptr.
[in]toleranceGeometric linear tolerance for the operation.
Returns
True if an intersection happens otherwise false.

◆ IntersectHalfLineTriangle()

static MAXON_METHOD Bool IntersectHalfLineTriangle ( const Vector halfLineOrigin,
const Vector halfLineDir,
const Vector a,
const Vector b,
const Vector c,
Vector intersectionPoint,
Vector2d barycCoords = nullptr,
Float  tolerance = GeomConstants::EPSILON4 
)
static

Checks for halfline/triangle intersection and fills intersectionPoint with the intersection position.

Parameters
[in]halfLineOriginHalf line origin point.
[in]halfLineDirThe half line direction vector.
[in]aTriangle vertex.
[in]bTriangle vertex.
[in]cTriangle vertex.
[out]intersectionPointIntersection position if intersection happens.
[out]barycCoordsIn case of intersection the pointr is filled with barycentric coordinates of the hit point, can be nullptr.
[in]toleranceGeometric linear tolerance for the operation.
Returns
True if an intersection happens otherwise false.

◆ IntersectLineQuadrangle()

static MAXON_METHOD Bool IntersectLineQuadrangle ( const Vector linePoint,
const Vector lineDir,
const Vector a,
const Vector b,
const Vector c,
const Vector d,
Vector intersectionPoint,
Float  tolerance = GeomConstants::EPSILON4 
)
static

Checks for line/quadrangle intersection and fills intersectionPoint with the intersection position.

Parameters
[in]linePointA point on the line.
[in]lineDirThe line direction vector.
[in]aQuadrangle vertex.
[in]bQuadrangle vertex.
[in]cQuadrangle vertex.
[in]dQuadrangle vertex.
[out]intersectionPointIntersection position if intersection happens.
[in]toleranceGeometric linear tolerance for the operation.
Returns
True if an intersection happens otherwise false.

◆ IntersectHalfLineQuadrangle()

static MAXON_METHOD Bool IntersectHalfLineQuadrangle ( const Vector halfLineOrigin,
const Vector halfLineDir,
const Vector a,
const Vector b,
const Vector c,
const Vector d,
Vector intersectionPoint,
Float  tolerance = GeomConstants::EPSILON4 
)
static

Checks for halfline/quadrangle intersection and fills intersectionPoint with the intersection position.

Parameters
[in]halfLineOriginHalf line origin point.
[in]halfLineDirThe half line direction vector.
[in]aQuadrangle vertex.
[in]bQuadrangle vertex.
[in]cQuadrangle vertex.
[in]dQuadrangle vertex.
[out]intersectionPointIntersection position if intersection happens.
[in]toleranceGeometric linear tolerance for the operation.
Returns
True if an intersection happens otherwise false.

◆ IntersectSegmentTriangle()

static MAXON_METHOD Bool IntersectSegmentTriangle ( const Vector segmentPoint1,
const Vector segmentPoint2,
const Vector a,
const Vector b,
const Vector c,
Vector intersectionPoint,
Vector barycCoords = nullptr,
Float  tolerance = GeomConstants::EPSILON4 
)
static

Checks for linesegment/triangle intersection and fills intersectionPoint with the intersection position.

Parameters
[in]segmentPoint1Segment point.
[in]segmentPoint2Segment point.
[in]aTriangle vertex.
[in]bTriangle vertex.
[in]cTriangle vertex.
[out]intersectionPointIntersection position if intersection happens.
[out]barycCoordsIn case of intersection the pointr is filled with barycentric coordinates of the hit point, can be nullptr.
[in]toleranceGeometric linear tolerance for the operation.
Returns
True if an intersection happens otherwise false.

◆ TrianglesIntersectionTest()

static MAXON_METHOD Bool TrianglesIntersectionTest ( const Vector t1a,
const Vector t1b,
const Vector t1c,
const Vector t2a,
const Vector t2b,
const Vector t2c,
Float  tolerance = GeomConstants::EPSILON4 
)
static

Checks if 2 triangles intersect.

Parameters
[in]t1aTriangle 1 vertex.
[in]t1bTriangle 1 vertex.
[in]t1cTriangle 1 vertex.
[in]t2aTriangle 2 vertex.
[in]t2bTriangle 2 vertex.
[in]t2cTriangle 2 vertex.
[in]toleranceGeometric linear tolerance for the operation.
Returns
True if an intersection happens otherwise false.

◆ CalculatePolygonPointST()

static MAXON_METHOD Bool CalculatePolygonPointST ( const Vector point,
const Vector pa,
const Vector pb,
const Vector pc,
const Vector pd,
Bool  isQuad,
Float s,
Float t,
Float  tolerance = GeomConstants::EPSILON4 
)
static

Calculates a S/T coordinate for a given 3D point and polygon in the polygon plane. The 3D point needs to be on the plane that is defined by the polygon. The function is just a 2d evaluation so not coplanar polygons need to be evaluated by projecting vertex on best fit plane.

Parameters
[in]pointThe point to find s and t.
[in]paPolygon point.
[in]pbPolygon point.
[in]pcPolygon point.
[in]pdPolygon point.
[in]isQuadIf true evaluate using a quadrangle, otherwise ignore pd and use a triangle.
[out]sThe resulting s coordinate, or MINVLAUE_FLOAT if the functions fail.
[out]tThe resulting t coordinate, or MINVLAUE_FLOAT if the functions fail.
[in]toleranceGeometric linear tolerance for the operation, used to define if the point is inside of polygon or not.
Returns
True if the point is in the polygon boundary otherwise false (negative s or t values).

◆ InverseBilinarInterpolate()

static MAXON_METHOD void InverseBilinarInterpolate ( const Vector pa,
const Vector pb,
const Vector pc,
const Vector pd,
const Vector point,
Vector2d bilinarVariables 
)
static

Calculates the bilinear coordinates of a point in a quad. The quad is defined by the points pa, pb, pc and pd.

Parameters
[in]paPolygon point.
[in]pbPolygon point.
[in]pcPolygon point.
[in]pdPolygon point.
[in]pointThe point to find the bilinear interpolation values for.
[out]bilinarVariablesThe resulting coordinates.

◆ InverseBilinarInterpolateNewton()

static MAXON_METHOD void InverseBilinarInterpolateNewton ( const Vector pa,
const Vector pb,
const Vector pc,
const Vector pd,
const Vector point,
Int32  iterations,
Vector2d bilinarVariables 
)
static

Calculates the bilinear coordinates of a point in a quad with a Newton iteration method. The quad is defined by the points pa, pb, pc and pd.

Parameters
[in]paPolygon point.
[in]pbPolygon point.
[in]pcPolygon point.
[in]pdPolygon point.
[in]pointThe point to find the bilinear interpolation values for.
[in]iterationsThe iteration count of the Newton iteration.
[out]bilinarVariablesThe resulting coordinates.

◆ InverseBilinarInterpolate2D()

static MAXON_METHOD void InverseBilinarInterpolate2D ( const Vector2d pa,
const Vector2d pb,
const Vector2d pc,
const Vector2d pd,
const Vector2d point,
Vector2d bilinarVariables 
)
static

Calculates the bilinear coordinates of a 2d point in a 2d quad. The quad is defined by the points pa, pb, pc and pd.

Parameters
[in]paPolygon 2d point.
[in]pbPolygon 2d point.
[in]pcPolygon 2d point.
[in]pdPolygon 2d point.
[in]pointThe 2d point to find the bilinear interpolation values for.
[out]bilinarVariablesThe resulting coordinates.

◆ InverseBilinarInterpolate2DNewton()

static MAXON_METHOD void InverseBilinarInterpolate2DNewton ( const Vector2d pa,
const Vector2d pb,
const Vector2d pc,
const Vector2d pd,
const Vector2d point,
Int32  iterations,
Vector2d bilinarVariables 
)
static

Calculates the bilinear coordinates of a 2d point in a 2d quad with a Newton iteration method. The quad is defined by the points pa, pb, pc and pd.

Parameters
[in]paPolygon 2d point.
[in]pbPolygon 2d point.
[in]pcPolygon 2d point.
[in]pdPolygon 2d point.
[in]pointThe 2d point to find the bilinear interpolation values for.
[in]iterationsThe iteration count of the Newton iteration.
[out]bilinarVariablesThe resulting coordinates.

◆ BilinearInterpolate()

static MAXON_METHOD Vector BilinearInterpolate ( const Vector pa,
const Vector pb,
const Vector pc,
const Vector pd,
const Float  s,
const Float  t 
)
static

Calculates the bilinear interpolation within a quad. The quad is defined by the points pa, pb, pc and pd.

Parameters
[in]paPolygon point.
[in]pbPolygon point.
[in]pcPolygon point.
[in]pdPolygon point.
[in]sThe first bilinar coordinate.
[in]tThe second bilinear coordinate.
Returns
The point in space with these bilinear coordinates relative to the quad pa, pb, pc and pd.

◆ CalculateSignedTriangleArea() [2/2]

static MAXON_METHOD Float CalculateSignedTriangleArea ( const Vector a,
const Vector b,
const Vector c,
const Vector normal 
)
static

Calculates the signed area of an oriented triangle. Sign is defined as the sign of the z coordinate of the triangle normal vector.

Parameters
[in]aTriangle point A.
[in]bTriangle point B.
[in]cTriangle point C.
[in]normalThe reference normal to calculate the sign.
Returns
Unsigned triangle area.

◆ CalculateMeanValueCoordinatesWeights() [2/2]

static MAXON_METHOD Result<void> CalculateMeanValueCoordinatesWeights ( const Vector point,
const Block< const Vector > &  outline,
const Vector normal,
WritableArrayInterface< Float > &  weights 
)
static

Calculates the mean value coordinates weights for a point inside an outline.

Parameters
[in]pointThe point for which to calculate weights.
[in]outlineThe outline.
[in]normalThe normal direction of the outline.
[in]weightsArray of weights. The amount of entries in the resulting array is the same amount of outline vertices.
Returns
OK on success.