Show how to use the btBroadphaseInterface::aabbTest, it collects all objects that overlap with a given bounding box

This fixes old Issue 114
Removed 2 warnings
This commit is contained in:
erwin.coumans
2013-09-11 05:52:19 +00:00
parent a197c58935
commit 1685729b80
3 changed files with 33 additions and 2 deletions

View File

@@ -552,7 +552,7 @@ void btWorldImporter::convertConstraint(btTypedConstraintData* constraintData,bt
}
if (hingeData->m_enableAngularMotor)
{
hinge->enableAngularMotor(true,hingeData->m_motorTargetVelocity,hingeData->m_maxMotorImpulse);
hinge->enableAngularMotor(true,(btScalar)hingeData->m_motorTargetVelocity,(btScalar)hingeData->m_maxMotorImpulse);
}
hinge->setAngularOnly(hingeData->m_angularOnly!=0);
hinge->setLimit(btScalar(hingeData->m_lowerLimit),btScalar(hingeData->m_upperLimit),btScalar(hingeData->m_limitSoftness),btScalar(hingeData->m_biasFactor),btScalar(hingeData->m_relaxationFactor));

View File

@@ -72,7 +72,7 @@ void stringToFloatArray(const std::string& string, btAlignedObjectArray<float>&
btAlignedObjectArray<std::string> pieces;
bullet_utils::split( pieces, string, " ");
for (unsigned int i = 0; i < pieces.size(); ++i)
for ( int i = 0; i < pieces.size(); ++i)
{
assert(pieces[i]!="");
floats.push_back((float)atof(pieces[i].c_str()));