Skip to content
Snippets Groups Projects
Commit 85470771 authored by Alexis Girault's avatar Alexis Girault
Browse files

ENH: Implement getMasterGeometry

Returns master geometry, defined master in the
geometry maps of the objects. Physic geometry will
drive the changes to the colliding geometry, which
will drive the changes to the visual geometry
parent fbc48bae
No related branches found
No related tags found
No related merge requests found
......@@ -36,6 +36,12 @@ CollidingObject::setCollidingGeometry(std::shared_ptr<Geometry> geometry)
m_collidingGeometry = geometry;
}
std::shared_ptr<Geometry>
CollidingObject::getMasterGeometry() const
{
return m_collidingGeometry;
}
std::shared_ptr<GeometryMap>
CollidingObject::getCollidingToVisualMap() const
{
......
......@@ -54,6 +54,11 @@ public:
std::shared_ptr<Geometry> getCollidingGeometry() const;
void setCollidingGeometry(std::shared_ptr<Geometry> geometry);
///
/// \brief Get the master geometry
///
virtual std::shared_ptr<Geometry> getMasterGeometry() const;
///
/// \brief
///
......
......@@ -36,6 +36,12 @@ DynamicObject::setPhysicsGeometry(std::shared_ptr<Geometry> geometry)
m_physicsGeometry = geometry;
}
std::shared_ptr<Geometry>
DynamicObject::getMasterGeometry() const
{
return m_physicsGeometry;
}
std::shared_ptr<GeometryMap>
DynamicObject::getPhysicsToCollidingMap() const
{
......
......@@ -48,6 +48,11 @@ public:
std::shared_ptr<Geometry> getPhysicsGeometry() const;
void setPhysicsGeometry(std::shared_ptr<Geometry> geometry);
///
/// \brief Get the master geometry
///
virtual std::shared_ptr<Geometry> getMasterGeometry() const;
///
/// \brief Set/Get the Physics-to-Collision map
///
......
......@@ -36,6 +36,12 @@ SceneObject::setVisualGeometry(std::shared_ptr<Geometry> geometry)
m_visualGeometry = geometry;
}
std::shared_ptr<Geometry>
SceneObject::getMasterGeometry() const
{
return m_visualGeometry;
}
const SceneObject::Type&
SceneObject::getType() const
{
......
......@@ -82,6 +82,11 @@ public:
std::shared_ptr<Geometry> getVisualGeometry() const;
void setVisualGeometry(std::shared_ptr<Geometry> geometry);
///
/// \brief Get the master geometry
///
virtual std::shared_ptr<Geometry> getMasterGeometry() const;
///
/// \brief Set/Get the geometry used for collisions
///
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment