opensurgsim
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
SurgSim::Physics::ConstraintImplementation Class Referenceabstract

Base class for all constraint implementations. A ConstraintImplementation defines 1 side of a constraint. More...

#include <ConstraintImplementation.h>

Inheritance diagram for SurgSim::Physics::ConstraintImplementation:
SurgSim::Physics::FemConstraintFixedPoint SurgSim::Physics::FemConstraintFixedRotationVector SurgSim::Physics::FemConstraintFrictionalSliding SurgSim::Physics::FemConstraintFrictionlessContact SurgSim::Physics::FemConstraintFrictionlessSliding SurgSim::Physics::FixedConstraintFixedPoint SurgSim::Physics::FixedConstraintFixedRotationVector SurgSim::Physics::FixedConstraintFrictionlessContact SurgSim::Physics::MassSpringConstraintFixedPoint SurgSim::Physics::MassSpringConstraintFrictionalSliding SurgSim::Physics::MassSpringConstraintFrictionlessContact SurgSim::Physics::MockConstraintImplementation SurgSim::Physics::MockFixedConstraintFixedPoint SurgSim::Physics::MockRigidConstraintFixedPoint SurgSim::Physics::RigidConstraintFixedPoint SurgSim::Physics::RigidConstraintFixedRotationVector SurgSim::Physics::RigidConstraintFrictionlessContact

Public Member Functions

 ConstraintImplementation ()
 Constructor.
 
virtual ~ConstraintImplementation ()
 Destructor.
 
size_t getNumDof () const
 Gets the number of degree of freedom for this implementation. More...
 
virtual SurgSim::Physics::ConstraintType getConstraintType () const =0
 Gets the constraint type for this ConstraintImplementation. 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...
 

Static Public Member Functions

static ConstraintImplementationFactorygetFactory ()
 

Protected Attributes

Eigen::SparseVector< double, Eigen::RowMajor, ptrdiff_t > m_newH
 Preallocated variable for derived implementations of doBuild.
 

Detailed Description

Base class for all constraint implementations. A ConstraintImplementation defines 1 side of a constraint.

Member Function Documentation

§ build()

void SurgSim::Physics::ConstraintImplementation::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.

Parameters
dtThe time step
dataThe data associated to the constraint
localizationThe localization for this implementation
[in,out]mlcpThe Mixed LCP physics problem to fill up
indexOfRepresentationThe index of the representation (associated to this implementation) in the mlcp
indexOfConstraintThe index of the constraint in the mlcp
signThe sign of this implementation in the constraint (positive or negative side)

§ getConstraintType()

virtual SurgSim::Physics::ConstraintType SurgSim::Physics::ConstraintImplementation::getConstraintType ( ) const
pure virtual

§ getFactory()

ConstraintImplementationFactory & SurgSim::Physics::ConstraintImplementation::getFactory ( )
static
Returns
The static class factory that contains the implementations for a given Representation type.

§ getNumDof()

size_t SurgSim::Physics::ConstraintImplementation::getNumDof ( ) const

Gets the number of degree of freedom for this implementation.

Returns
The number of degree of freedom for this implementation

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