Removed obsolete btPoint3: use btVector3 instead
This commit is contained in:
@@ -2173,7 +2173,7 @@ ColladaConverter::updateRigidBodyVelocity (btRigidBody* body)
|
||||
void
|
||||
ColladaConverter::updateConstraint (btTypedConstraint* constraint, domRigid_constraint* rigidConstraint)
|
||||
{
|
||||
if (!constraint->getConstraintType() != D6_CONSTRAINT_TYPE)
|
||||
if (constraint->getConstraintType() != D6_CONSTRAINT_TYPE)
|
||||
return;
|
||||
|
||||
btGeneric6DofConstraint* g6c = (btGeneric6DofConstraint*)constraint;
|
||||
@@ -2711,7 +2711,7 @@ btCollisionShape* ColladaConverter::getCollisionShape(int shapeIndex)
|
||||
void ColladaConverter::deleteAllocatedCollisionShapes()
|
||||
{
|
||||
int i;
|
||||
for (int i=0;i<m_allocatedCollisionShapes.size();i++)
|
||||
for (i=0;i<m_allocatedCollisionShapes.size();i++)
|
||||
{
|
||||
delete m_allocatedCollisionShapes[i];
|
||||
}
|
||||
@@ -3006,7 +3006,7 @@ void ColladaConverter::ConvertRigidBodyRef( btRigidBodyInput& rbInput,btRigidBod
|
||||
domFloat fl0 = listFloats.get(vertIndex);
|
||||
domFloat fl1 = listFloats.get(vertIndex+1);
|
||||
domFloat fl2 = listFloats.get(vertIndex+2);
|
||||
convexHull->addPoint(btPoint3(fl0,fl1,fl2) * m_unitMeterScaling);
|
||||
convexHull->addPoint(btVector3(fl0,fl1,fl2) * m_unitMeterScaling);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3104,7 +3104,7 @@ void ColladaConverter::ConvertRigidBodyRef( btRigidBodyInput& rbInput,btRigidBod
|
||||
domFloat fl2 = listFloats.get(k+2);
|
||||
//printf("float %f %f %f\n",fl0,fl1,fl2);
|
||||
|
||||
convexHullShape->addPoint(btPoint3(fl0,fl1,fl2) * m_unitMeterScaling);
|
||||
convexHullShape->addPoint(btVector3(fl0,fl1,fl2) * m_unitMeterScaling);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3149,7 +3149,7 @@ void ColladaConverter::ConvertRigidBodyRef( btRigidBodyInput& rbInput,btRigidBod
|
||||
domFloat fl2 = listFloats.get(k+2);
|
||||
//printf("float %f %f %f\n",fl0,fl1,fl2);
|
||||
|
||||
convexHullShape->addPoint(btPoint3(fl0,fl1,fl2)*m_unitMeterScaling);
|
||||
convexHullShape->addPoint(btVector3(fl0,fl1,fl2)*m_unitMeterScaling);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3370,7 +3370,7 @@ void ColladaConverter::registerRigidBody(btRigidBody* body, const char* name)
|
||||
btTypedConstraint* constraint = body->getConstraintRef (i);
|
||||
|
||||
// not support by the dom
|
||||
if (!constraint->getConstraintType() != D6_CONSTRAINT_TYPE)
|
||||
if (constraint->getConstraintType() != D6_CONSTRAINT_TYPE)
|
||||
continue;
|
||||
|
||||
btRigidConstraintColladaInfo* rcci = findRigidConstraintColladaInfo(constraint);
|
||||
|
||||
@@ -27,7 +27,7 @@ class btCollisionShape;
|
||||
class btRigidBody;
|
||||
class btTypedConstraint;
|
||||
class btDynamicsWorld;
|
||||
class ConstraintInput;
|
||||
struct ConstraintInput;
|
||||
class btRigidBodyColladaInfo;
|
||||
|
||||
class btRigidBodyColladaInfo
|
||||
|
||||
@@ -213,7 +213,7 @@ namespace ConvexDecomposition
|
||||
unsigned int depth);
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -118,7 +118,7 @@ protected:
|
||||
{
|
||||
//apply the scaling
|
||||
btVector3 const& scale = m_ch_shape->getLocalScaling();
|
||||
btPoint3 const* points = m_ch_shape->getPoints();
|
||||
btVector3 const* points = m_ch_shape->getPoints();
|
||||
for(int i = 0; i < m_ch_shape->getNumPoints(); ++i) {
|
||||
m_vertices[i] = vec3f(scale.x() * points[i].x(), scale.y() * points[i].y(), scale.z() * points[i].z());
|
||||
}
|
||||
|
||||
@@ -316,7 +316,7 @@ void rigidBodyArrayNode::draw( M3dView & view, const MDagPath &path,
|
||||
if(style == M3dView::kFlatShaded ||
|
||||
style == M3dView::kGouraudShaded) {
|
||||
glEnable(GL_LIGHTING);
|
||||
float material[] = { 0.4, 0.3, 1.0, 1.0 };
|
||||
float material[] = { 0.4f, 0.3f, 1.0f, 1.0f };
|
||||
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, material);
|
||||
for(size_t i = 0; i < m_rigid_bodies.size(); ++i) {
|
||||
glPushMatrix();
|
||||
@@ -433,15 +433,15 @@ void rigidBodyArrayNode::computeRigidBodyParam(const MPlug& plug, MDataBlock& da
|
||||
|
||||
MPlug(thisObject, ca_rigidBodies).getValue(update);
|
||||
|
||||
double mass = data.inputValue(ia_mass).asDouble();
|
||||
float mass = data.inputValue(ia_mass).asFloat();
|
||||
vec3f inertia;
|
||||
if(!m_rigid_bodies.empty()) {
|
||||
inertia = mass * m_rigid_bodies[0]->collision_shape()->local_inertia();
|
||||
}
|
||||
double restitution = data.inputValue(ia_restitution).asDouble();
|
||||
double friction = data.inputValue(ia_friction).asDouble();
|
||||
double linearDamping = data.inputValue(ia_linearDamping).asDouble();
|
||||
double angularDamping = data.inputValue(ia_angularDamping).asDouble();
|
||||
float restitution = data.inputValue(ia_restitution).asFloat();
|
||||
float friction = data.inputValue(ia_friction).asFloat();
|
||||
float linearDamping = data.inputValue(ia_linearDamping).asFloat();
|
||||
float angularDamping = data.inputValue(ia_angularDamping).asFloat();
|
||||
|
||||
for(size_t i = 0; i < m_rigid_bodies.size(); ++i) {
|
||||
m_rigid_bodies[i]->set_mass(mass);
|
||||
|
||||
Reference in New Issue
Block a user