added fix for heightfield (division by floating point scalar, instead of integer),

added default aligned alloc/free
This commit is contained in:
ejcoumans
2007-09-19 03:19:13 +00:00
parent 339917a9eb
commit 9fb6f0af09
2 changed files with 26 additions and 10 deletions

View File

@@ -145,25 +145,25 @@ void btHeightfieldTerrainShape::getVertex(int x,int y,btVector3& vertex) const
{
vertex.setValue(
height,
(-m_width/2 ) + x,
(-m_length/2 ) + y
(-m_width/btScalar(2.0)) + x,
(-m_length/btScalar(2.0) ) + y
);
break;
}
case 1:
{
vertex.setValue(
(-m_width/2 ) + x,
(-m_width/btScalar(2.0)) + x,
height,
(-m_length/2 ) + y
(-m_length/btScalar(2.0)) + y
);
break;
};
case 2:
{
vertex.setValue(
(-m_width/2 ) + x,
(-m_length/2 ) + y,
(-m_width/btScalar(2.0)) + x,
(-m_length/btScalar(2.0)) + y,
height
);
break;