![]()  | 
  
    PeriDyno 1.2.1
    
   | 
 
#include <PJSoftConstraintSolver.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 | 
  Public Types inherited from dyno::OBase | |
| typedef std::vector< FBase * > | FieldVector | 
| typedef std::map< FieldID, FBase * > | FieldMap | 
Public Member Functions | |
| PJSoftConstraintSolver () | |
| ~PJSoftConstraintSolver () | |
| 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 (uint, IterationNumberForVelocitySolver, 300, "") | |
| DEF_VAR (Real, LinearDamping, 0.1, "") | |
| DEF_VAR (Real, AngularDamping, 0.1, "") | |
| DEF_VAR (Real, DampingRatio, 1.0, "") | |
| DEF_VAR (Real, Hertz, 300, "") | |
| 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") | |
  Public Member Functions inherited from dyno::ConstraintModule | |
| ConstraintModule () | |
| ~ConstraintModule () override | |
| std::string | getModuleType () override | 
  Public Member Functions inherited from dyno::Module | |
| 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 () | 
| bool | connect (ModulePort *nPort) | 
| bool | disconnect (ModulePort *nPort) | 
| virtual bool | allowImported () | 
| virtual bool | allowExported () | 
| std::vector< ModulePort * > & | getImportModules () | 
| std::vector< ModulePort * > & | getExportModules () | 
| DEF_VAR (bool, ForceUpdate, false, "") | |
| void | setUpdateAlways (bool b) | 
| Set the update strategy for the module.   | |
| virtual bool | initializeImpl () | 
| MultipleModulePort< Module > * | importModules () | 
| Used to ensure modules can be executed in the correct order.   | |
  Public Member Functions inherited from dyno::OBase | |
| 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 () | 
  Public Member Functions inherited from dyno::Object | |
| Object () | |
| virtual | ~Object () | 
| ObjectId | objectId () | 
Protected Member Functions | |
| void | constrain () override | 
  Protected Member Functions inherited from dyno::ConstraintModule | |
| void | updateImpl () override | 
  Protected Member Functions inherited from dyno::Module | |
| 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 () | 
| bool | appendExportModule (ModulePort *nodePort) | 
| bool | removeExportModule (ModulePort *nodePort) | 
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 | 
Additional Inherited Members | |
  Static Public Member Functions inherited from dyno::Object | |
| static bool | registerClass (ClassInfo *ci) | 
| static Object * | createObject (std::string name) | 
| static std::map< std::string, ClassInfo * > * | getClassMap () | 
| static ObjectId | baseId () | 
| Base Id.   | |
  Protected Attributes inherited from dyno::OBase | |
| std::vector< FBase * > | fields_input | 
| std::vector< FBase * > | fields_output | 
| std::vector< FBase * > | fields_param | 
Definition at line 30 of file PJSoftConstraintSolver.h.
| typedef ::dyno::BallAndSocketJoint<Real> dyno::PJSoftConstraintSolver< TDataType >::BallAndSocketJoint | 
Definition at line 42 of file PJSoftConstraintSolver.h.
| typedef ::dyno::TConstraintPair<Real> dyno::PJSoftConstraintSolver< TDataType >::Constraint | 
Definition at line 40 of file PJSoftConstraintSolver.h.
| typedef ::dyno::TContactPair<Real> dyno::PJSoftConstraintSolver< TDataType >::ContactPair | 
Definition at line 39 of file PJSoftConstraintSolver.h.
| typedef TDataType::Coord dyno::PJSoftConstraintSolver< TDataType >::Coord | 
Definition at line 35 of file PJSoftConstraintSolver.h.
| typedef ::dyno::FixedJoint<Real> dyno::PJSoftConstraintSolver< TDataType >::FixedJoint | 
Definition at line 45 of file PJSoftConstraintSolver.h.
| typedef ::dyno::HingeJoint<Real> dyno::PJSoftConstraintSolver< TDataType >::HingeJoint | 
Definition at line 44 of file PJSoftConstraintSolver.h.
| typedef TDataType::Matrix dyno::PJSoftConstraintSolver< TDataType >::Matrix | 
Definition at line 36 of file PJSoftConstraintSolver.h.
| typedef ::dyno::PointJoint<Real> dyno::PJSoftConstraintSolver< TDataType >::PointJoint | 
Definition at line 46 of file PJSoftConstraintSolver.h.
| typedef TDataType::Real dyno::PJSoftConstraintSolver< TDataType >::Real | 
Definition at line 34 of file PJSoftConstraintSolver.h.
| typedef ::dyno::SliderJoint<Real> dyno::PJSoftConstraintSolver< TDataType >::SliderJoint | 
Definition at line 43 of file PJSoftConstraintSolver.h.
| typedef ::dyno::Quat<Real> dyno::PJSoftConstraintSolver< TDataType >::TQuat | 
Definition at line 38 of file PJSoftConstraintSolver.h.
| dyno::PJSoftConstraintSolver< TDataType >::PJSoftConstraintSolver | ( | ) | 
| dyno::PJSoftConstraintSolver< TDataType >::~PJSoftConstraintSolver | ( | ) | 
      
  | 
  overrideprotectedvirtual | 
Implements dyno::ConstraintModule.
| dyno::PJSoftConstraintSolver< TDataType >::DEF_ARRAY_IN | ( | Attribute | , | 
| Attribute | , | ||
| DeviceType::GPU | , | ||
| "Rigid body attributes" | ) | 
| dyno::PJSoftConstraintSolver< TDataType >::DEF_ARRAY_IN | ( | ContactPair | , | 
| Contacts | , | ||
| DeviceType::GPU | , | ||
| "" | ) | 
| dyno::PJSoftConstraintSolver< TDataType >::DEF_ARRAY_IN | ( | Coord | , | 
| AngularVelocity | , | ||
| DeviceType::GPU | , | ||
| "Angular velocity of rigid bodies" | ) | 
| dyno::PJSoftConstraintSolver< TDataType >::DEF_ARRAY_IN | ( | Coord | , | 
| Center | , | ||
| DeviceType::GPU | , | ||
| "Center of rigid bodies" | ) | 
| dyno::PJSoftConstraintSolver< TDataType >::DEF_ARRAY_IN | ( | Coord | , | 
| Velocity | , | ||
| DeviceType::GPU | , | ||
| "Velocity of rigid bodies" | ) | 
| dyno::PJSoftConstraintSolver< TDataType >::DEF_ARRAY_IN | ( | Matrix | , | 
| Inertia | , | ||
| DeviceType::GPU | , | ||
| "Interial matrix" | ) | 
| dyno::PJSoftConstraintSolver< TDataType >::DEF_ARRAY_IN | ( | Matrix | , | 
| InitialInertia | , | ||
| DeviceType::GPU | , | ||
| "Interial matrix" | ) | 
| dyno::PJSoftConstraintSolver< TDataType >::DEF_ARRAY_IN | ( | Matrix | , | 
| RotationMatrix | , | ||
| DeviceType::GPU | , | ||
| "Rotation matrix of rigid bodies" | ) | 
| dyno::PJSoftConstraintSolver< TDataType >::DEF_ARRAY_IN | ( | Real | , | 
| FrictionCoefficients | , | ||
| DeviceType::GPU | , | ||
| "FrictionCoefficients of rigid bodies" | ) | 
| dyno::PJSoftConstraintSolver< TDataType >::DEF_ARRAY_IN | ( | Real | , | 
| Mass | , | ||
| DeviceType::GPU | , | ||
| "Mass of rigid bodies" | ) | 
| dyno::PJSoftConstraintSolver< TDataType >::DEF_ARRAY_IN | ( | TQuat | , | 
| Quaternion | , | ||
| DeviceType::GPU | , | ||
| "Quaternion" | ) | 
| dyno::PJSoftConstraintSolver< TDataType >::DEF_INSTANCE_IN | ( | DiscreteElements< TDataType > | , | 
| DiscreteElements | , | ||
| "" | ) | 
| dyno::PJSoftConstraintSolver< TDataType >::DEF_VAR | ( | bool | , | 
| FrictionEnabled | , | ||
| true | , | ||
| "" | ) | 
| dyno::PJSoftConstraintSolver< TDataType >::DEF_VAR | ( | bool | , | 
| GravityEnabled | , | ||
| true | , | ||
| "" | ) | 
| dyno::PJSoftConstraintSolver< TDataType >::DEF_VAR | ( | Real | , | 
| AngularDamping | , | ||
| 0. | 1, | ||
| "" | ) | 
| dyno::PJSoftConstraintSolver< TDataType >::DEF_VAR | ( | Real | , | 
| DampingRatio | , | ||
| 1. | 0, | ||
| "" | ) | 
| dyno::PJSoftConstraintSolver< TDataType >::DEF_VAR | ( | Real | , | 
| FrictionCoefficient | , | ||
| 100 | , | ||
| "" | ) | 
| dyno::PJSoftConstraintSolver< TDataType >::DEF_VAR | ( | Real | , | 
| GravityValue | , | ||
| 9. | 8, | ||
| "" | ) | 
| dyno::PJSoftConstraintSolver< TDataType >::DEF_VAR | ( | Real | , | 
| Hertz | , | ||
| 300 | , | ||
| "" | ) | 
| dyno::PJSoftConstraintSolver< TDataType >::DEF_VAR | ( | Real | , | 
| LinearDamping | , | ||
| 0. | 1, | ||
| "" | ) | 
| dyno::PJSoftConstraintSolver< TDataType >::DEF_VAR | ( | Real | , | 
| Slop | , | ||
| 0 | , | ||
| "" | ) | 
| dyno::PJSoftConstraintSolver< TDataType >::DEF_VAR | ( | uint | , | 
| IterationNumberForVelocitySolver | , | ||
| 300 | , | ||
| "" | ) | 
| dyno::PJSoftConstraintSolver< TDataType >::DEF_VAR_IN | ( | Real | , | 
| TimeStep | , | ||
| "Time step size" | ) | 
      
  | 
  private | 
      
  | 
  private | 
Definition at line 108 of file PJSoftConstraintSolver.h.
      
  | 
  private | 
Definition at line 120 of file PJSoftConstraintSolver.h.
      
  | 
  private | 
Definition at line 116 of file PJSoftConstraintSolver.h.
      
  | 
  private | 
Definition at line 113 of file PJSoftConstraintSolver.h.
      
  | 
  private | 
Definition at line 110 of file PJSoftConstraintSolver.h.
      
  | 
  private | 
Definition at line 111 of file PJSoftConstraintSolver.h.
      
  | 
  private | 
Definition at line 107 of file PJSoftConstraintSolver.h.
      
  | 
  private | 
Definition at line 122 of file PJSoftConstraintSolver.h.
      
  | 
  private | 
Definition at line 123 of file PJSoftConstraintSolver.h.
      
  | 
  private | 
Definition at line 124 of file PJSoftConstraintSolver.h.
      
  | 
  private | 
Definition at line 114 of file PJSoftConstraintSolver.h.
      
  | 
  private | 
Definition at line 118 of file PJSoftConstraintSolver.h.