+Added btDbvtBroadphase, this very fast/efficient broadphase is based on Dynamic AABB tree (btDbvt).
+SoftBody improvements by Nathanael Presson: +Add tetrahedralization +Add support for tearing/slicing cloth and deformable volumes. Uncomment the line in Bullet/src/BulletSoftBody/btSoftBodyHelpers.h: //#define BT_SOFTBODY_USE_STL 1
This commit is contained in:
@@ -34,6 +34,21 @@ void GLDebugDrawer::drawLine(const btVector3& from,const btVector3& to,const btV
|
||||
}
|
||||
}
|
||||
|
||||
void GLDebugDrawer::drawTriangle(const btVector3& a,const btVector3& b,const btVector3& c,const btVector3& color,btScalar alpha)
|
||||
{
|
||||
// if (m_debugMode > 0)
|
||||
{
|
||||
const btVector3 n=cross(b-a,c-a).normalized();
|
||||
glBegin(GL_TRIANGLES);
|
||||
glColor4f(color.getX(), color.getY(), color.getZ(),alpha);
|
||||
glNormal3d(n.getX(),n.getY(),n.getZ());
|
||||
glVertex3d(a.getX(),a.getY(),a.getZ());
|
||||
glVertex3d(b.getX(),b.getY(),b.getZ());
|
||||
glVertex3d(c.getX(),c.getY(),c.getZ());
|
||||
glEnd();
|
||||
}
|
||||
}
|
||||
|
||||
void GLDebugDrawer::setDebugMode(int debugMode)
|
||||
{
|
||||
m_debugMode = debugMode;
|
||||
@@ -76,3 +91,4 @@ void GLDebugDrawer::drawContactPoint(const btVector3& pointOnB,const btVector3&
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -15,7 +15,9 @@ public:
|
||||
|
||||
|
||||
virtual void drawLine(const btVector3& from,const btVector3& to,const btVector3& color);
|
||||
|
||||
|
||||
virtual void drawTriangle(const btVector3& a,const btVector3& b,const btVector3& c,const btVector3& color,btScalar alpha);
|
||||
|
||||
virtual void drawContactPoint(const btVector3& PointOnB,const btVector3& normalOnB,btScalar distance,int lifeTime,const btVector3& color);
|
||||
|
||||
virtual void reportErrorWarning(const char* warningString);
|
||||
|
||||
Reference in New Issue
Block a user