Navigation
API > API/Plugins > API/Plugins/ModelingComponents > API/Plugins/ModelingComponents/UCurveControlPointsMechanic
We want some way to store the control point sequence that lets us easily associate points with their renderable and hit-testable representations, since we need to alter all of these together as points get moved or added. We use FOrderedPoints for this, until we decide on how we want to store sequences of points in general. FOrderedPoints maintains a sequence of point ID's, the positions associated with each ID, and a mapping back from ID to position. The ID's can then be used to match to renderable points, hit-testable points, and segments going to the next point. A sequence of 3-component vectors that can be used to represent a polyline in 3d space, or some other sequence of control points in 3d space.
The sequence is determined by a sequence of point IDs which can be used to look up the point coordinates.
| Name | FOrderedPoints |
| Type | class |
| Header File | /Engine/Plugins/Runtime/MeshModelingToolset/Source/ModelingComponents/Public/Mechanics/CurveControlPointsMechanic.h |
| Include Path | #include "Mechanics/CurveControlPointsMechanic.h" |
Syntax
class FOrderedPoints
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Mechanics/CurveControlPointsMechanic.h | |||
FOrderedPoints
(
const FOrderedPoints& ToCopy |
Mechanics/CurveControlPointsMechanic.h | ||
FOrderedPoints
(
const TArray< FVector3d >& PointSequence |
Mechanics/CurveControlPointsMechanic.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| PointIDEnumerable | const TArray< int32 > & | TODO: We should have a proper iterable to iterate over point ID's (and maybe one to iterate over point coordinates too. We're temporarily taking a shortcut by using the actual sequence array as our iterable, but only until we've decided on the specifics of the class. | Mechanics/CurveControlPointsMechanic.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
int32 AppendPoint
(
const FVector3d& PointCoordinates |
Appends a point with the given coordinates to the end of the sequence. | Mechanics/CurveControlPointsMechanic.h | |
void Empty() |
Delete all points in the sequence. | Mechanics/CurveControlPointsMechanic.h | |
int32 First() |
Mechanics/CurveControlPointsMechanic.h | ||
FVector3d GetPointCoordinates
(
int32 PointID |
Mechanics/CurveControlPointsMechanic.h | ||
FVector3d GetPointCoordinatesAt
(
int32 SequencePosition |
Mechanics/CurveControlPointsMechanic.h | ||
int32 GetPointIDAt
(
int32 SequencePosition |
Mechanics/CurveControlPointsMechanic.h | ||
int32 GetSequencePosition
(
int32 PointID |
Mechanics/CurveControlPointsMechanic.h | ||
int32 InsertPointAt
(
int32 SequencePosition, |
Inserts a point with the given coordinates at the given position in the sequence. | Mechanics/CurveControlPointsMechanic.h | |
bool IsValidPoint
(
int32 PointID |
Checks whether given point ID exists in the sequence. | Mechanics/CurveControlPointsMechanic.h | |
int32 Last() |
Mechanics/CurveControlPointsMechanic.h | ||
int32 Num() |
Mechanics/CurveControlPointsMechanic.h | ||
PointIDEnumerable PointIDItr() |
This function should only be used to iterate across the point id's in sequence in a range-based for-loop as in "for (int32 PointID : PointSequence->PointIDItr()) { ... }" The return type of this function is likely to change, but it will continue to work in range-based for-loops. | Mechanics/CurveControlPointsMechanic.h | |
int32 RemovePointAt
(
int32 SequencePosition |
Removes the point at a particular position in the sequence. | Mechanics/CurveControlPointsMechanic.h | |
void SetPointCoordinates
(
int32 PointID, |
Change the coordinates associated with a given point ID. | Mechanics/CurveControlPointsMechanic.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ReInitialize
(
const TArray< FVector3d >& PointSequence |
Mechanics/CurveControlPointsMechanic.h |