Navigation
API > API/Editor > API/Editor/CurveEditor
This class facilitates the movement of a dragged edge and recalculates the key heights for all specified keys. The heights are linearly interpolated, ensuring that if the dragged edge crosses to the opposite side of the mirror edge, the keys will flip to the other side.
Inputs:
- Height of the dragged edge aligned to the x-axis
- Height of the x-axis-aligned mirror edge
- Keys originally located between the dragged and mirror edges
Example: Given a grid with a single key at a height 100, moving the top edge:
- An equal distance past the bottom edge will result in a height of -100 for the key.
- Halfway between the starting position and the bottom edge will result in a height of 50 for the key.
This class only recalculates key positions. To adjust the tangents of the keys use e.g. FTangentMirrorSolver.
| Name | FPositionMirrorSolver |
| Type | class |
| Header File | /Engine/Source/Editor/CurveEditor/Public/Misc/Mirror/PositionMirrorSolver.h |
| Include Path | #include "Misc/Mirror/PositionMirrorSolver.h" |
Syntax
class FPositionMirrorSolver
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FPositionMirrorSolver
(
FCurveEditor&InCurveEditor UE_LIFETIMEBOUND, |
InStartY and InMiddlePointY define two imaginary, x-axis aligned lines. | Misc/Mirror/PositionMirrorSolver.h |
Structs
| Name | Remarks |
|---|---|
| FCachedCurveData |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AllCurveData | TMap< FCurveModelID, FCachedCurveData > | This memory is reuse across OnMoveEdge to hold the updated tangents. | Misc/Mirror/PositionMirrorSolver.h | |
| CurveEditor | FCurveEditor & | Used to set tangents angles. | Misc/Mirror/PositionMirrorSolver.h | |
| MiddlePointY | const double | Height of the mirroring line. | Misc/Mirror/PositionMirrorSolver.h | |
| StartY | const double | Height of the dragged line. | Misc/Mirror/PositionMirrorSolver.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool AddKeyPositions
(
const FCurveModelID& InCurveId, |
Adds key positions that are to be mirrored. | Misc/Mirror/PositionMirrorSolver.h | |
void OnMoveEdge
(
double InDraggedEdgeHeight |
Recomputes the tangents angles and updates the key attributes. | Misc/Mirror/PositionMirrorSolver.h |