All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | Private Member Functions | 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 <SurgSim/Physics/ConstraintImplementation.h>

Inheritance diagram for SurgSim::Physics::ConstraintImplementation:
Inheritance graph
[legend]

Public Member Functions

 ConstraintImplementation ()
 Constructor. More...
 
virtual ~ConstraintImplementation ()
 Destructor. More...
 
size_t getNumDof () const
 Gets the number of degree of freedom for this implementation. More...
 
virtual
SurgSim::Math::MlcpConstraintType 
getMlcpConstraintType () const =0
 Gets the Mixed Linear Complementarity Problem constraint type for this ConstraintImplementation. More...
 
virtual RepresentationType getRepresentationType () const =0
 Gets the Type of representation that this implementation is concerned with. 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...
 

Protected Attributes

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

Private Member Functions

virtual size_t doGetNumDof () const =0
 Does get number of degree of freedom. More...
 
virtual void doBuild (double dt, const ConstraintData &data, const std::shared_ptr< Localization > &localization, MlcpPhysicsProblem *mlcp, size_t indexOfRepresentation, size_t indexOfConstraint, ConstraintSideSign sign)=0
 Builds the subset of an Mlcp physics problem associated to this implementation. More...
 

Detailed Description

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

Constructor & Destructor Documentation

SurgSim::Physics::ConstraintImplementation::ConstraintImplementation ( )

Constructor.

Note
Localization embbed the representation, so it is fully defined
SurgSim::Physics::ConstraintImplementation::~ConstraintImplementation ( )
virtual

Destructor.

Member Function Documentation

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 
)
inline

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)
virtual void SurgSim::Physics::ConstraintImplementation::doBuild ( double  dt,
const ConstraintData data,
const std::shared_ptr< Localization > &  localization,
MlcpPhysicsProblem mlcp,
size_t  indexOfRepresentation,
size_t  indexOfConstraint,
ConstraintSideSign  sign 
)
privatepure virtual

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 the constraint
[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)

Implemented in SurgSim::Physics::MassSpringRepresentationContact, SurgSim::Physics::FixedRepresentationContact, SurgSim::Physics::RigidRepresentationContact, SurgSim::Physics::Fem3DRepresentationBilateral3D, SurgSim::Physics::FixedRepresentationBilateral3D, SurgSim::Physics::RigidRepresentationBilateral3D, and SurgSim::Physics::Fem3DRepresentationContact.

virtual size_t SurgSim::Physics::ConstraintImplementation::doGetNumDof ( ) const
privatepure virtual
virtual SurgSim::Math::MlcpConstraintType SurgSim::Physics::ConstraintImplementation::getMlcpConstraintType ( ) const
pure virtual
size_t SurgSim::Physics::ConstraintImplementation::getNumDof ( ) const
inline

Gets the number of degree of freedom for this implementation.

Returns
The number of degree of freedom for this implementation
virtual RepresentationType SurgSim::Physics::ConstraintImplementation::getRepresentationType ( ) const
pure virtual

Member Data Documentation

Eigen::SparseVector<double, 0, ptrdiff_t> SurgSim::Physics::ConstraintImplementation::m_newH
protected

Preallocated variable for derived implementations of doBuild.


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