not calling dGeomGetPosition/Rotation() for planes
git-svn-id: svn://anubis/misc/OdeWorld@200 bd8a9e45-a331-0410-811e-c64571078777
This commit is contained in:
parent
cd64681a71
commit
af7060b853
@ -372,6 +372,7 @@ const dReal * OdeWorld::Object::getPosition()
|
||||
}
|
||||
else if (m_geoms.size() > 0)
|
||||
{
|
||||
if (dGeomGetClass(m_geoms[0]) != dPlaneClass)
|
||||
return dGeomGetPosition(m_geoms[0]);
|
||||
}
|
||||
return m_position;
|
||||
@ -385,6 +386,7 @@ const dReal * OdeWorld::Object::getRotation()
|
||||
}
|
||||
else if (m_geoms.size() > 0)
|
||||
{
|
||||
if (dGeomGetClass(m_geoms[0]) != dPlaneClass)
|
||||
return dGeomGetRotation(m_geoms[0]);
|
||||
}
|
||||
return m_rotation;
|
||||
@ -413,8 +415,13 @@ void OdeWorld::Object::getPosition(double * x, double * y, double * z)
|
||||
if (m_is_static)
|
||||
{
|
||||
if (m_geoms.size() > 0)
|
||||
{
|
||||
if (dGeomGetClass(m_geoms[0]) == dPlaneClass)
|
||||
pos = &m_position[0];
|
||||
else
|
||||
pos = dGeomGetPosition(m_geoms[0]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_body != 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user