HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SIM_ForceResolver Class Referenceabstract

#include <SIM_Force.h>

+ Inheritance diagram for SIM_ForceResolver:

Public Member Functions

 SIM_ForceResolver ()
 
 SIM_ForceResolver (const SIM_Force *force, const SIM_Object *obj)
 
 SIM_ForceResolver (const SIM_ForceResolver &src)
 
virtual ~SIM_ForceResolver ()
 
SIM_ForceResolveroperator= (const SIM_ForceResolver &src)
 
virtual SIM_ForceResolvercopy () const =0
 
virtual bool threadsafe () const
 
virtual void getForce (const UT_Vector3 &position, const UT_Vector3 &velocity, const UT_Vector3 &angvel, const fpreal mass, UT_Vector3 &force, UT_Vector3 &torque)=0
 
virtual bool hasJacobian () const
 
virtual void getForceJacobian (const UT_Vector3 &position, const UT_Vector3 &velocity, const UT_Vector3 &angvel, const fpreal mass, UT_Matrix &dFdX, UT_Matrix &dFdV)
 
void applyNoise (const UT_Vector3 &pos, UT_Vector3 &forceortorque)
 
void applyNoise (const UT_Vector3 &pos, UT_Vector3 &force, UT_Vector3 &torque)
 
void applyNoiseJacobian (const UT_Vector3 &pos, UT_Matrix &dFdX, UT_Matrix &dFdV)
 

Protected Attributes

UT_ValArray
< SIM_PropertyResolver * > 
myNoiseResolvers
 

Detailed Description

This class is used to create a usually threadsafe resolver to evaluate forces. It binds most of the data to cut the number of parameter evaluations needed, caching where sensible. Each thread should have its own resolver for thread-local caches, so use the copy() method for each thread.

Definition at line 247 of file SIM_Force.h.

Constructor & Destructor Documentation

SIM_ForceResolver::SIM_ForceResolver ( )
SIM_ForceResolver::SIM_ForceResolver ( const SIM_Force force,
const SIM_Object obj 
)
SIM_ForceResolver::SIM_ForceResolver ( const SIM_ForceResolver src)
virtual SIM_ForceResolver::~SIM_ForceResolver ( )
virtual

Member Function Documentation

void SIM_ForceResolver::applyNoise ( const UT_Vector3 pos,
UT_Vector3 forceortorque 
)

Does componentwise multiplication of the given vectors with our noise resolvers.

void SIM_ForceResolver::applyNoise ( const UT_Vector3 pos,
UT_Vector3 force,
UT_Vector3 torque 
)
void SIM_ForceResolver::applyNoiseJacobian ( const UT_Vector3 pos,
UT_Matrix dFdX,
UT_Matrix dFdV 
)
virtual SIM_ForceResolver* SIM_ForceResolver::copy ( ) const
pure virtual

Implemented in SIM_ForceResolverGeneric.

virtual void SIM_ForceResolver::getForce ( const UT_Vector3 position,
const UT_Vector3 velocity,
const UT_Vector3 angvel,
const fpreal  mass,
UT_Vector3 force,
UT_Vector3 torque 
)
pure virtual

Implemented in SIM_ForceResolverGeneric.

virtual void SIM_ForceResolver::getForceJacobian ( const UT_Vector3 position,
const UT_Vector3 velocity,
const UT_Vector3 angvel,
const fpreal  mass,
UT_Matrix dFdX,
UT_Matrix dFdV 
)
virtual

Reimplemented in SIM_ForceResolverGeneric.

virtual bool SIM_ForceResolver::hasJacobian ( ) const
inlinevirtual

Whether the getForceJacobian returns non-zero values. The default implementation is to always return a 0 jacobian, hence hasJacobian of false.

Reimplemented in SIM_ForceResolverGeneric.

Definition at line 273 of file SIM_Force.h.

SIM_ForceResolver& SIM_ForceResolver::operator= ( const SIM_ForceResolver src)
virtual bool SIM_ForceResolver::threadsafe ( ) const
virtual

Defaults to the resolver being threadsafe provided all of the noise resolvers are threadsafe.

Reimplemented in SIM_ForceResolverGeneric.

Member Data Documentation

UT_ValArray<SIM_PropertyResolver *> SIM_ForceResolver::myNoiseResolvers
protected

Definition at line 293 of file SIM_Force.h.


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