![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
Functions | |
| template<typename RealType , typename VectorType , bool bLoop> | |
| void | GetPrevNext (const TArrayView< const VectorType > &Vertices, int32 Idx, VectorType &OutPrev, VectorType &OutNext) |
| template<typename RealType , typename VectorType , bool bLoop> | |
| void | GetVectorsToPrevNext (const TArrayView< const VectorType > &Vertices, int32 VertexIndex, VectorType &OutToPrev, VectorType &OutToNext, bool bNormalize) |
| template<typename RealType , typename VectorType > | |
| void | GetVectorsToPrevNext (const TArrayView< const VectorType > &Vertices, int32 VertexIndex, VectorType &OutToPrev, VectorType &OutToNext, bool bNormalize, bool bLoop) |
| template<typename RealType , typename VectorType , bool bLoop> | |
| VectorType | Tangent (const TArrayView< const VectorType > &Vertices, int32 Idx) |
| template<typename RealType , typename VectorType > | |
| VectorType | Tangent (const TArrayView< const VectorType > &Vertices, int32 Idx, bool bLoop=false) |
| template<typename RealType , typename VectorType , bool bLoop> | |
| VectorType | GetNormal_FaceAvg2 (const TArrayView< const VectorType > &Vertices, int VertexIndex) |
| template<typename RealType , typename VectorType > | |
| RealType | SignedArea2 (const TArrayView< const VectorType > &Vertices) |
| template<typename RealType , typename VectorType > | |
| RealType | WindingIntegral2 (const TArrayView< const VectorType > &Vertices, const VectorType &QueryPoint) |
| template<typename RealType , typename VectorType > | |
| bool | Contains2 (const TArrayView< const VectorType > &Vertices, const VectorType &QueryPoint) |
| template<typename RealType , typename VectorType > | |
| int | FindNearestIndex (const TArrayView< const VectorType > &Vertices, const VectorType &V) |
| template<typename RealType , typename VectorType > | |
| bool | IsConvex2 (const TArrayView< const VectorType > Vertices, RealType Tolerance=TMathUtil< RealType >::ZeroTolerance, bool bDegenerateIsConvex=true) |
| template<typename RealType > | |
| bool | ProjectPointInsideConvexPolygon (const TArrayView< const TVector2< RealType > > Vertices, TVector2< RealType > &ProjPt, bool bReverseOrientation=false) |
| template<typename RealType , typename VectorType > | |
| void | InPlaceSmooth (TArrayView< VectorType > Vertices, int StartIdx, int EndIdx, double Alpha, int NumIterations, bool bClosed) |
| template<typename RealType , typename VectorType > | |
| void | IterativeSmooth (TArrayView< VectorType > Vertices, int StartIdx, int EndIdx, double Alpha, int NumIterations, bool bClosed) |
| bool UE::Geometry::CurveUtil::Contains2 | ( | const TArrayView< const VectorType > & | Vertices, |
| const VectorType & | QueryPoint | ||
| ) |
| int UE::Geometry::CurveUtil::FindNearestIndex | ( | const TArrayView< const VectorType > & | Vertices, |
| const VectorType & | V | ||
| ) |
| VectorType UE::Geometry::CurveUtil::GetNormal_FaceAvg2 | ( | const TArrayView< const VectorType > & | Vertices, |
| int | VertexIndex | ||
| ) |
Construct a normal at a vertex of the Polygon by averaging the adjacent face normals. This vector is independent of the lengths of the adjacent segments. Points "inward" for a Clockwise Polygon, and outward for CounterClockwise Note: Specific to 2D curves; normals computed by rotating tangents in the XY plane
|
inline |
Curve utility functions Get (by reference) the vertices surrounding the given vertex index If bLoop is false and the Prev or Next vertex would be out of bounds, the vertex at Idx is used instead.
|
inline |
Get (by reference) vectors pointing toward the given vertex index, from its surrounding vertices If bLoop is false and the Prev or Next vertex would be out of bounds, a zero vector is used instead
|
inline |
Get (by reference) vectors pointing toward the given vertex index, from its surrounding vertices If bLoop is false and the Prev or Next vertex would be out of bounds, a zero vector is used instead
| void UE::Geometry::CurveUtil::InPlaceSmooth | ( | TArrayView< VectorType > | Vertices, |
| int | StartIdx, | ||
| int | EndIdx, | ||
| double | Alpha, | ||
| int | NumIterations, | ||
| bool | bClosed | ||
| ) |
smooth vertices in-place (will not produce a symmetric result, but does not require extra buffer)
| bool UE::Geometry::CurveUtil::IsConvex2 | ( | const TArrayView< const VectorType > | Vertices, |
| RealType | Tolerance = TMathUtil<RealType>::ZeroTolerance, |
||
| bool | bDegenerateIsConvex = true |
||
| ) |
Tests closed, 2D curve for convexity, with an optional tolerance allowing for approximately-collinear points Note that tolerance is per vertex angle, so a very-finely-sampled smooth concavity could be reported as convex
| RadiansTolerance | Maximum turn in the 'wrong' direction that will still be considered convex (in radians) |
| bDegenerateIsConvex | What to return for degenerate input (less than 3 points or equivalent due to repeated points) |
| void UE::Geometry::CurveUtil::IterativeSmooth | ( | TArrayView< VectorType > | Vertices, |
| int | StartIdx, | ||
| int | EndIdx, | ||
| double | Alpha, | ||
| int | NumIterations, | ||
| bool | bClosed | ||
| ) |
smooth set of vertices using extra buffer
| bool UE::Geometry::CurveUtil::ProjectPointInsideConvexPolygon | ( | const TArrayView< const TVector2< RealType > > | Vertices, |
| TVector2< RealType > & | ProjPt, | ||
| bool | bReverseOrientation = false |
||
| ) |
Project point inside a convex polygon with known orientation
| ProjPt | Point to project |
| bReverseOrientation | Whether convex polygon orientation is reversed (i.e., has negative signed area) |
| RealType UE::Geometry::CurveUtil::SignedArea2 | ( | const TArrayView< const VectorType > & | Vertices | ) |
Compute the signed area of a closed curve, assuming vertices in the XY plane
|
inline |
|
inline |
| RealType UE::Geometry::CurveUtil::WindingIntegral2 | ( | const TArrayView< const VectorType > & | Vertices, |
| const VectorType & | QueryPoint | ||
| ) |
Compute the winding of a point relative to a closed curve, assuming vertices in the XY plane