TalanSoft Toolkits  201707
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | List of all members
iDampedSpring2 Struct Referenceabstract
Inheritance diagram for iDampedSpring2:
iUnknown iDampedSpringPosition2

Detailed Description

2D Damped spring interface.

See also
ni::DampedSpringAcceleration

Public Member Functions

virtual void SetKd (tF32 afD)=0
 Set the Kd constant. {Property}. More...
 
virtual tF32 GetKd () const =0
 Get the Kd constant. {Property}. More...
 
virtual void SetKs (tF32 afD)=0
 Set the Ks constant. {Property}. More...
 
virtual tF32 GetKs () const =0
 Get the Ks constant. {Property}. More...
 
virtual void SetStiffnessAndDampingRatio (tF32 afKs, tF32 afE)=0
 Set the value of Kd for the specified Ks that will result in a spring with the specified damping ratio. More...
 
virtual void SetDampingRatio (tF32 afE)=0
 Set the spring's damping ratio. {Property}. More...
 
virtual tF32 GetDampingRatio () const =0
 Get the spring's damping ratio. {Property}. More...
 
virtual void SetVelocity (const sVec2f &avVel)=0
 Set the spring's velocity. {Property}. More...
 
virtual sVec2f GetVelocity () const =0
 Get the spring's velocity. {Property}. More...
 
virtual sVec2f ComputeAcceleration (const sVec2f &avD)=0
 Compute the spring's acceleration for the specified displacement. More...
 
virtual void UpdateVelocity (ni::tF32 afDeltaTime, const sVec2f &avD)=0
 Update the spring's velocity from the specified displacement. More...
 
virtual void UpdateVelocityWithAcceleration (ni::tF32 afDeltaTime, const sVec2f &avAcc)=0
 Update the spring's velocity from the specified acceleration. More...
 
- Public Member Functions inherited from iUnknown
virtual tBool IsOK () const =0
 Check if the object is valid. More...
 
virtual tI32 AddRef ()=0
 Signal that one more reference of the object has been created. More...
 
virtual tI32 Release ()=0
 Release a reference of the object. More...
 
virtual void DeleteThis ()=0
 Bypass any reference counting and delete this object. More...
 
virtual void Invalidate ()=0
 Invalidate the object. More...
 
virtual iUnknownQueryInterface (const tUUID &aIID)=0
 Query an interface. More...
 
virtual void ListInterfaces (iMutableCollection *apLst, tU32 anFlags) const =0
 Fill a UUID list containing the UUIDs of the implemented interfaces. More...
 
virtual tI32 SetNumRefs (tI32 anNumRefs)=0
 Set the reference counter directly. More...
 
virtual tI32 GetNumRefs () const =0
 Get the number of references to this object. More...
 

Member Function Documentation

virtual void SetKd ( tF32  afD)
pure virtual

Set the Kd constant. {Property}.

virtual tF32 GetKd ( ) const
pure virtual

Get the Kd constant. {Property}.

virtual void SetKs ( tF32  afD)
pure virtual

Set the Ks constant. {Property}.

virtual tF32 GetKs ( ) const
pure virtual

Get the Ks constant. {Property}.

virtual void SetStiffnessAndDampingRatio ( tF32  afKs,
tF32  afE 
)
pure virtual

Set the value of Kd for the specified Ks that will result in a spring with the specified damping ratio.

Remarks
Sets Ks with parameter's value, sets Kd in function of Ks.
virtual void SetDampingRatio ( tF32  afE)
pure virtual

Set the spring's damping ratio. {Property}.

Remarks
Sets Kd in function of the current value of Ks to achieve the specified damping ratio.
virtual tF32 GetDampingRatio ( ) const
pure virtual

Get the spring's damping ratio. {Property}.

virtual void SetVelocity ( const sVec2f avVel)
pure virtual

Set the spring's velocity. {Property}.

virtual sVec2f GetVelocity ( ) const
pure virtual

Get the spring's velocity. {Property}.

virtual sVec2f ComputeAcceleration ( const sVec2f avD)
pure virtual

Compute the spring's acceleration for the specified displacement.

virtual void UpdateVelocity ( ni::tF32  afDeltaTime,
const sVec2f avD 
)
pure virtual

Update the spring's velocity from the specified displacement.

virtual void UpdateVelocityWithAcceleration ( ni::tF32  afDeltaTime,
const sVec2f avAcc 
)
pure virtual

Update the spring's velocity from the specified acceleration.