SurgSim::Physics::FemConstraintFixedRotationVector Class Reference

Base class for all FemRepresentation fixed rotation vector constraint implementation. More...

`#include <SurgSim/Physics/FemConstraintFixedRotationVector.h>`

Inheritance diagram for SurgSim::Physics::FemConstraintFixedRotationVector:

## Public Member Functions

| FemConstraintFixedRotationVector ()
| Constructor. More...
virtual | ~FemConstraintFixedRotationVector ()
| Destructor. More...
SurgSim::Physics::ConstraintType | getConstraintType () const override
| Gets the constraint type for this ConstraintImplementation. More...
Public Member Functions inherited from SurgSim::Physics::ConstraintImplementation
| ConstraintImplementation ()
| Constructor. More...
virtual | ~ConstraintImplementation ()
| Destructor. More...
size_t | getNumDof () const
| Gets the number of degree of freedom for this implementation. More...
void | build (double dt, const ConstraintData &data, const std::shared_ptr< Localization > &localization, MlcpPhysicsProblem *mlcp, size_t indexOfRepresentation, size_t indexOfConstraint, ConstraintSideSign sign)
| Builds the subset of an Mlcp physics problem associated to this implementation. More...

## Private Member Functions

size_t | doGetNumDof () const override
| Does get number of degree of freedom. More...
void | doBuild (double dt, const ConstraintData &data, const std::shared_ptr< Localization > &localization, MlcpPhysicsProblem *mlcp, size_t indexOfRepresentation, size_t indexOfConstraint, ConstraintSideSign sign) override

## Additional Inherited Members

Static Public Member Functions inherited from SurgSim::Physics::ConstraintImplementation
static ConstraintImplementationFactory & | getFactory ()
Protected Attributes inherited from SurgSim::Physics::ConstraintImplementation
Eigen::SparseVector< double, Eigen::RowMajor, ptrdiff_t > | m_newH
| Preallocated variable for derived implementations of doBuild. More...

## Detailed Description

Base class for all FemRepresentation fixed rotation vector constraint implementation.

## Constructor & Destructor Documentation

## FemConstraintFixedRotationVector()

SurgSim::Physics::FemConstraintFixedRotationVector::FemConstraintFixedRotationVector | ( |  | ) |

Constructor.

## ~FemConstraintFixedRotationVector()

SurgSim::Physics::FemConstraintFixedRotationVector::~FemConstraintFixedRotationVector | ( |  | ) |

virtual

Destructor.

## Member Function Documentation

## doBuild()

void SurgSim::Physics::FemConstraintFixedRotationVector::doBuild | ( | double | dt,
|  | const ConstraintData & | data,
|  | const std::shared_ptr< Localization > & | localization,
|  | MlcpPhysicsProblem * | mlcp,
|  | size_t | indexOfRepresentation,
|  | size_t | indexOfConstraint,
|  | ConstraintSideSign | sign
| ) |  |

override private virtual

Note
  The constraint violation being calculated based on a quaternion interpolation (slerp), and this type of interpolation being highly non-linear, the classical way of using the implementation one after the other one won't work. Therefore, the RotationVectorConstraint will use the vector mlcp->b to retrieve both representation's rotation vector, then calculate the proper slerp and set the violation back in mlcp->b

Implements SurgSim::Physics::ConstraintImplementation.

## doGetNumDof()

size_t SurgSim::Physics::FemConstraintFixedRotationVector::doGetNumDof | ( |  | ) | const

override private virtual

Does get number of degree of freedom.

Returns
  The number of degree of freedom associated to this implementation

Implements SurgSim::Physics::ConstraintImplementation.

## getConstraintType()

SurgSim::Physics::ConstraintType SurgSim::Physics::FemConstraintFixedRotationVector::getConstraintType | ( |  | ) | const

override virtual

Gets the constraint type for this ConstraintImplementation.

Returns
  The constraint type corresponding to this constraint implementation

Implements SurgSim::Physics::ConstraintImplementation.

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

- SurgSim/Physics/FemConstraintFixedRotationVector.h
- SurgSim/Physics/FemConstraintFixedRotationVector.cpp