Navigation
API > API/Runtime > API/Runtime/GeometryCore
TPolyline represents a dimensional independent polyline stored as a list of Vertices.
| Name | TPolyline |
| Type | class |
| Header File | /Engine/Source/Runtime/GeometryCore/Public/Polyline.h |
| Include Path | #include "Polyline.h" |
Syntax
template<typename T, int D>
class TPolyline
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Construct polyline with given list of vertices | Polyline.h | ||
TPolyline () |
Polyline.h | ||
TPolyline
(
const VectorType& Point0, |
Construct a single-segment polyline | Polyline.h |
Classes
| Name | Remarks |
|---|---|
| SegmentEnumerable | Wrapper around SegmentIterator that has begin() and end() suitable for range-based for loop |
| SegmentIterator | SegmentIterator is used to iterate over the segments of the polyline |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| BoxType | TPolylinePolicy< T, D >::BoxType | Polyline.h | |
| SegmentType | TPolylinePolicy< T, D >::SegmentType | Polyline.h | |
| VectorType | TPolylinePolicy< T, D >::VectorType | Polyline.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AppendVertex
(
const VectorType& Position |
Add a vertex to the polyline | Polyline.h | |
void AppendVertices
(
const TArray< OtherVectorType >& NewVertices |
Add a list of Vertices to the polyline | Polyline.h | |
void AppendVertices
(
const TArray< VectorType >& NewVertices |
Add a list of Vertices to the polyline | Polyline.h | |
T AverageEdgeLength() |
Polyline.h | ||
void Clear() |
Discard all vertices of polyline | Polyline.h | |
T DistanceSquared
(
const VectorType& QueryPoint |
Calculate the squared distance from a point to the polyline | Polyline.h | |
T DistanceSquared
(
const VectorType& QueryPoint, |
Calculate the squared distance from a point to the polyline | Polyline.h | |
const VectorType & End() |
Polyline.h | ||
BoxType GetBounds() |
Polyline.h | ||
VectorType GetPointFromFirstVertex
(
const T InDistance |
Compute a point on the polyline based on its distance from the first vertex | Polyline.h | |
VectorType GetPointFromLastVertex
(
const T InDistance |
Compute a point on the polyline based on its distance from the last vertex | Polyline.h | |
SegmentType GetSegment
(
int SegmentIndex |
Polyline.h | ||
VectorType GetSegmentPoint
(
int SegmentIndex, |
Polyline.h | ||
VectorType GetSegmentPointUnitParam
(
int SegmentIndex, |
Polyline.h | ||
VectorType GetTangent
(
int VertexIndex |
Get the tangent vector at a vertex of the polyline, which is the normalized vector from the previous vertex to the next vertex | Polyline.h | |
const TArray< VectorType > & GetVertices() |
Polyline.h | ||
T Length() |
Polyline.h | ||
void RemoveVertex
(
int VertexIndex |
Remove a vertex of the polyline (existing Vertices are shifted) | Polyline.h | |
void Reverse() |
Reverse the order of the Vertices in the polyline (ie switch between Clockwise and CounterClockwise) | Polyline.h | |
int SegmentCount() |
Polyline.h | ||
SegmentIterator SegmentItr() |
Polyline.h | ||
SegmentEnumerable Segments() |
Polyline.h | ||
void Set
(
int VertexIndex, |
Set vertex at given index to a new Position | Polyline.h | |
void SetVertices
(
const TArray< VectorType >& NewVertices |
Replace the list of Vertices with a new list | Polyline.h | |
void Simplify
(
T ClusterTolerance, |
Simplify the Polyline to reduce the vertex count | Polyline.h | |
void SmoothSubdivide
(
TPolyline< T, D >& NewPolyline |
Produce a new polyline that is smoother than this one | Polyline.h | |
const VectorType & Start() |
Polyline.h | ||
int VertexCount() |
Polyline.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void SimplifyDouglasPeucker
(
T Tolerance, |
Polygon simplification code adapted from: http://softsurfer.com/Archive/algorithm_0205/algorithm_0205.htm simplifyDP(): This is the Douglas-Peucker recursive simplification routine It just marks Vertices that are part of the simplified polyline for approximating the polyline subchain v[j] to v[k]. | Polyline.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
VectorType & operator[]
(
int Index |
Get the vertex at a given index | Polyline.h | |
const VectorType & operator[]
(
int Index |
Get the vertex at a given index | Polyline.h |