9 #include "imstkSceneObject.h" 10 #include "imstkMacros.h" 11 #include "imstkMath.h" 12 #include "imstkCollisionData.h" 14 #include <unordered_map> 34 std::shared_ptr<Geometry> getCollidingGeometry()
const;
37 void setCollidingGeometry(std::shared_ptr<Geometry> geometry);
43 std::shared_ptr<GeometryMap> getCollidingToVisualMap()
const;
44 void setCollidingToVisualMap(std::shared_ptr<GeometryMap> map);
61 bool didCollide(std::shared_ptr<CollidingObject> other);
64 void addCollision(std::shared_ptr<CollidingObject> other, std::shared_ptr<imstk::CollisionData> data);
66 const std::vector<std::shared_ptr<imstk::CollisionData>>& getCollisions(std::shared_ptr<CollidingObject> other)
const;
76 Vec3d m_force = Vec3d::Zero();
78 std::unordered_map<std::shared_ptr<CollidingObject>, std::vector<std::shared_ptr<CollisionData>>> m_collisions;
void updateGeometries() override
Updates the geometries from the maps (if defined)
void postModifiedAll() override
Posts modified for all geometries.
void clearCollisions()
resets the collision information
void update() override
Update the SceneObject, called during scene update.
bool initialize() override
Initialize the scene object.
void addCollision(std::shared_ptr< CollidingObject > other, std::shared_ptr< imstk::CollisionData > data)
Add data for collision with the object `other.
std::shared_ptr< GeometryMap > m_collidingToVisualMap
Maps transformations to visual geometry.
bool didCollide(std::shared_ptr< CollidingObject > other)
Base class for all scene objects. A scene object can optionally be visible and collide with other sce...
A SceneObject with a geometry for collision.
std::shared_ptr< Geometry > m_collidingGeometry
Geometry for collisions.