MassSpringRepresentationContact.h
Go to the documentation of this file.
1 // This file is a part of the OpenSurgSim project.
2 // Copyright 2013, SimQuest Solutions Inc.
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 
16 #ifndef SURGSIM_PHYSICS_MASSSPRINGREPRESENTATIONCONTACT_H
17 #define SURGSIM_PHYSICS_MASSSPRINGREPRESENTATIONCONTACT_H
18 
23 
24 namespace SurgSim
25 {
26 
27 namespace Physics
28 {
29 
36 {
37 public:
40 
43 
47 
50  virtual RepresentationType getRepresentationType() const override;
51 
52 private:
55  virtual size_t doGetNumDof() const override;
56 
65  virtual void doBuild(double dt,
66  const ConstraintData& data,
67  const std::shared_ptr<Localization>& localization,
68  MlcpPhysicsProblem* mlcp,
69  size_t indexOfRepresentation,
70  size_t indexOfConstraint,
71  ConstraintSideSign sign) override;
72 
73 };
74 
75 }; // namespace Physics
76 
77 }; // namespace SurgSim
78 
79 #endif // SURGSIM_PHYSICS_MASSSPRINGREPRESENTATIONCONTACT_H
Definition: DriveElementFromInputBehavior.cpp:27
RepresentationType
Definition: Representation.h:42
A description of a physical mixed LCP system to be solved.
Definition: MlcpPhysicsProblem.h:43
virtual size_t doGetNumDof() const override
Gets the number of degrees of freedom for a frictionless contact.
Definition: MassSpringRepresentationContact.cpp:102
virtual ~MassSpringRepresentationContact()
Destructor.
Definition: MassSpringRepresentationContact.cpp:36
virtual RepresentationType getRepresentationType() const override
Gets the Type of representation that this implementation is concerned with.
Definition: MassSpringRepresentationContact.cpp:97
Base class for all CosntraintData Derived classes should be specific to a given constraint.
Definition: ConstraintData.h:27
virtual SurgSim::Math::MlcpConstraintType getMlcpConstraintType() const override
Gets the Mixed Linear Complementarity Problem constraint type for this ConstraintImplementation.
Definition: MassSpringRepresentationContact.cpp:92
virtual void doBuild(double dt, const ConstraintData &data, const std::shared_ptr< Localization > &localization, MlcpPhysicsProblem *mlcp, size_t indexOfRepresentation, size_t indexOfConstraint, ConstraintSideSign sign) override
Adds a mass-spring frictionless contact constraint to an MlcpPhysicsProblem.
Definition: MassSpringRepresentationContact.cpp:41
MassSpring frictionless contact implementation.
Definition: MassSpringRepresentationContact.h:35
Base class for all constraint implementations. A ConstraintImplementation defines 1 side of a constra...
Definition: ConstraintImplementation.h:40
ConstraintSideSign
Enum defining on which side of the constraint an implementation is (positive or negative side) ...
Definition: ConstraintImplementation.h:37
MassSpringRepresentationContact()
Constructor.
Definition: MassSpringRepresentationContact.cpp:31
MlcpConstraintType
Definition: MlcpConstraintType.h:24