Changeset 10191 for code/trunk/src/libraries/tools/BulletDebugDrawer.cc
- Timestamp:
- Jan 11, 2015, 9:28:39 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/libraries/tools/BulletDebugDrawer.cc
r10190 r10191 59 59 void BulletDebugDrawer::drawSphere(const btVector3& p, btScalar radius, const btVector3& color) 60 60 { 61 this->drawer->drawSphere(vector3(p), radius, colour(color, 1.0f), true);61 this->drawer->drawSphere(vector3(p), Ogre::Quaternion::IDENTITY, radius, colour(color, 1.0f), true); 62 62 } 63 63 64 64 void BulletDebugDrawer::drawSphere(btScalar radius, const btTransform& transform, const btVector3& color) 65 65 { 66 this->drawSphere(transform.getOrigin(), radius, color); 66 Ogre::Matrix4 matrix = matrix4(transform); 67 this->drawer->drawSphere(matrix.getTrans(), matrix.extractQuaternion(), radius, colour(color, 1.0f), true); 67 68 } 68 69 … … 93 94 corners[7] = Ogre::Vector3(trans * btVector3(bbMax[0], bbMin[1], bbMax[2])); 94 95 this->drawer->drawCuboid(corners, colour(color, 1.0f), true); 96 } 97 98 void BulletDebugDrawer::drawCylinder(btScalar radius, btScalar halfHeight, int upAxis, const btTransform& transform, const btVector3& color) 99 { 100 Ogre::Matrix4 matrix = matrix4(transform); 101 this->drawer->drawCylinder(matrix.getTrans(), matrix.extractQuaternion(), radius, halfHeight * 2, colour(color, 1.0f), true); 102 } 103 104 void BulletDebugDrawer::drawCone(btScalar radius, btScalar height, int upAxis, const btTransform& transform, const btVector3& color) 105 { 106 Ogre::Matrix4 matrix = matrix4(transform); 107 this->drawer->drawCone(matrix.getTrans(), matrix.extractQuaternion(), radius, height, colour(color, 1.0f), true); 95 108 } 96 109
Note: See TracChangeset
for help on using the changeset viewer.