fix BT_USE_DOUBLE_PRECISION build, address Issue 177
https://github.com/bulletphysics/bullet3/issues/177
This commit is contained in:
@@ -26,8 +26,8 @@ BasicDemo::~BasicDemo()
|
||||
void BasicDemo::createGround(int cubeShapeId)
|
||||
{
|
||||
{
|
||||
float color[]={0.3,0.3,1,1};
|
||||
float halfExtents[]={50,50,50,1};
|
||||
btVector4 color(0.3,0.3,1,1);
|
||||
btVector4 halfExtents(50,50,50,1);
|
||||
btTransform groundTransform;
|
||||
groundTransform.setIdentity();
|
||||
groundTransform.setOrigin(btVector3(0,-50,0));
|
||||
@@ -71,7 +71,7 @@ void BasicDemo::initPhysics()
|
||||
|
||||
|
||||
{
|
||||
float halfExtents[]={scaling,scaling,scaling,1};
|
||||
btVector4 halfExtents(scaling,scaling,scaling,1);
|
||||
btVector4 colors[4] =
|
||||
{
|
||||
btVector4(1,0,0,1),
|
||||
|
||||
@@ -15,8 +15,11 @@ public:
|
||||
{
|
||||
|
||||
}
|
||||
virtual void drawLine(const btVector3& from,const btVector3& to,const btVector3& color)
|
||||
virtual void drawLine(const btVector3& from1,const btVector3& to1,const btVector3& color1)
|
||||
{
|
||||
float from[4] = {from1[0],from1[1],from1[2],from1[3]};
|
||||
float to[4] = {to1[0],to1[1],to1[2],to1[3]};
|
||||
float color[4] = {color1[0],color1[1],color1[2],color1[3]};
|
||||
m_glApp->m_instancingRenderer->drawLine(from,to,color);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,8 +26,8 @@ ChainDemo::~ChainDemo()
|
||||
void ChainDemo::createGround(int cubeShapeId)
|
||||
{
|
||||
{
|
||||
float color[]={0.3,0.3,1,1};
|
||||
float halfExtents[]={50,1,50,1};
|
||||
btVector4 color(0.3,0.3,1,1);
|
||||
btVector4 halfExtents(50,1,50,1);
|
||||
btTransform groundTransform;
|
||||
groundTransform.setIdentity();
|
||||
groundTransform.setOrigin(btVector3(0,-5,0));
|
||||
@@ -85,7 +85,7 @@ void ChainDemo::initPhysics()
|
||||
int sphereShapeId = m_glApp->registerGraphicsSphereShape(radius,false);
|
||||
|
||||
{
|
||||
float halfExtents[]={scaling,scaling,scaling,1};
|
||||
btVector4 halfExtents(scaling,scaling,scaling,1);
|
||||
btVector4 colors[4] =
|
||||
{
|
||||
btVector4(1,0,0,1),
|
||||
|
||||
@@ -38,12 +38,12 @@ struct GraphicsVertex
|
||||
float texcoord[2];
|
||||
};
|
||||
|
||||
static b3Vector4 colors[4] =
|
||||
static btVector4 colors[4] =
|
||||
{
|
||||
b3MakeVector4(1,0,0,1),
|
||||
b3MakeVector4(0,1,0,1),
|
||||
b3MakeVector4(0,1,1,1),
|
||||
b3MakeVector4(1,1,0,1),
|
||||
btVector4(1,0,0,1),
|
||||
btVector4(0,1,0,1),
|
||||
btVector4(0,1,1,1),
|
||||
btVector4(1,1,0,1),
|
||||
};
|
||||
|
||||
|
||||
@@ -435,8 +435,8 @@ btMultiBody* FeatherstoneDemo1::createFeatherstoneMultiBody(class btMultiBodyDyn
|
||||
world_to_local[0] = bod->getWorldToBaseRot();
|
||||
local_origin[0] = bod->getBasePos();
|
||||
//float halfExtents[3]={7.5,0.05,4.5};
|
||||
float halfExtents[3]={7.5,0.45,4.5};
|
||||
{
|
||||
btVector4 halfExtents(7.5,0.45,4.5,1);
|
||||
{
|
||||
|
||||
float pos[4]={local_origin[0].x(),local_origin[0].y(),local_origin[0].z(),1};
|
||||
float quat[4]={-world_to_local[0].x(),-world_to_local[0].y(),-world_to_local[0].z(),world_to_local[0].w()};
|
||||
@@ -455,7 +455,7 @@ btMultiBody* FeatherstoneDemo1::createFeatherstoneMultiBody(class btMultiBodyDyn
|
||||
tr.setRotation(btQuaternion(quat[0],quat[1],quat[2],quat[3]));
|
||||
col->setWorldTransform(tr);
|
||||
|
||||
b3Vector4 color = colors[curColor++];
|
||||
btVector4 color = colors[curColor++];
|
||||
curColor&=3;
|
||||
|
||||
int index = m_glApp->m_instancingRenderer->registerGraphicsInstance(cubeShapeId,tr.getOrigin(),tr.getRotation(),color,halfExtents);
|
||||
@@ -500,7 +500,7 @@ btMultiBody* FeatherstoneDemo1::createFeatherstoneMultiBody(class btMultiBodyDyn
|
||||
col->setFriction(friction);
|
||||
|
||||
|
||||
b3Vector4 color = colors[curColor++];
|
||||
btVector4 color = colors[curColor++];
|
||||
curColor&=3;
|
||||
|
||||
int index = m_glApp->m_instancingRenderer->registerGraphicsInstance(cubeShapeId,tr.getOrigin(),tr.getRotation(),color,halfExtents);
|
||||
@@ -536,8 +536,8 @@ void FeatherstoneDemo1::createGround()
|
||||
|
||||
|
||||
{
|
||||
float color[]={0.3,0.3,1,1};
|
||||
float halfExtents[]={50,50,50,1};
|
||||
btVector4 color(0.3,0.3,1,1);
|
||||
btVector4 halfExtents(50,50,50,1);
|
||||
btTransform groundTransform;
|
||||
groundTransform.setIdentity();
|
||||
groundTransform.setOrigin(btVector3(0,-50,0));
|
||||
|
||||
Reference in New Issue
Block a user