![]() |
PeriDyno 1.0.0
|
#include <TJConstraintSolver.h>
Public Types | |
typedef TDataType::Real | Real |
typedef TDataType::Coord | Coord |
typedef TDataType::Matrix | Matrix |
typedef ::dyno::Quat< Real > | TQuat |
typedef ::dyno::TContactPair< Real > | ContactPair |
typedef ::dyno::TConstraintPair< Real > | Constraint |
typedef ::dyno::BallAndSocketJoint< Real > | BallAndSocketJoint |
typedef ::dyno::SliderJoint< Real > | SliderJoint |
typedef ::dyno::HingeJoint< Real > | HingeJoint |
typedef ::dyno::FixedJoint< Real > | FixedJoint |
typedef ::dyno::PointJoint< Real > | PointJoint |
![]() | |
typedef std::vector< FBase * > | FieldVector |
typedef std::map< FieldID, FBase * > | FieldMap |
Public Member Functions | |
TJConstraintSolver () | |
~TJConstraintSolver () | |
DEF_VAR (bool, FrictionEnabled, true, "") | |
DEF_VAR (bool, GravityEnabled, true, "") | |
DEF_VAR (Real, GravityValue, 9.8, "") | |
DEF_VAR (Real, FrictionCoefficient, 100, "") | |
DEF_VAR (Real, Slop, 0, "") | |
DEF_VAR (Real, BaumgarteBias, 0.6, "") | |
DEF_VAR (uint, SubStepping, 10, "") | |
DEF_VAR (uint, IterationNumberForVelocitySolver, 30, "") | |
DEF_VAR (Real, LinearDamping, 0.2, "") | |
DEF_VAR (Real, AngularDamping, 0.2, "") | |
DEF_VAR_IN (Real, TimeStep, "Time step size") | |
DEF_ARRAY_IN (Real, Mass, DeviceType::GPU, "Mass of rigid bodies") | |
DEF_ARRAY_IN (Coord, Center, DeviceType::GPU, "Center of rigid bodies") | |
DEF_ARRAY_IN (Coord, Velocity, DeviceType::GPU, "Velocity of rigid bodies") | |
DEF_ARRAY_IN (Coord, AngularVelocity, DeviceType::GPU, "Angular velocity of rigid bodies") | |
DEF_ARRAY_IN (Matrix, RotationMatrix, DeviceType::GPU, "Rotation matrix of rigid bodies") | |
DEF_ARRAY_IN (Matrix, Inertia, DeviceType::GPU, "Interial matrix") | |
DEF_ARRAY_IN (Matrix, InitialInertia, DeviceType::GPU, "Interial matrix") | |
DEF_ARRAY_IN (TQuat, Quaternion, DeviceType::GPU, "Quaternion") | |
DEF_ARRAY_IN (ContactPair, Contacts, DeviceType::GPU, "") | |
DEF_INSTANCE_IN (DiscreteElements< TDataType >, DiscreteElements, "") | |
DEF_ARRAY_IN (Attribute, Attribute, DeviceType::GPU, "Rigid body attributes") | |
DEF_ARRAY_IN (Real, FrictionCoefficients, DeviceType::GPU, "FrictionCoefficients of rigid bodies") | |
![]() | |
ConstraintModule () | |
~ConstraintModule () override | |
std::string | getModuleType () override |
![]() | |
Module (std::string name="default") | |
~Module (void) override | |
bool | initialize () |
void | update () |
void | setName (std::string name) |
std::string | getName () override |
virtual void | setParentNode (Node *node) |
Set the parent node. | |
Node * | getParentNode () |
SceneGraph * | getSceneGraph () |
bool | isInitialized () |
bool | attachField (FBase *field, std::string name, std::string desc, bool autoDestroy=true) override |
Attach a field to Base. | |
bool | isInputComplete () |
Check the completeness of input fields. | |
bool | isOutputCompete () |
DEF_VAR (bool, ForceUpdate, false, "") | |
void | setUpdateAlways (bool b) |
Set the update strategy for the module. | |
![]() | |
OBase () | |
~OBase () override | |
virtual std::string | caption () |
Return the caption. | |
virtual bool | captionVisible () |
Whether to hide the caption in the GUI. | |
virtual std::string | description () |
Return a description for the node or module, override this function to support user-defined description. | |
bool | addField (FBase *data) |
Add a field to Base FieldID will be set to the name of Field by default. | |
bool | addField (FieldID name, FBase *data) |
Add a field to Base. | |
bool | addFieldAlias (FieldID name, FBase *data) |
bool | addFieldAlias (FieldID name, FBase *data, FieldMap &fieldAlias) |
bool | findField (FBase *data) |
Find a field by its pointer. | |
bool | findFieldAlias (const FieldID name) |
Find a field by its name. | |
bool | findFieldAlias (const FieldID name, FieldMap &fieldAlias) |
Find a field in fieldAlias by its name This function is typically called by other functions. | |
bool | removeField (FBase *data) |
Remove a field by its pointer. | |
bool | removeFieldAlias (const FieldID name) |
Remove a field by its name. | |
bool | removeFieldAlias (const FieldID name, FieldMap &fieldAlias) |
FBase * | getField (const FieldID name) |
Return a field by its name. | |
std::vector< FBase * > & | getAllFields () |
template<typename T> | |
T * | getField (FieldID name) |
bool | isAllFieldsReady () |
Check the completeness of all required fields. | |
std::vector< FieldID > | getFieldAlias (FBase *data) |
int | getFieldAliasCount (FBase *data) |
void | setBlockCoord (float x, float y) |
float | bx () |
float | by () |
bool | findInputField (FBase *field) |
bool | addInputField (FBase *field) |
bool | removeInputField (FBase *field) |
std::vector< FBase * > & | getInputFields () |
bool | findOutputField (FBase *field) |
bool | addOutputField (FBase *field) |
bool | addToOutput (FBase *field) |
bool | removeOutputField (FBase *field) |
bool | removeFromOutput (FBase *field) |
std::vector< FBase * > & | getOutputFields () |
bool | findParameter (FBase *field) |
bool | addParameter (FBase *field) |
bool | removeParameter (FBase *field) |
std::vector< FBase * > & | getParameters () |
![]() | |
Object () | |
virtual | ~Object () |
ObjectId | objectId () |
Protected Member Functions | |
void | constrain () override |
![]() | |
void | updateImpl () override |
![]() | |
virtual bool | initializeImpl () |
virtual void | preprocess () |
virtual void | postprocess () |
virtual bool | validateInputs () |
virtual bool | validateOutputs () |
virtual bool | requireUpdate () |
virtual void | updateStarted () |
Two functions called at the beginning and end of update() used for debug. | |
virtual void | updateEnded () |
Private Member Functions | |
void | initializeJacobian (Real dt) |
Private Attributes | |
DArray< Coord > | mJ |
DArray< Coord > | mB |
DArray< Coord > | mImpulseC |
DArray< Coord > | mImpulseExt |
DArray< Real > | mEta |
DArray< Real > | mLambda |
DArray< ContactPair > | mContactsInLocalFrame |
DArray< Constraint > | mVelocityConstraints |
DArray< int > | mContactNumber |
DArray< Real > | mK_1 |
DArray< Mat2f > | mK_2 |
DArray< Matrix > | mK_3 |
DArray< Real > | mErrors |
Additional Inherited Members | |
![]() | |
static bool | registerClass (ClassInfo *ci) |
static Object * | createObject (std::string name) |
static std::map< std::string, ClassInfo * > * | getClassMap () |
static ObjectId | baseId () |
Base Id. | |
![]() | |
std::vector< FBase * > | fields_input |
std::vector< FBase * > | fields_output |
std::vector< FBase * > | fields_param |
Definition at line 30 of file TJConstraintSolver.h.
typedef ::dyno::BallAndSocketJoint<Real> dyno::TJConstraintSolver< TDataType >::BallAndSocketJoint |
Definition at line 42 of file TJConstraintSolver.h.
typedef ::dyno::TConstraintPair<Real> dyno::TJConstraintSolver< TDataType >::Constraint |
Definition at line 40 of file TJConstraintSolver.h.
typedef ::dyno::TContactPair<Real> dyno::TJConstraintSolver< TDataType >::ContactPair |
Definition at line 39 of file TJConstraintSolver.h.
typedef TDataType::Coord dyno::TJConstraintSolver< TDataType >::Coord |
Definition at line 35 of file TJConstraintSolver.h.
typedef ::dyno::FixedJoint<Real> dyno::TJConstraintSolver< TDataType >::FixedJoint |
Definition at line 45 of file TJConstraintSolver.h.
typedef ::dyno::HingeJoint<Real> dyno::TJConstraintSolver< TDataType >::HingeJoint |
Definition at line 44 of file TJConstraintSolver.h.
typedef TDataType::Matrix dyno::TJConstraintSolver< TDataType >::Matrix |
Definition at line 36 of file TJConstraintSolver.h.
typedef ::dyno::PointJoint<Real> dyno::TJConstraintSolver< TDataType >::PointJoint |
Definition at line 46 of file TJConstraintSolver.h.
typedef TDataType::Real dyno::TJConstraintSolver< TDataType >::Real |
Definition at line 34 of file TJConstraintSolver.h.
typedef ::dyno::SliderJoint<Real> dyno::TJConstraintSolver< TDataType >::SliderJoint |
Definition at line 43 of file TJConstraintSolver.h.
typedef ::dyno::Quat<Real> dyno::TJConstraintSolver< TDataType >::TQuat |
Definition at line 38 of file TJConstraintSolver.h.
dyno::TJConstraintSolver< TDataType >::TJConstraintSolver | ( | ) |
dyno::TJConstraintSolver< TDataType >::~TJConstraintSolver | ( | ) |
|
overrideprotectedvirtual |
Implements dyno::ConstraintModule.
dyno::TJConstraintSolver< TDataType >::DEF_ARRAY_IN | ( | Attribute | , |
Attribute | , | ||
DeviceType::GPU | , | ||
"Rigid body attributes" | ) |
dyno::TJConstraintSolver< TDataType >::DEF_ARRAY_IN | ( | ContactPair | , |
Contacts | , | ||
DeviceType::GPU | , | ||
"" | ) |
dyno::TJConstraintSolver< TDataType >::DEF_ARRAY_IN | ( | Coord | , |
AngularVelocity | , | ||
DeviceType::GPU | , | ||
"Angular velocity of rigid bodies" | ) |
dyno::TJConstraintSolver< TDataType >::DEF_ARRAY_IN | ( | Coord | , |
Center | , | ||
DeviceType::GPU | , | ||
"Center of rigid bodies" | ) |
dyno::TJConstraintSolver< TDataType >::DEF_ARRAY_IN | ( | Coord | , |
Velocity | , | ||
DeviceType::GPU | , | ||
"Velocity of rigid bodies" | ) |
dyno::TJConstraintSolver< TDataType >::DEF_ARRAY_IN | ( | Matrix | , |
Inertia | , | ||
DeviceType::GPU | , | ||
"Interial matrix" | ) |
dyno::TJConstraintSolver< TDataType >::DEF_ARRAY_IN | ( | Matrix | , |
InitialInertia | , | ||
DeviceType::GPU | , | ||
"Interial matrix" | ) |
dyno::TJConstraintSolver< TDataType >::DEF_ARRAY_IN | ( | Matrix | , |
RotationMatrix | , | ||
DeviceType::GPU | , | ||
"Rotation matrix of rigid bodies" | ) |
dyno::TJConstraintSolver< TDataType >::DEF_ARRAY_IN | ( | Real | , |
FrictionCoefficients | , | ||
DeviceType::GPU | , | ||
"FrictionCoefficients of rigid bodies" | ) |
dyno::TJConstraintSolver< TDataType >::DEF_ARRAY_IN | ( | Real | , |
Mass | , | ||
DeviceType::GPU | , | ||
"Mass of rigid bodies" | ) |
dyno::TJConstraintSolver< TDataType >::DEF_ARRAY_IN | ( | TQuat | , |
Quaternion | , | ||
DeviceType::GPU | , | ||
"Quaternion" | ) |
dyno::TJConstraintSolver< TDataType >::DEF_INSTANCE_IN | ( | DiscreteElements< TDataType > | , |
DiscreteElements | , | ||
"" | ) |
dyno::TJConstraintSolver< TDataType >::DEF_VAR | ( | bool | , |
FrictionEnabled | , | ||
true | , | ||
"" | ) |
dyno::TJConstraintSolver< TDataType >::DEF_VAR | ( | bool | , |
GravityEnabled | , | ||
true | , | ||
"" | ) |
dyno::TJConstraintSolver< TDataType >::DEF_VAR | ( | Real | , |
AngularDamping | , | ||
0. | 2, | ||
"" | ) |
dyno::TJConstraintSolver< TDataType >::DEF_VAR | ( | Real | , |
BaumgarteBias | , | ||
0. | 6, | ||
"" | ) |
dyno::TJConstraintSolver< TDataType >::DEF_VAR | ( | Real | , |
FrictionCoefficient | , | ||
100 | , | ||
"" | ) |
dyno::TJConstraintSolver< TDataType >::DEF_VAR | ( | Real | , |
GravityValue | , | ||
9. | 8, | ||
"" | ) |
dyno::TJConstraintSolver< TDataType >::DEF_VAR | ( | Real | , |
LinearDamping | , | ||
0. | 2, | ||
"" | ) |
dyno::TJConstraintSolver< TDataType >::DEF_VAR | ( | Real | , |
Slop | , | ||
0 | , | ||
"" | ) |
dyno::TJConstraintSolver< TDataType >::DEF_VAR | ( | uint | , |
IterationNumberForVelocitySolver | , | ||
30 | , | ||
"" | ) |
dyno::TJConstraintSolver< TDataType >::DEF_VAR | ( | uint | , |
SubStepping | , | ||
10 | , | ||
"" | ) |
dyno::TJConstraintSolver< TDataType >::DEF_VAR_IN | ( | Real | , |
TimeStep | , | ||
"Time step size" | ) |
|
private |
|
private |
Definition at line 107 of file TJConstraintSolver.h.
|
private |
Definition at line 119 of file TJConstraintSolver.h.
|
private |
Definition at line 115 of file TJConstraintSolver.h.
|
private |
Definition at line 125 of file TJConstraintSolver.h.
|
private |
Definition at line 112 of file TJConstraintSolver.h.
|
private |
Definition at line 109 of file TJConstraintSolver.h.
|
private |
Definition at line 110 of file TJConstraintSolver.h.
|
private |
Definition at line 106 of file TJConstraintSolver.h.
|
private |
Definition at line 121 of file TJConstraintSolver.h.
|
private |
Definition at line 122 of file TJConstraintSolver.h.
|
private |
Definition at line 123 of file TJConstraintSolver.h.
|
private |
Definition at line 113 of file TJConstraintSolver.h.
|
private |
Definition at line 117 of file TJConstraintSolver.h.