namespace: CurveArchitect.Objects
file: ArchitectCurve.cs
Description:
The Architect Curve that can animated objects, deform meshes and terrain.
Public variables
bool loop
- Loop disabled/enabled.
float length
- The length of the curve.
string id
- The curves id.
NormalType normalType
- Sets the normal type of the ArchitectCurve.
Bounds controlPointsBounds
- Bounds for all control points.
List<Segment> segements
- List of segements.
bool calculateLengthMap
- Turn on/off length map calculations.
bool calculateLength
- Turn on/off length calculations.
bool calculatePositionMap
- Turn on/off position map calculations.
bool calculateSegmentData
- Turn on/off segment data calculations.
bool calculateControlPointsBounds
- Turn on/off control point bounds calculations.
MonitorArchitectCurve monitor
- Monitors all changes for the Architect Curve.
List<float> lengthMap
- Cached length map.
List<Vector3> normalsLocal
- Cached normals. Only used by dynamic curves
List<Vector3> positionMapLocal
- Cached position map.
List<Vector3> positionMap
- Cached position map.
List<ArchitectCurveObject> architectCurveObjects
- References to all Architect Curve Objects.
List<ArchitectCurveObject> followerUpdateList
- Followers put inside this list will automatically be updated one time and after removed.
Public functions
bool IsEnabled()
Description:
Checks if the component is active and enabled.
Returns:
True if active and enabled; otherwise false.
bool ContainsArchitectCurveObject(ArchitectCurveObject aco)
Description:
Checks if the ArchitectCurveObject is contained within the ArchitectCurve.
Params:
- aco: The object to check.
Returns:
True if contained; otherwise false.
void AddArchitectCurveObject(ArchitectCurveObject aco, int index = -1)
Description:
Adds an ArchitectCurveObject at a specific index.
Params:
- aco: The object to add.
- index: Insertion index; -1 adds to the end.
void RemoveArchitectCurveObject(ArchitectCurveObject aco)
Description:
Removes an ArchitectCurveObject from the collection.
Params:
- aco: The object to remove.
void RemoveAtArchitectCurveObject(int index)
Description:
Removes an ArchitectCurveObject at a given index.
Params:
- index: The index of the object to remove.
void CreateSegment(int index, Vector3 anchorPos, Vector3 tangentAPos, Vector3 tangentBPos)
Description:
Creates a segment at a specific index with given positions.
Params:
- index: Insertion index.
- anchorPos: Anchor position.
- tangentAPos: First tangent position.
- tangentBPos: Second tangent position.
void CreateSegment(Vector3 anchorPos, Vector3 tangentAPos, Vector3 tangentBPos)
Description:
Adds a segment with specified positions.
Params:
- anchorPos: Anchor position.
- tangentAPos: First tangent position.
- tangentBPos: Second tangent position.
void RemoveSegment(int index)
Description:
Removes a segment at the specified index.
Params:
- index: The index of the segment to remove.
void UpdateMonitor(bool skipPosScaleRot = false)
Description:
Updates monitor values; optionally skips position, scale, and rotation.
Params:
- skipPosScaleRot: If true, skips updating position, scale, and rotation.
float GetResolutionLengthMap(bool rawValue = false)
Description:
Retrieves the resolution length map value.
Params:
- rawValue: If true, returns the raw value.
Returns:
The resolution length map.
float GetResolutionLength(bool rawValue = false)
Description:
Retrieves the resolution length value.
Params:
- rawValue: If true, returns the raw value.
Returns:
The resolution length.
float GetResolutionSegmentData(bool rawValue = false)
Description:
Gets the resolution segment data.
Params:
- rawValue: If true, returns the raw value.
Returns:
The resolution segment data.
float GetResolutionPositionMap(bool rawValue = false)
Description:
Retrieves the resolution position map.
Params:
- rawValue: If true, returns the raw value.
Returns:
The resolution position map.
float GetResolutionNormal(bool rawValue = false)
Description:
Gets the resolution normal value.
Params:
- rawValue: If true, returns the raw value.
Returns:
The resolution normal.
float GetSamplingStepLengthMap(bool rawValue = false)
Description:
Retrieves the sampling step length map.
Params:
- rawValue: If true, returns the raw value.
Returns:
The sampling step length map.
void SetResolutionLengthMap(float value)
Description:
Sets the resolution length map value.
Params:
void SetResolutionLength(float value)
Description:
Sets the resolution length.
Params:
void SetResolutionSegmentData(float value)
Description:
Sets the resolution segment data.
Params:
void SetResolutionPositionMap(float value)
Description:
Sets the resolution position map.
Params:
void SetResolutionNormal(float value)
Description:
Sets the resolution normal value.
Params:
void SetSamplingStepLengthMap(float value)
Description:
Sets the sampling step length map, clamped between 3 and 1000.
Params: