not calling dGeomGetPosition/Rotation() for planes

git-svn-id: svn://anubis/misc/OdeWorld@200 bd8a9e45-a331-0410-811e-c64571078777
This commit is contained in:
josh 2009-10-29 02:52:09 +00:00
parent cd64681a71
commit af7060b853

View File

@ -372,7 +372,8 @@ const dReal * OdeWorld::Object::getPosition()
}
else if (m_geoms.size() > 0)
{
return dGeomGetPosition(m_geoms[0]);
if (dGeomGetClass(m_geoms[0]) != dPlaneClass)
return dGeomGetPosition(m_geoms[0]);
}
return m_position;
}
@ -385,7 +386,8 @@ const dReal * OdeWorld::Object::getRotation()
}
else if (m_geoms.size() > 0)
{
return dGeomGetRotation(m_geoms[0]);
if (dGeomGetClass(m_geoms[0]) != dPlaneClass)
return dGeomGetRotation(m_geoms[0]);
}
return m_rotation;
}
@ -413,7 +415,12 @@ void OdeWorld::Object::getPosition(double * x, double * y, double * z)
if (m_is_static)
{
if (m_geoms.size() > 0)
pos = dGeomGetPosition(m_geoms[0]);
{
if (dGeomGetClass(m_geoms[0]) == dPlaneClass)
pos = &m_position[0];
else
pos = dGeomGetPosition(m_geoms[0]);
}
}
else
{