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
13
OdeWorld.cc
13
OdeWorld.cc
@ -372,7 +372,8 @@ const dReal * OdeWorld::Object::getPosition()
|
|||||||
}
|
}
|
||||||
else if (m_geoms.size() > 0)
|
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;
|
return m_position;
|
||||||
}
|
}
|
||||||
@ -385,7 +386,8 @@ const dReal * OdeWorld::Object::getRotation()
|
|||||||
}
|
}
|
||||||
else if (m_geoms.size() > 0)
|
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;
|
return m_rotation;
|
||||||
}
|
}
|
||||||
@ -413,7 +415,12 @@ void OdeWorld::Object::getPosition(double * x, double * y, double * z)
|
|||||||
if (m_is_static)
|
if (m_is_static)
|
||||||
{
|
{
|
||||||
if (m_geoms.size() > 0)
|
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
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user