Open 3D Engine NvCloth Gem API Reference  24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
NvCloth::IClothConfigurator Class Referenceabstract

#include <IClothConfigurator.h>

Inherited by NvCloth::Cloth.

Public Member Functions

virtual void SetTransform (const AZ::Transform &transformWorld)=0
 Sets world transform to cloth.
 
virtual void ClearInertia ()=0
 Clears inertia derived from SetTransform to zero.
 
virtual void SetMass (float mass)=0
 
virtual void SetGravity (const AZ::Vector3 &gravity)=0
 Gravity applied to cloth during simulation.
 
virtual void SetStiffnessFrequency (float frequency)=0
 
virtual void SetDamping (const AZ::Vector3 &damping)=0
 
virtual void SetDampingLinearDrag (const AZ::Vector3 &linearDrag)=0
 
virtual void SetDampingAngularDrag (const AZ::Vector3 &angularDrag)=0
 
virtual void SetLinearInertia (const AZ::Vector3 &linearInertia)=0
 
virtual void SetAngularInertia (const AZ::Vector3 &angularInertia)=0
 
virtual void SetCentrifugalInertia (const AZ::Vector3 &centrifugalInertia)=0
 
virtual void SetWindVelocity (const AZ::Vector3 &velocity)=0
 
virtual void SetWindDragCoefficient (float drag)=0
 
virtual void SetWindLiftCoefficient (float lift)=0
 
virtual void SetWindFluidDensity (float density)=0
 
virtual void SetCollisionFriction (float friction)=0
 
virtual void SetCollisionMassScale (float scale)=0
 
virtual void EnableContinuousCollision (bool value)=0
 
virtual void SetCollisionAffectsStaticParticles (bool value)=0
 Enables/Disables colliders affecting static particles (inverse mass 0.0).
 
virtual void SetSelfCollisionDistance (float distance)=0
 
virtual void SetSelfCollisionStiffness (float stiffness)=0
 
virtual void SetVerticalPhaseConfig (float stiffness, float stiffnessMultiplier, float compressionLimit, float stretchLimit)=0
 
virtual void SetHorizontalPhaseConfig (float stiffness, float stiffnessMultiplier, float compressionLimit, float stretchLimit)=0
 
virtual void SetBendingPhaseConfig (float stiffness, float stiffnessMultiplier, float compressionLimit, float stretchLimit)=0
 
virtual void SetShearingPhaseConfig (float stiffness, float stiffnessMultiplier, float compressionLimit, float stretchLimit)=0
 
virtual void SetTetherConstraintStiffness (float stiffness)=0
 
virtual void SetTetherConstraintScale (float scale)=0
 
virtual void SetSolverFrequency (float frequency)=0
 
virtual void SetAcceleationFilterWidth (AZ::u32 width)=0
 
virtual void SetSphereColliders (const AZStd::vector< AZ::Vector4 > &spheres)=0
 
virtual void SetSphereColliders (AZStd::vector< AZ::Vector4 > &&spheres)=0
 
virtual void SetCapsuleColliders (const AZStd::vector< AZ::u32 > &capsuleIndices)=0
 
virtual void SetCapsuleColliders (AZStd::vector< AZ::u32 > &&capsuleIndices)=0
 
virtual void SetMotionConstraints (const AZStd::vector< AZ::Vector4 > &constraints)=0
 
virtual void SetMotionConstraints (AZStd::vector< AZ::Vector4 > &&constraints)=0
 
virtual void ClearMotionConstraints ()=0
 Clear the list of motion constraints.
 
virtual void SetMotionConstraintsScale (float scale)=0
 
virtual void SetMotionConstraintsBias (float bias)=0
 
virtual void SetMotionConstraintsStiffness (float stiffness)=0
 
virtual void SetSeparationConstraints (const AZStd::vector< AZ::Vector4 > &constraints)=0
 
virtual void SetSeparationConstraints (AZStd::vector< AZ::Vector4 > &&constraints)=0
 
virtual void ClearSeparationConstraints ()=0
 Clear the list of separation constraints.
 

Detailed Description

Interface to configure cloth parameters that define its behavior during simulation.

Note
Use ICloth interface to obtain a IClothConfigurator.

Member Function Documentation

◆ EnableContinuousCollision()

virtual void NvCloth::IClothConfigurator::EnableContinuousCollision ( bool  value)
pure virtual

Enables/Disables continuous collision detection. Enabling it improves collision by computing time of impact between cloth particles and colliders.

Note
The increase in quality comes with a cost in performance, it's recommended to use only when required.

Implemented in NvCloth::Cloth.

◆ SetAcceleationFilterWidth()

virtual void NvCloth::IClothConfigurator::SetAcceleationFilterWidth ( AZ::u32  width)
pure virtual

Number of iterations to average delta time factor used for gravity and external acceleration. Width valid values are > 0.

Implemented in NvCloth::Cloth.

◆ SetAngularInertia()

virtual void NvCloth::IClothConfigurator::SetAngularInertia ( const AZ::Vector3 &  angularInertia)
pure virtual

Portion of angular acceleration applied to turning particles. 0.0: Particles are unaffected. 1.0: Physically correct.

Implemented in NvCloth::Cloth.

◆ SetBendingPhaseConfig()

virtual void NvCloth::IClothConfigurator::SetBendingPhaseConfig ( float  stiffness,
float  stiffnessMultiplier,
float  compressionLimit,
float  stretchLimit 
)
pure virtual

Configures bending constraints parameters.

Note
Applicable only if cloth has bending constraints, which is decided by the internal cooking process of the fabric.
Parameters
stiffnessStiffness value of bending constraints. 0.0: no bending constraints.
stiffnessMultiplierScale value for compression and stretch limits. 0.0: No horizontal compression and stretch limits applied. 1.0: Fully apply compression and stretch limits.
compressionLimitCompression limit for bending constraints. 0.0: No compression.
stretchLimitStretch limit for bending constraints. Reduce stiffness of tether constraints (or increase its scale beyond 1.0) to allow cloth to stretch. 0.0: No stretching.

Implemented in NvCloth::Cloth.

◆ SetCapsuleColliders() [1/2]

virtual void NvCloth::IClothConfigurator::SetCapsuleColliders ( AZStd::vector< AZ::u32 > &&  capsuleIndices)
pure virtual

Set a list of capsules to collide with cloth's particles (rvalue overload). Each capsule is formed by 2 indices to sphere colliders.

Note
Each cloth can have a maximum of 32 capsule colliders. In the case that all capsules use unique spheres that maximum number would go down to 16, limited by the maximum number of spheres (32).

Implemented in NvCloth::Cloth.

◆ SetCapsuleColliders() [2/2]

virtual void NvCloth::IClothConfigurator::SetCapsuleColliders ( const AZStd::vector< AZ::u32 > &  capsuleIndices)
pure virtual

Set a list of capsules to collide with cloth's particles. Each capsule is formed by 2 indices to sphere colliders.

Note
Each cloth can have a maximum of 32 capsule colliders. In the case that all capsules use unique spheres that maximum number would go down to 16, limited by the maximum number of spheres (32).

Implemented in NvCloth::Cloth.

◆ SetCentrifugalInertia()

virtual void NvCloth::IClothConfigurator::SetCentrifugalInertia ( const AZ::Vector3 &  centrifugalInertia)
pure virtual

Portion of angular velocity applied to turning particles. 0.0: Particles are unaffected. 1.0: Physically correct.

Implemented in NvCloth::Cloth.

◆ SetCollisionFriction()

virtual void NvCloth::IClothConfigurator::SetCollisionFriction ( float  friction)
pure virtual

Amount of friction with colliders. 0.0: No friction. Friction valid values are >= 0.0.

Implemented in NvCloth::Cloth.

◆ SetCollisionMassScale()

virtual void NvCloth::IClothConfigurator::SetCollisionMassScale ( float  scale)
pure virtual

Controls how quickly mass is increased during collisions. 0.0: No mass scaling. Scale valid values are >= 0.0.

Implemented in NvCloth::Cloth.

◆ SetDamping()

virtual void NvCloth::IClothConfigurator::SetDamping ( const AZ::Vector3 &  damping)
pure virtual

Damping of particles' velocity. 0.0: Velocity is unaffected. 1.0: Velocity is zeroed.

Implemented in NvCloth::Cloth.

◆ SetDampingAngularDrag()

virtual void NvCloth::IClothConfigurator::SetDampingAngularDrag ( const AZ::Vector3 &  angularDrag)
pure virtual

Portion of angular velocity applied to turning particles. 0.0: Particles is unaffected. 1.0: Damped global particle angular velocity.

Implemented in NvCloth::Cloth.

◆ SetDampingLinearDrag()

virtual void NvCloth::IClothConfigurator::SetDampingLinearDrag ( const AZ::Vector3 &  linearDrag)
pure virtual

Portion of velocity applied to particles. 0.0: Particles is unaffected. 1.0: Damped global particle velocity.

Implemented in NvCloth::Cloth.

◆ SetHorizontalPhaseConfig()

virtual void NvCloth::IClothConfigurator::SetHorizontalPhaseConfig ( float  stiffness,
float  stiffnessMultiplier,
float  compressionLimit,
float  stretchLimit 
)
pure virtual

Configures horizontal constraints parameters.

Note
Applicable only if cloth has horizontal constraints, which is decided by the internal cooking process of the fabric.
Parameters
stiffnessStiffness value of horizontal constraints. 0.0: no horizontal constraints.
stiffnessMultiplierScale value for compression and stretch limits. 0.0: No horizontal compression and stretch limits applied. 1.0: Fully apply compression and stretch limits.
compressionLimitCompression limit for horizontal constraints. 0.0: No compression.
stretchLimitStretch limit for horizontal constraints. Reduce stiffness of tether constraints (or increase its scale beyond 1.0) to allow cloth to stretch. 0.0: No stretching.

Implemented in NvCloth::Cloth.

◆ SetLinearInertia()

virtual void NvCloth::IClothConfigurator::SetLinearInertia ( const AZ::Vector3 &  linearInertia)
pure virtual

Portion of acceleration applied to particles. 0.0: Particles are unaffected. 1.0: Physically correct.

Implemented in NvCloth::Cloth.

◆ SetMass()

virtual void NvCloth::IClothConfigurator::SetMass ( float  mass)
pure virtual

Mass scale applied to all particles, zero makes all particles static.

Note
This function results in a copy of all particle data to NvCloth and therefore it's not a fast operation.

Implemented in NvCloth::Cloth.

◆ SetMotionConstraints() [1/2]

virtual void NvCloth::IClothConfigurator::SetMotionConstraints ( AZStd::vector< AZ::Vector4 > &&  constraints)
pure virtual

Sets the motion constraints (positions and radius) for cloth. Each particle's movement during simulation will be limited to the volume of a sphere.

Parameters
constraintsList of constraints (positions and radius) to set (rvalue overload).
Note
Partial set is not allowed, the list must include one constraint per particle.

Implemented in NvCloth::Cloth.

◆ SetMotionConstraints() [2/2]

virtual void NvCloth::IClothConfigurator::SetMotionConstraints ( const AZStd::vector< AZ::Vector4 > &  constraints)
pure virtual

Sets the motion constraints (positions and radius) for cloth. Each particle's movement during simulation will be limited to the volume of a sphere.

Parameters
constraintsList of constraints (positions and radius) to set.
Note
Partial set is not allowed, the list must include one constraint per particle.

Implemented in NvCloth::Cloth.

◆ SetMotionConstraintsBias()

virtual void NvCloth::IClothConfigurator::SetMotionConstraintsBias ( float  bias)
pure virtual

Sets the bias to be applied to all motion constraints. The bias value will be added to the radius of all motion constraints.

Note
Internally clamped to avoid negative radius.

Implemented in NvCloth::Cloth.

◆ SetMotionConstraintsScale()

virtual void NvCloth::IClothConfigurator::SetMotionConstraintsScale ( float  scale)
pure virtual

Sets the scale to be applied to all motion constraints. The radius of all motion constraints will be multiplied by the scale.

Note
Internally clamped to avoid negative radius.

Implemented in NvCloth::Cloth.

◆ SetMotionConstraintsStiffness()

virtual void NvCloth::IClothConfigurator::SetMotionConstraintsStiffness ( float  stiffness)
pure virtual

Stiffness for motion constraints. Stiffness range is [0.0, 1.0].

Implemented in NvCloth::Cloth.

◆ SetSelfCollisionDistance()

virtual void NvCloth::IClothConfigurator::SetSelfCollisionDistance ( float  distance)
pure virtual

Meters that particles need to be separated from each other. 0.0: No self collision. Distance valid values are > 0.0.

Implemented in NvCloth::Cloth.

◆ SetSelfCollisionStiffness()

virtual void NvCloth::IClothConfigurator::SetSelfCollisionStiffness ( float  stiffness)
pure virtual

Stiffness for the self collision constraints. 0.0: No self collision. Stiffness range is [0.0, 1.0].

Implemented in NvCloth::Cloth.

◆ SetSeparationConstraints() [1/2]

virtual void NvCloth::IClothConfigurator::SetSeparationConstraints ( AZStd::vector< AZ::Vector4 > &&  constraints)
pure virtual

Sets the separation constraints (positions and radius) for cloth. Each particle's movement during simulation will be kept outside the volume of a sphere.

Parameters
constraintsList of constraints (positions and radius) to set (rvalue overload).
Note
Partial set is not allowed, the list must include one constraint per particle.

Implemented in NvCloth::Cloth.

◆ SetSeparationConstraints() [2/2]

virtual void NvCloth::IClothConfigurator::SetSeparationConstraints ( const AZStd::vector< AZ::Vector4 > &  constraints)
pure virtual

Sets the separation constraints (positions and radius) for cloth. Each particle's movement during simulation will be kept outside the volume of a sphere.

Parameters
constraintsList of constraints (positions and radius) to set.
Note
Partial set is not allowed, the list must include one constraint per particle.

Implemented in NvCloth::Cloth.

◆ SetShearingPhaseConfig()

virtual void NvCloth::IClothConfigurator::SetShearingPhaseConfig ( float  stiffness,
float  stiffnessMultiplier,
float  compressionLimit,
float  stretchLimit 
)
pure virtual

Configures shearing constraints parameters.

Note
Applicable only if cloth has shearing constraints, which is decided by the internal cooking process of the fabric.
Parameters
stiffnessStiffness value of shearing constraints. 0.0: no shearing constraints.
stiffnessMultiplierScale value for compression and stretch limits. 0.0: No horizontal compression and stretch limits applied. 1.0: Fully apply compression and stretch limits.
compressionLimitCompression limit for shearing constraints. 0.0: No compression.
stretchLimitStretch limit for shearing constraints. Reduce stiffness of tether constraints (or increase its scale beyond 1.0) to allow cloth to stretch. 0.0: No stretching.

Implemented in NvCloth::Cloth.

◆ SetSolverFrequency()

virtual void NvCloth::IClothConfigurator::SetSolverFrequency ( float  frequency)
pure virtual

Target solver iterations per second. At least 1 iteration per frame will be solved regardless of the value set. Frequency valid values are >= 0.0.

Implemented in NvCloth::Cloth.

◆ SetSphereColliders() [1/2]

virtual void NvCloth::IClothConfigurator::SetSphereColliders ( AZStd::vector< AZ::Vector4 > &&  spheres)
pure virtual

Set a list of spheres to collide with cloth's particles (rvalue overload). x,y,z represents the position and w the radius of the sphere.

Note
Each cloth can have a maximum of 32 sphere colliders.

Implemented in NvCloth::Cloth.

◆ SetSphereColliders() [2/2]

virtual void NvCloth::IClothConfigurator::SetSphereColliders ( const AZStd::vector< AZ::Vector4 > &  spheres)
pure virtual

Set a list of spheres to collide with cloth's particles. x,y,z represents the position and w the radius of the sphere.

Note
Each cloth can have a maximum of 32 sphere colliders.

Implemented in NvCloth::Cloth.

◆ SetStiffnessFrequency()

virtual void NvCloth::IClothConfigurator::SetStiffnessFrequency ( float  frequency)
pure virtual

Stiffness exponent per second applied to damping, damping dragging, wind dragging, wind lifting, self collision stiffness, fabric stiffness, fabric compression, fabric stretch, tether constraint stiffness and motion constraints stiffness. Stiffness frequency valid values are > 0.0.

Implemented in NvCloth::Cloth.

◆ SetTetherConstraintScale()

virtual void NvCloth::IClothConfigurator::SetTetherConstraintScale ( float  scale)
pure virtual

Tether constraints scale. Scale valid values are >= 0.0.

Note
Applicable when cloth has tether constraints, that's when fabric data had static particles (inverse mass 0.0) when cooking.

Implemented in NvCloth::Cloth.

◆ SetTetherConstraintStiffness()

virtual void NvCloth::IClothConfigurator::SetTetherConstraintStiffness ( float  stiffness)
pure virtual

Stiffness for tether constraints. 0.0: No tether constraints applied. 1.0: Makes the constraints behave springy. Stiffness range is [0.0, 1.0].

Note
Applicable when cloth has tether constraints, that's when fabric data had static particles (inverse mass 0.0) when cooking.

Implemented in NvCloth::Cloth.

◆ SetVerticalPhaseConfig()

virtual void NvCloth::IClothConfigurator::SetVerticalPhaseConfig ( float  stiffness,
float  stiffnessMultiplier,
float  compressionLimit,
float  stretchLimit 
)
pure virtual

Configures vertical constraints parameters.

Note
Applicable only if cloth has vertical constraints, which is decided by the internal cooking process of the fabric.
Parameters
stiffnessStiffness value of vertical constraints. 0.0: no vertical constraints.
stiffnessMultiplierScale value for compression and stretch limits. 0.0: No horizontal compression and stretch limits applied. 1.0: Fully apply compression and stretch limits.
compressionLimitCompression limit for vertical constraints. 0.0: No compression.
stretchLimitStretch limit for vertical constraints. Reduce stiffness of tether constraints (or increase its scale beyond 1.0) to allow cloth to stretch. 0.0: No stretching.

Implemented in NvCloth::Cloth.

◆ SetWindDragCoefficient()

virtual void NvCloth::IClothConfigurator::SetWindDragCoefficient ( float  drag)
pure virtual

Amount of air drag. Wind drag range is [0.0, 1.0].

Note
A combination of high values in wind properties can cause unstable results.

Implemented in NvCloth::Cloth.

◆ SetWindFluidDensity()

virtual void NvCloth::IClothConfigurator::SetWindFluidDensity ( float  density)
pure virtual

Density of air used for air drag and lift calculations. Fluid density valid values are > 0.0.

Note
A combination of high values in wind properties can cause unstable results.

Implemented in NvCloth::Cloth.

◆ SetWindLiftCoefficient()

virtual void NvCloth::IClothConfigurator::SetWindLiftCoefficient ( float  lift)
pure virtual

Amount of air lift. Wind lift range is [0.0, 1.0].

Note
A combination of high values in wind properties can cause unstable results.

Implemented in NvCloth::Cloth.

◆ SetWindVelocity()

virtual void NvCloth::IClothConfigurator::SetWindVelocity ( const AZ::Vector3 &  velocity)
pure virtual

Wind in global coordinates acting on cloth's triangles. Disabled when both wind air coefficients are zero. Wind velocity range is [-50.0, 50.0].

Note
A combination of high values in wind properties can cause unstable results.

Implemented in NvCloth::Cloth.


The documentation for this class was generated from the following file: