16 #ifndef SURGSIM_PHYSICS_CONSTRAINTIMPLEMENTATION_H 17 #define SURGSIM_PHYSICS_CONSTRAINTIMPLEMENTATION_H 23 #include "SurgSim/Physics/Representation.h" 24 #include "SurgSim/Physics/ConstraintData.h" 25 #include "SurgSim/Physics/ConstraintImplementationFactory.h" 26 #include "SurgSim/Physics/ConstraintType.h" 27 #include "SurgSim/Physics/Localization.h" 28 #include "SurgSim/Physics/MlcpPhysicsProblem.h" 39 enum ConstraintSideSign {CONSTRAINT_POSITIVE_SIDE, CONSTRAINT_NEGATIVE_SIDE};
72 const std::shared_ptr<Localization>& localization,
74 size_t indexOfRepresentation,
75 size_t indexOfConstraint,
76 ConstraintSideSign sign);
80 Eigen::SparseVector<double, Eigen::RowMajor, ptrdiff_t>
m_newH;
86 virtual size_t doGetNumDof()
const = 0;
96 virtual void doBuild(
double dt,
98 const std::shared_ptr<Localization>& localization,
100 size_t indexOfRepresentation,
101 size_t indexOfConstraint,
102 ConstraintSideSign sign) = 0;
110 #endif // SURGSIM_PHYSICS_CONSTRAINTIMPLEMENTATION_H Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
A description of a physical mixed LCP system to be solved.
Definition: MlcpPhysicsProblem.h:43
static ConstraintImplementationFactory & getFactory()
Definition: ConstraintImplementation.cpp:34
ConstraintImplementation()
Constructor.
Definition: ConstraintImplementation.cpp:26
Base class for all CosntraintData Derived classes should be specific to a given constraint.
Definition: ConstraintData.h:27
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.
Definition: ConstraintImplementation.cpp:45
virtual SurgSim::Physics::ConstraintType getConstraintType() const =0
Gets the constraint type for this ConstraintImplementation.
Base class for all constraint implementations. A ConstraintImplementation defines 1 side of a constra...
Definition: ConstraintImplementation.h:42
Eigen::SparseVector< double, Eigen::RowMajor, ptrdiff_t > m_newH
Preallocated variable for derived implementations of doBuild.
Definition: ConstraintImplementation.h:80
size_t getNumDof() const
Gets the number of degree of freedom for this implementation.
Definition: ConstraintImplementation.cpp:40
This class manages ConstraintImplementations, and can be used to look up the correct implementation b...
Definition: ConstraintImplementationFactory.h:38
virtual ~ConstraintImplementation()
Destructor.
Definition: ConstraintImplementation.cpp:30