16 #ifndef SURGSIM_PHYSICS_REPRESENTATION_H
17 #define SURGSIM_PHYSICS_REPRESENTATION_H
27 namespace DataStructures
105 virtual void update(
double dt);
124 virtual void applyCorrection(
double dt,
const Eigen::VectorBlock<SurgSim::Math::Vector>& deltaVelocity);
178 #endif // SURGSIM_PHYSICS_REPRESENTATION_H
Definition: DriveElementFromInputBehavior.cpp:27
Definition: Representation.h:46
Representation(const std::string &name)
Constructor.
Definition: Representation.cpp:28
RepresentationType
Definition: Representation.h:42
bool m_isGravityEnabled
Gravity enabled flag.
Definition: Representation.h:167
std::shared_ptr< SurgSim::Collision::Representation > m_collisionRepresentation
This entity's collision representation, these are usually very specific to the physics representation...
Definition: Representation.h:146
Definition: Representation.h:45
The Representation class defines the base class for all physics objects.
Definition: Representation.h:56
Definition: Location.h:31
size_t m_numDof
Number of degrees of freedom for this representation.
Definition: Representation.h:164
void driveSceneElementPose(const SurgSim::Math::RigidTransform3d &pose)
This conditionally updates that pose for the scenelement to the given pose The update gets exectuded ...
Definition: Representation.cpp:120
bool isGravityEnabled() const
Get the gravity enable flag.
Definition: Representation.cpp:64
virtual ~Representation()
Destructor.
Definition: Representation.cpp:42
virtual void resetParameters()
Reset the representation parameters to their initial/default values.
Definition: Representation.cpp:50
size_t getNumDof() const
Query the object number of degrees of freedom.
Definition: Representation.cpp:54
Definition: Representation.h:51
Definition: Representation.h:49
const SurgSim::Math::Vector3d & getGravity() const
Get the gravity used by this Representation.
Definition: Representation.cpp:105
virtual std::shared_ptr< Localization > createLocalization(const SurgSim::DataStructures::Location &location)
Computes a localized coordinate w.r.t this representation, given a Location object.
Definition: Representation.cpp:91
Definition: Representation.h:48
void setNumDof(size_t numDof)
Set the number of degrees of freedom.
Definition: Representation.cpp:100
Definition: Representation.h:47
virtual void afterUpdate(double dt)
Postprocessing done after the update call This needs to be called from the outside usually from a Com...
Definition: Representation.cpp:87
bool m_isDrivingSceneElementPose
Is this representation driving the sceneElement pose.
Definition: Representation.h:170
virtual void resetState()
Reset the representation to its initial/default state.
Definition: Representation.cpp:46
void setIsGravityEnabled(bool isGravityEnabled)
Set the gravity enable flag.
Definition: Representation.cpp:59
virtual void setCollisionRepresentation(std::shared_ptr< SurgSim::Collision::Representation > representation)
Set the collision representation for this physics representation, when the collision object is involv...
Definition: Representation.cpp:115
std::shared_ptr< SurgSim::Collision::Representation > getCollisionRepresentation() const
Definition: Representation.cpp:110
Definition: Representation.h:44
Eigen::Transform< double, 3, Eigen::Isometry > RigidTransform3d
A 3D rigid (isometric) transform, represented as doubles.
Definition: RigidTransform.h:46
virtual void beforeUpdate(double dt)
Preprocessing done before the update call This needs to be called from the outside usually from a Com...
Definition: Representation.cpp:79
Definitions of small fixed-size vector types.
Representation & operator=(const Representation &)
NO assignment operator.
const SurgSim::Math::Vector3d m_gravity
Gravity vector.
Definition: Representation.h:161
Representations are manifestations of a SceneElement.
Definition: Representation.h:33
virtual RepresentationType getType() const =0
Query the representation type.
Definition: Representation.h:52
virtual void update(double dt)
Update the representation state to the current time step.
Definition: Representation.cpp:83
Definition: Representation.h:50
Eigen::Matrix< double, 3, 1 > Vector3d
A 3D vector of doubles.
Definition: Vector.h:56
void setIsDrivingSceneElementPose(bool isDrivingSceneElementPose)
Set whether this Representation is controlling the pose of the SceneElement that it is part of...
Definition: Representation.cpp:69
bool isDrivingSceneElementPose()
Query if this Representation is controlling the pose of the SceneElement that it is part of...
Definition: Representation.cpp:74
virtual void applyCorrection(double dt, const Eigen::VectorBlock< SurgSim::Math::Vector > &deltaVelocity)
Update the Representation's current position and velocity using a time interval, dt, and change in velocity, deltaVelocity.
Definition: Representation.cpp:96