namespace: CurveArchitect.Objects
file: ArchitectCurveObject.cs
Description:
Component that will automatically be attached to any GameObject childed to an Architect Curve.
Public variables
Vector3 localCurvePosition
- The position the object has in local curve space.
Vector3 localCurveRotation
- The rotation the object has in local curve space.
Vector3 curvePosition
- The position the object has in curve space.
Vector3 curveRotation
- The rotation the object has in curve space.
bool mirrorDeformation
- Mirror the deformation.
Type type
- Deformer, follower or none.
State state
- Idle, Deforming.
NormalType normalType
- Type of normal calculation.
TangentType tangentType
- Type of tangent calculation.
Vector3Int followAxels
- Only follow the curve in x axels.
ArchitectCurve acParent
- The ArchitectCurve its deformed under.
ArchitectCurveObject acoParent
- If the aco is parented to another aco this is not null.
List<MeshContainer> meshContainers
- All meshContainers for colliders and meshes that should be deformed.
List<Collider> primitiveColliders
- All primitive colliders for the ArchitectCurveObject.
MonitorArchitectCurveObject monitor
- Monitors any changes on the ArchitectCurveObject.
Public functions
bool IsEnabled()
Description:
Checks if the ArchitectCurveObject is enabled and active in the hierarchy.
Returns:
True if the object is active and enabled, otherwise false.
void AddMeshContainer(MeshContainer mc)
Description:
Adds a MeshContainer to the ArchitectCurveObject's list of mesh containers.
Params:
- mc: The MeshContainer to add.
void RemoveMeshContainer(MeshContainer mc)
Description:
Removes a MeshContainer from the ArchitectCurveObject's list of mesh containers.
Params:
- mc: The MeshContainer to remove.
bool ContainsMeshContainer(MeshContainer mc)
Description:
Checks if the ArchitectCurveObject contains the specified MeshContainer.
Params:
- mc: The MeshContainer to check.
Returns:
True if the container exists, otherwise false.
void AddPrimitiveCollider(Collider collider)
Description:
Adds a primitive collider to the ArchitectCurveObject's list of colliders.
Params:
- collider: The primitive collider to add (Box, Sphere, or Capsule).
void RemovePrimitiveCollider(Collider collider)
Description:
Removes a primitive collider from the ArchitectCurveObject's list of colliders.
Params:
- collider: The collider to remove.
bool ContainsPrimitiveCollider(Collider collider)
Description:
Checks if the ArchitectCurveObject contains the specified primitive collider.
Params:
- collider: The collider to check.
Returns:
True if the collider exists, otherwise false.
bool ContainsValidMesh()
Description:
Checks if the ArchitectCurveObject contains a valid mesh in its mesh containers.
Returns:
True if a valid mesh is found, otherwise false.
bool ContainsInstanceMesh(Mesh instanceMesh)
Description:
Checks if the ArchitectCurveObject contains a specific instance mesh.
Params:
- instanceMesh: The instance mesh to check.
Returns:
True if the mesh is contained, otherwise false.
void SetInstanceMeshesToOriginMesh()
Description:
Sets all instance meshes in the ArchitectCurveObject to their origin meshes.
void ReverseTrianglesOnAll()
Description:
Reverses the triangle winding order on all instance meshes in the ArchitectCurveObject.
void UpdateParentData()
Description:
Updates both the ArchitectCurve and ArchitectCurveObject parent references.