Small modifications
This commit is contained in:
parent
44658b90d8
commit
ab86620412
|
@ -401,8 +401,6 @@ void RigidBody::computeMassAndInertiaTensorLocal(Vector3& inertiaTensorLocal, de
|
|||
/// mass that has been set with the RigidBody::setInertiaTensorLocal() method.
|
||||
void RigidBody::updateLocalInertiaTensorFromColliders() {
|
||||
|
||||
const Vector3 centerOfMassLocal = mWorld.mRigidBodyComponents.getCenterOfMassLocal(mEntity);
|
||||
|
||||
// Compute the local-space inertia tensor
|
||||
Vector3 inertiaTensorLocal;
|
||||
decimal totalMass;
|
||||
|
|
|
@ -1329,7 +1329,7 @@ void CollisionDetectionSystem::reduceContactPoints(ContactManifoldInfo& manifold
|
|||
}
|
||||
nbReducedPoints = 3;
|
||||
|
||||
// Compute the 4th point by choosing the triangle that add the most
|
||||
// Compute the 4th point by choosing the triangle that adds the most
|
||||
// triangle area to the previous triangle and has opposite sign area (opposite winding)
|
||||
|
||||
decimal largestArea = decimal(0.0); // Largest area (positive or negative)
|
||||
|
|
|
@ -496,9 +496,6 @@ void SolveSliderJointSystem::solveVelocityConstraint() {
|
|||
Vector3& v1 = mRigidBodyComponents.mConstrainedLinearVelocities[componentIndexBody1];
|
||||
Vector3& v2 = mRigidBodyComponents.mConstrainedLinearVelocities[componentIndexBody2];
|
||||
|
||||
Vector3& w1 = mRigidBodyComponents.mConstrainedAngularVelocities[componentIndexBody1];
|
||||
Vector3& w2 = mRigidBodyComponents.mConstrainedAngularVelocities[componentIndexBody2];
|
||||
|
||||
decimal inverseMassBody1 = mRigidBodyComponents.mInverseMasses[componentIndexBody1];
|
||||
decimal inverseMassBody2 = mRigidBodyComponents.mInverseMasses[componentIndexBody2];
|
||||
|
||||
|
@ -511,6 +508,9 @@ void SolveSliderJointSystem::solveVelocityConstraint() {
|
|||
|
||||
if (mSliderJointComponents.mIsLimitEnabled[i]) {
|
||||
|
||||
Vector3& w1 = mRigidBodyComponents.mConstrainedAngularVelocities[componentIndexBody1];
|
||||
Vector3& w2 = mRigidBodyComponents.mConstrainedAngularVelocities[componentIndexBody2];
|
||||
|
||||
const decimal inverseMassMatrixLimit = mSliderJointComponents.mInverseMassMatrixLimit[i];
|
||||
|
||||
// If the lower limit is violated
|
||||
|
@ -786,9 +786,6 @@ void SolveSliderJointSystem::solvePositionConstraint() {
|
|||
const uint32 componentIndexBody1 = mRigidBodyComponents.getEntityIndex(body1Entity);
|
||||
const uint32 componentIndexBody2 = mRigidBodyComponents.getEntityIndex(body2Entity);
|
||||
|
||||
Vector3& x1 = mRigidBodyComponents.mConstrainedPositions[componentIndexBody1];
|
||||
Vector3& x2 = mRigidBodyComponents.mConstrainedPositions[componentIndexBody2];
|
||||
|
||||
Quaternion& q1 = mRigidBodyComponents.mConstrainedOrientations[componentIndexBody1];
|
||||
Quaternion& q2 = mRigidBodyComponents.mConstrainedOrientations[componentIndexBody2];
|
||||
|
||||
|
@ -861,6 +858,9 @@ void SolveSliderJointSystem::solvePositionConstraint() {
|
|||
|
||||
if (mSliderJointComponents.mIsLimitEnabled[i]) {
|
||||
|
||||
Vector3& x1 = mRigidBodyComponents.mConstrainedPositions[componentIndexBody1];
|
||||
Vector3& x2 = mRigidBodyComponents.mConstrainedPositions[componentIndexBody2];
|
||||
|
||||
const Vector3& r2CrossSliderAxis = mSliderJointComponents.mR2CrossSliderAxis[i];
|
||||
const Vector3& r1PlusUCrossSliderAxis = mSliderJointComponents.mR1PlusUCrossSliderAxis[i];
|
||||
|
||||
|
|
|
@ -292,7 +292,6 @@ void Profiler::printRecursiveNodeReport(ProfileNodeIterator* iterator,
|
|||
for (int i=0; i<spacing; i++) outputStream << " ";
|
||||
outputStream << "| Profiling : " << iterator->getCurrentParentName() <<
|
||||
" (total running time : " << parentTime << " ms) ---" << std::endl;
|
||||
long double totalTime = 0.0L;
|
||||
|
||||
// Recurse over the children of the current node
|
||||
int nbChildren = 0;
|
||||
|
@ -307,7 +306,6 @@ void Profiler::printRecursiveNodeReport(ProfileNodeIterator* iterator,
|
|||
fraction << " % | " << (currentTotalTime / (long double) (nbFrames)) <<
|
||||
" ms/frame (" << iterator->getCurrentNbTotalCalls() << " calls)" <<
|
||||
std::endl;
|
||||
totalTime += currentTotalTime;
|
||||
}
|
||||
|
||||
if (parentTime < accumulatedTime) {
|
||||
|
|
|
@ -215,7 +215,6 @@ void JointsScene::createBallAndSocketJoints() {
|
|||
|
||||
rp3d::Vector3 positionBox(0, 15, 5);
|
||||
openglframework::Vector3 boxDimension(1, 1, 1);
|
||||
const float boxMass = 0.5f;
|
||||
|
||||
for (int i=0; i<NB_BALLSOCKETJOINT_BOXES; i++) {
|
||||
|
||||
|
|
|
@ -164,9 +164,6 @@ PileScene::PileScene(const std::string& name, EngineSettings& settings)
|
|||
|
||||
// ---------- Create the triangular mesh ---------- //
|
||||
|
||||
// Position
|
||||
rp3d::decimal mass = 1.0;
|
||||
|
||||
// Create a convex mesh and a corresponding rigid in the physics world
|
||||
mSandbox = new ConcaveMesh(true, mPhysicsCommon, mPhysicsWorld, meshFolderPath + "sandbox.obj");
|
||||
|
||||
|
|
|
@ -301,9 +301,11 @@ void GLAPIENTRY TestbedApplication::onOpenGLError(GLenum source, GLenum type, GL
|
|||
const GLchar* message, const void* userParam ) {
|
||||
|
||||
if (type == GL_DEBUG_TYPE_ERROR) {
|
||||
/*
|
||||
fprintf( stderr, "GL CALLBACK: %s type = 0x%x, severity = 0x%x, message = %s\n",
|
||||
("** GL ERROR **" ),
|
||||
type, severity, message );
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user