add m_rollingFriction to serialization structures

add btContactSolverInfo and gravity to serialization structures
(actual serialization code will follow soon)
This commit is contained in:
erwin.coumans
2012-09-21 23:37:24 +00:00
parent 214579ec60
commit f2c9cdfb11
5 changed files with 802 additions and 648 deletions

View File

@@ -144,6 +144,8 @@ typedef unsigned long uintptr_t;
#include "BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h"
#include "BulletDynamics/ConstraintSolver/btGeneric6DofSpringConstraint.h"
#include "BulletDynamics/ConstraintSolver/btSliderConstraint.h"
#include "BulletDynamics/ConstraintSolver/btContactSolverInfo.h"
#include "BulletDynamics/Dynamics/btDynamicsWorld.h"
#include "BulletDynamics/Dynamics/btRigidBody.h"
#include "BulletSoftBody/btSoftBodyData.h"
@@ -179,6 +181,7 @@ char *includefiles[] = {
"../../../src/BulletCollision/Gimpact/btGImpactShape.h",
"../../../src/BulletCollision/CollisionShapes/btConvexHullShape.h",
"../../../src/BulletCollision/CollisionDispatch/btCollisionObject.h",
"../../../src/BulletDynamics/Dynamics/btDynamicsWorld.h",
"../../../src/BulletDynamics/Dynamics/btRigidBody.h",
"../../../src/BulletDynamics/ConstraintSolver/btTypedConstraint.h",
"../../../src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h",
@@ -187,6 +190,7 @@ char *includefiles[] = {
"../../../src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h",
"../../../src/BulletDynamics/ConstraintSolver/btGeneric6DofSpringConstraint.h",
"../../../src/BulletDynamics/ConstraintSolver/btSliderConstraint.h",
"../../../src/BulletDynamics/ConstraintSolver/btContactSolverInfo.h",
"../../../src/BulletSoftBody/btSoftBodyData.h",
// empty string to indicate end of includefiles
""
@@ -563,6 +567,7 @@ static void *read_file_data(char *filename, int *len_r)
const char* skipStructTypes[]=
{
"btContactSolverInfoData",
"btRigidBodyConstructionInfo",
"Euler",
"btConstraintInfo2",

View File

@@ -472,6 +472,7 @@ struct btCollisionObjectDoubleData
double m_contactProcessingThreshold;
double m_deactivationTime;
double m_friction;
double m_rollingFriction;
double m_restitution;
double m_hitFraction;
double m_ccdSweptSphereRadius;
@@ -504,6 +505,8 @@ struct btCollisionObjectFloatData
float m_contactProcessingThreshold;
float m_deactivationTime;
float m_friction;
float m_rollingFriction;
float m_restitution;
float m_hitFraction;
float m_ccdSweptSphereRadius;
@@ -516,6 +519,7 @@ struct btCollisionObjectFloatData
int m_activationState1;
int m_internalType;
int m_checkCollideWith;
char m_padding[4];
};

View File

@@ -93,4 +93,66 @@ struct btContactSolverInfo : public btContactSolverInfoData
}
};
///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
struct btContactSolverInfoDoubleData
{
double m_tau;
double m_damping;//global non-contact constraint damping, can be locally overridden by constraints during 'getInfo2'.
double m_friction;
double m_timeStep;
double m_restitution;
double m_maxErrorReduction;
double m_sor;
double m_erp;//used as Baumgarte factor
double m_erp2;//used in Split Impulse
double m_globalCfm;//constraint force mixing
double m_splitImpulsePenetrationThreshold;
double m_splitImpulseTurnErp;
double m_linearSlop;
double m_warmstartingFactor;
double m_maxGyroscopicForce;
double m_singleAxisRollingFrictionThreshold;
int m_numIterations;
int m_solverMode;
int m_restingContactRestitutionThreshold;
int m_minimumSolverBatchSize;
int m_splitImpulse;
char m_padding[4];
};
///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
struct btContactSolverInfoFloatData
{
float m_tau;
float m_damping;//global non-contact constraint damping, can be locally overridden by constraints during 'getInfo2'.
float m_friction;
float m_timeStep;
float m_restitution;
float m_maxErrorReduction;
float m_sor;
float m_erp;//used as Baumgarte factor
float m_erp2;//used in Split Impulse
float m_globalCfm;//constraint force mixing
float m_splitImpulsePenetrationThreshold;
float m_splitImpulseTurnErp;
float m_linearSlop;
float m_warmstartingFactor;
float m_maxGyroscopicForce;
float m_singleAxisRollingFrictionThreshold;
int m_numIterations;
int m_solverMode;
int m_restingContactRestitutionThreshold;
int m_minimumSolverBatchSize;
int m_splitImpulse;
char m_padding[4];
};
#endif //BT_CONTACT_SOLVER_INFO

View File

@@ -146,6 +146,21 @@ public:
};
///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
struct btDynamicsWorldDoubleData
{
btContactSolverInfoDoubleData m_solverInfo;
btVector3DoubleData m_gravity;
};
///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
struct btDynamicsWorldFloatData
{
btContactSolverInfoFloatData m_solverInfo;
btVector3FloatData m_gravity;
};
#endif //BT_DYNAMICS_WORLD_H

File diff suppressed because it is too large Load Diff