Commit 902218af authored by Sreekanth Arikatla's avatar Sreekanth Arikatla

ENH: Add initialize methods to the geometry mapper

Add initialize methods to the geometry mapper where compute is automatically called
parent ea568004
......@@ -118,6 +118,16 @@ public:
/// \return index of Master corresponding to the idx of Slave
///
virtual size_t getMapIdx(const size_t&) { return 0; }
///
/// \brief Initialize the map
///
virtual void initialize()
{
LOG_IF(FATAL, !this->isValid()) << "Map is invalid!";
this->compute();
}
protected:
///
......
......@@ -89,6 +89,11 @@ public:
{
if (SceneObject::initialize())
{
if (m_collidingToVisualMap)
{
m_collidingToVisualMap->initialize();
}
return true;
}
else
......
......@@ -120,6 +120,16 @@ public:
{
if (CollidingObject::initialize())
{
if (m_physicsToCollidingGeomMap)
{
m_physicsToCollidingGeomMap->initialize();
}
if (m_physicsToVisualGeomMap)
{
m_physicsToVisualGeomMap->initialize();
}
return m_dynamicalModel->initialize();
}
else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment