HDK
|
#include <SIM_Force.h>
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_ForceResolver & | operator= (const SIM_ForceResolver &src) |
virtual SIM_ForceResolver * | copy () 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 |
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.
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 |
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 | ||
) |
|
pure virtual |
Implemented in SIM_ForceResolverGeneric.
|
pure virtual |
Implemented in SIM_ForceResolverGeneric.
|
virtual |
Reimplemented in SIM_ForceResolverGeneric.
|
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 |
Defaults to the resolver being threadsafe provided all of the noise resolvers are threadsafe.
Reimplemented in SIM_ForceResolverGeneric.
|
protected |
Definition at line 293 of file SIM_Force.h.