Class FlexalonCurveLayout
- Namespace
- Flexalon
- Assembly
- Flexalon.dll
Use a curve layout to position children along a bézier curve.
public class FlexalonCurveLayout : LayoutBase, Layout
- Inheritance
-
objectFlexalonCurveLayout
- Implements
- Inherited Members
Fields
EditorHovered
public int EditorHovered
Field Value
- int
Properties
AfterEnd
Offsets all objects along the curve.
public FlexalonCurveLayout.ExtendBehavior AfterEnd { get; set; }
Property Value
BeforeStart
Offsets all objects along the curve.
public FlexalonCurveLayout.ExtendBehavior BeforeStart { get; set; }
Property Value
CurveLength
The length of the curve.
public float CurveLength { get; }
Property Value
- float
CurvePositions
Points along the curve used to position objects and can be used for visualization.
public IReadOnlyList<Vector3> CurvePositions { get; }
Property Value
- IReadOnlyList<Vector3>
LockPositions
Prevents the position handles from appearing in the editor.
public bool LockPositions { get; set; }
Property Value
- bool
LockTangents
Prevents the tangent handles from appearing in the editor.
public bool LockTangents { get; set; }
Property Value
- bool
Points
The points that define the curve.
public IReadOnlyList<FlexalonCurveLayout.CurvePoint> Points { get; }
Property Value
- IReadOnlyList<CurvePoint>
Rotation
Determines how children should be rotated
public FlexalonCurveLayout.RotationOptions Rotation { get; set; }
Property Value
Spacing
Determines the fixed distance between children.
public float Spacing { get; set; }
Property Value
- float
SpacingType
Determines how the children will be spaced along the curve.
public FlexalonCurveLayout.SpacingOptions SpacingType { get; set; }
Property Value
StartAt
Offsets all objects along the curve.
public float StartAt { get; set; }
Property Value
- float
Methods
AddPoint(CurvePoint)
Adds a new point to the end of the curve.
public void AddPoint(FlexalonCurveLayout.CurvePoint point)
Parameters
pointFlexalonCurveLayout.CurvePointThe point to add.
AddPoint(Vector3, Vector3)
Adds a new point to the end of the curve.
public void AddPoint(Vector3 position, Vector3 tangent)
Parameters
positionVector3The position of the point.
tangentVector3The tangent of the point.
Arrange(FlexalonNode, Vector3)
Position the children of node within the available bounds.
public override void Arrange(FlexalonNode node, Vector3 layoutSize)
Parameters
nodeFlexalonNodelayoutSizeVector3
Initialize()
protected override void Initialize()
InsertPoint(int, CurvePoint)
Inserts a new point into the curve at the specified index.
public void InsertPoint(int index, FlexalonCurveLayout.CurvePoint point)
Parameters
indexintThe index to insert the point at.
pointFlexalonCurveLayout.CurvePointThe point to insert.
InsertPoint(int, Vector3, Vector3)
Inserts a new point into the curve at the specified index.
public void InsertPoint(int index, Vector3 position, Vector3 tangent)
Parameters
indexintThe index to insert the point at.
positionVector3The position of the point.
tangentVector3The tangent of the point.
Measure(FlexalonNode, Vector3, Vector3, Vector3)
Perform minimal work to determine what the size of node and available size for node's children.
public override Bounds Measure(FlexalonNode node, Vector3 size, Vector3 min, Vector3 max)
Parameters
nodeFlexalonNodesizeVector3minVector3maxVector3
Returns
- Bounds
RemovePoint(int)
Removes the point at the index.
public void RemovePoint(int index)
Parameters
indexintThe index of the point to remove.
ReplacePoint(int, CurvePoint)
Replaces the point at the index with a new point.
public void ReplacePoint(int index, FlexalonCurveLayout.CurvePoint point)
Parameters
indexintThe index of the point to replace.
pointFlexalonCurveLayout.CurvePointThe new point.
ReplacePoint(int, Vector3, Vector3)
Replaces the point at the index with a new point.
public void ReplacePoint(int index, Vector3 position, Vector3 tangent)
Parameters
indexintThe index of the point to replace.
positionVector3The position of the point.
tangentVector3The tangent of the point.
SetPoints(List<CurvePoint>)
Replaces all points of the curve.
public void SetPoints(List<FlexalonCurveLayout.CurvePoint> points)
Parameters
pointsList<CurvePoint>The new points.