SerializeDemo: create a testFile.bullet if it is missing
Serialization: remove obsolete autogenerated headers Minor changes in btSequentialImpulseConstraintSolver: split methods to make it easier to derive from the class and add functionality.
This commit is contained in:
@@ -5,7 +5,7 @@ cmake_minimum_required(VERSION 2.4)
|
|||||||
SET(MSVC_INCREMENTAL_DEFAULT ON)
|
SET(MSVC_INCREMENTAL_DEFAULT ON)
|
||||||
|
|
||||||
PROJECT(BULLET_PHYSICS)
|
PROJECT(BULLET_PHYSICS)
|
||||||
SET(BULLET_VERSION 2.75)
|
SET(BULLET_VERSION 2.76)
|
||||||
|
|
||||||
IF (NOT CMAKE_BUILD_TYPE)
|
IF (NOT CMAKE_BUILD_TYPE)
|
||||||
# SET(CMAKE_BUILD_TYPE "Debug")
|
# SET(CMAKE_BUILD_TYPE "Debug")
|
||||||
|
|||||||
@@ -122,9 +122,14 @@ void SerializeDemo::initPhysics()
|
|||||||
|
|
||||||
setupEmptyDynamicsWorld();
|
setupEmptyDynamicsWorld();
|
||||||
|
|
||||||
///create a few basic rigid bodies
|
btBulletWorldImporter* fileLoader = new btBulletWorldImporter(m_dynamicsWorld);
|
||||||
|
//fileLoader->setVerboseMode(true);
|
||||||
|
|
||||||
|
if (!fileLoader->loadFile("testFile.bullet"))
|
||||||
|
{
|
||||||
|
///create a few basic rigid bodies and save them to testFile.bullet
|
||||||
btCollisionShape* groundShape = new btBoxShape(btVector3(btScalar(50.),btScalar(50.),btScalar(50.)));
|
btCollisionShape* groundShape = new btBoxShape(btVector3(btScalar(50.),btScalar(50.),btScalar(50.)));
|
||||||
// btCollisionShape* groundShape = new btStaticPlaneShape(btVector3(0,1,0),50);
|
// btCollisionShape* groundShape = new btStaticPlaneShape(btVector3(0,1,0),50);
|
||||||
btCollisionObject* groundObject = 0;
|
btCollisionObject* groundObject = 0;
|
||||||
|
|
||||||
|
|
||||||
@@ -215,14 +220,6 @@ void SerializeDemo::initPhysics()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
clientResetScene();
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef TEST_SERIALIZATION
|
|
||||||
//test serializing this
|
|
||||||
|
|
||||||
#ifdef CREATE_NEW_BULLETFILE
|
|
||||||
int maxSerializeBufferSize = 1024*1024*5;
|
int maxSerializeBufferSize = 1024*1024*5;
|
||||||
|
|
||||||
btDefaultSerializer* serializer = new btDefaultSerializer(maxSerializeBufferSize);
|
btDefaultSerializer* serializer = new btDefaultSerializer(maxSerializeBufferSize);
|
||||||
@@ -249,29 +246,9 @@ void SerializeDemo::initPhysics()
|
|||||||
FILE* f2 = fopen("testFile.bullet","wb");
|
FILE* f2 = fopen("testFile.bullet","wb");
|
||||||
fwrite(serializer->getBufferPointer(),serializer->getCurrentBufferSize(),1,f2);
|
fwrite(serializer->getBufferPointer(),serializer->getCurrentBufferSize(),1,f2);
|
||||||
fclose(f2);
|
fclose(f2);
|
||||||
#endif //CREATE_NEW_BULLETFILE
|
|
||||||
|
|
||||||
exitPhysics();
|
|
||||||
|
|
||||||
//now try again from the loaded file
|
|
||||||
setupEmptyDynamicsWorld();
|
|
||||||
|
|
||||||
printf("loading file\n");
|
|
||||||
btBulletWorldImporter* fileLoader = new btBulletWorldImporter(m_dynamicsWorld);
|
|
||||||
//fileLoader->setVerboseMode(true);
|
|
||||||
|
|
||||||
if (!fileLoader->loadFile("testFile.bullet"))
|
|
||||||
{
|
|
||||||
//cmake generated msvc files need 4 levels deep back... so make a 3rd attempt...
|
|
||||||
if (fileLoader->loadFile("../../../../testFileOriginal.bullet"))
|
|
||||||
{
|
|
||||||
printf("loaded fine\n");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
clientResetScene();
|
||||||
|
|
||||||
#endif //TEST_SERIALIZATION
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,63 +0,0 @@
|
|||||||
/* Copyright (C) 2006-2009 Erwin Coumans & Charlie C
|
|
||||||
*
|
|
||||||
* This software is provided 'as-is', without any express or implied
|
|
||||||
* warranty. In no event will the authors be held liable for any damages
|
|
||||||
* arising from the use of this software.
|
|
||||||
*
|
|
||||||
* Permission is granted to anyone to use this software for any purpose,
|
|
||||||
* including commercial applications, and to alter it and redistribute it
|
|
||||||
* freely, subject to the following restrictions:
|
|
||||||
*
|
|
||||||
* 1. The origin of this software must not be misrepresented; you must not
|
|
||||||
* claim that you wrote the original software. If you use this software
|
|
||||||
* in a product, an acknowledgment in the product documentation would be
|
|
||||||
* appreciated but is not required.
|
|
||||||
* 2. Altered source versions must be plainly marked as such, and must not be
|
|
||||||
* misrepresented as being the original software.
|
|
||||||
* 3. This notice may not be removed or altered from any source distribution.
|
|
||||||
*/
|
|
||||||
// Auto generated from makesdna dna.c
|
|
||||||
#ifndef __BULLET_BTCOLLISIONOBJECTDATA__H__
|
|
||||||
#define __BULLET_BTCOLLISIONOBJECTDATA__H__
|
|
||||||
|
|
||||||
|
|
||||||
// -------------------------------------------------- //
|
|
||||||
#include "bullet_Common.h"
|
|
||||||
#include "bullet_btTransformData.h"
|
|
||||||
#include "bullet_btVector3Data.h"
|
|
||||||
|
|
||||||
namespace Bullet {
|
|
||||||
|
|
||||||
|
|
||||||
// ---------------------------------------------- //
|
|
||||||
class btCollisionObjectData
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
btTransformData m_worldTransform;
|
|
||||||
btTransformData m_interpolationWorldTransform;
|
|
||||||
btVector3Data m_interpolationLinearVelocity;
|
|
||||||
btVector3Data m_interpolationAngularVelocity;
|
|
||||||
btVector3Data m_anisotropicFriction;
|
|
||||||
int m_hasAnisotropicFriction;
|
|
||||||
btScalar m_contactProcessingThreshold;
|
|
||||||
void *m_broadphaseHandle;
|
|
||||||
void *m_collisionShape;
|
|
||||||
btCollisionShapeData *m_rootCollisionShape;
|
|
||||||
int m_collisionFlags;
|
|
||||||
int m_islandTag1;
|
|
||||||
int m_companionId;
|
|
||||||
int m_activationState1;
|
|
||||||
btScalar m_deactivationTime;
|
|
||||||
btScalar m_friction;
|
|
||||||
btScalar m_restitution;
|
|
||||||
int m_internalType;
|
|
||||||
void *m_userObjectPointer;
|
|
||||||
btScalar m_hitFraction;
|
|
||||||
btScalar m_ccdSweptSphereRadius;
|
|
||||||
btScalar m_ccdMotionThreshold;
|
|
||||||
int m_checkCollideWith;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#endif//__BULLET_BTCOLLISIONOBJECTDATA__H__
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
/* Copyright (C) 2006-2009 Erwin Coumans & Charlie C
|
|
||||||
*
|
|
||||||
* This software is provided 'as-is', without any express or implied
|
|
||||||
* warranty. In no event will the authors be held liable for any damages
|
|
||||||
* arising from the use of this software.
|
|
||||||
*
|
|
||||||
* Permission is granted to anyone to use this software for any purpose,
|
|
||||||
* including commercial applications, and to alter it and redistribute it
|
|
||||||
* freely, subject to the following restrictions:
|
|
||||||
*
|
|
||||||
* 1. The origin of this software must not be misrepresented; you must not
|
|
||||||
* claim that you wrote the original software. If you use this software
|
|
||||||
* in a product, an acknowledgment in the product documentation would be
|
|
||||||
* appreciated but is not required.
|
|
||||||
* 2. Altered source versions must be plainly marked as such, and must not be
|
|
||||||
* misrepresented as being the original software.
|
|
||||||
* 3. This notice may not be removed or altered from any source distribution.
|
|
||||||
*/
|
|
||||||
// Auto generated from makesdna dna.c
|
|
||||||
#ifndef __BULLET_BTMATRIX3X3DATA__H__
|
|
||||||
#define __BULLET_BTMATRIX3X3DATA__H__
|
|
||||||
|
|
||||||
|
|
||||||
// -------------------------------------------------- //
|
|
||||||
#include "bullet_Common.h"
|
|
||||||
#include "bullet_btVector3Data.h"
|
|
||||||
|
|
||||||
namespace Bullet {
|
|
||||||
|
|
||||||
|
|
||||||
// ---------------------------------------------- //
|
|
||||||
class btMatrix3x3Data
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
btVector3Data m_el[3];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#endif//__BULLET_BTMATRIX3X3DATA__H__
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
/* Copyright (C) 2006-2009 Erwin Coumans & Charlie C
|
|
||||||
*
|
|
||||||
* This software is provided 'as-is', without any express or implied
|
|
||||||
* warranty. In no event will the authors be held liable for any damages
|
|
||||||
* arising from the use of this software.
|
|
||||||
*
|
|
||||||
* Permission is granted to anyone to use this software for any purpose,
|
|
||||||
* including commercial applications, and to alter it and redistribute it
|
|
||||||
* freely, subject to the following restrictions:
|
|
||||||
*
|
|
||||||
* 1. The origin of this software must not be misrepresented; you must not
|
|
||||||
* claim that you wrote the original software. If you use this software
|
|
||||||
* in a product, an acknowledgment in the product documentation would be
|
|
||||||
* appreciated but is not required.
|
|
||||||
* 2. Altered source versions must be plainly marked as such, and must not be
|
|
||||||
* misrepresented as being the original software.
|
|
||||||
* 3. This notice may not be removed or altered from any source distribution.
|
|
||||||
*/
|
|
||||||
// Auto generated from makesdna dna.c
|
|
||||||
#ifndef __BULLET_BTRIGIDBODYDATA__H__
|
|
||||||
#define __BULLET_BTRIGIDBODYDATA__H__
|
|
||||||
|
|
||||||
|
|
||||||
// -------------------------------------------------- //
|
|
||||||
#include "bullet_Common.h"
|
|
||||||
#include "bullet_btCollisionObjectData.h"
|
|
||||||
#include "bullet_btMatrix3x3Data.h"
|
|
||||||
#include "bullet_btVector3Data.h"
|
|
||||||
|
|
||||||
namespace Bullet {
|
|
||||||
|
|
||||||
|
|
||||||
// ---------------------------------------------- //
|
|
||||||
class btRigidBodyData
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
btCollisionObjectData m_collisionObjectData;
|
|
||||||
btMatrix3x3Data m_invInertiaTensorWorld;
|
|
||||||
btVector3Data m_linearVelocity;
|
|
||||||
btVector3Data m_angularVelocity;
|
|
||||||
btScalar m_inverseMass;
|
|
||||||
btVector3Data m_angularFactor;
|
|
||||||
btVector3Data m_linearFactor;
|
|
||||||
btVector3Data m_gravity;
|
|
||||||
btVector3Data m_gravity_acceleration;
|
|
||||||
btVector3Data m_invInertiaLocal;
|
|
||||||
btVector3Data m_totalForce;
|
|
||||||
btVector3Data m_totalTorque;
|
|
||||||
btScalar m_linearDamping;
|
|
||||||
btScalar m_angularDamping;
|
|
||||||
int m_additionalDamping;
|
|
||||||
btScalar m_additionalDampingFactor;
|
|
||||||
btScalar m_additionalLinearDampingThresholdSqr;
|
|
||||||
btScalar m_additionalAngularDampingThresholdSqr;
|
|
||||||
btScalar m_additionalAngularDampingFactor;
|
|
||||||
btScalar m_linearSleepingThreshold;
|
|
||||||
btScalar m_angularSleepingThreshold;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#endif//__BULLET_BTRIGIDBODYDATA__H__
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
/* Copyright (C) 2006-2009 Erwin Coumans & Charlie C
|
|
||||||
*
|
|
||||||
* This software is provided 'as-is', without any express or implied
|
|
||||||
* warranty. In no event will the authors be held liable for any damages
|
|
||||||
* arising from the use of this software.
|
|
||||||
*
|
|
||||||
* Permission is granted to anyone to use this software for any purpose,
|
|
||||||
* including commercial applications, and to alter it and redistribute it
|
|
||||||
* freely, subject to the following restrictions:
|
|
||||||
*
|
|
||||||
* 1. The origin of this software must not be misrepresented; you must not
|
|
||||||
* claim that you wrote the original software. If you use this software
|
|
||||||
* in a product, an acknowledgment in the product documentation would be
|
|
||||||
* appreciated but is not required.
|
|
||||||
* 2. Altered source versions must be plainly marked as such, and must not be
|
|
||||||
* misrepresented as being the original software.
|
|
||||||
* 3. This notice may not be removed or altered from any source distribution.
|
|
||||||
*/
|
|
||||||
// Auto generated from makesdna dna.c
|
|
||||||
#ifndef __BULLET_BTTRANSFORMDATA__H__
|
|
||||||
#define __BULLET_BTTRANSFORMDATA__H__
|
|
||||||
|
|
||||||
|
|
||||||
// -------------------------------------------------- //
|
|
||||||
#include "bullet_Common.h"
|
|
||||||
#include "bullet_btMatrix3x3Data.h"
|
|
||||||
#include "bullet_btVector3Data.h"
|
|
||||||
|
|
||||||
namespace Bullet {
|
|
||||||
|
|
||||||
|
|
||||||
// ---------------------------------------------- //
|
|
||||||
class btTransformData
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
btMatrix3x3Data m_basis;
|
|
||||||
btVector3Data m_origin;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#endif//__BULLET_BTTRANSFORMDATA__H__
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
/* Copyright (C) 2006-2009 Erwin Coumans & Charlie C
|
|
||||||
*
|
|
||||||
* This software is provided 'as-is', without any express or implied
|
|
||||||
* warranty. In no event will the authors be held liable for any damages
|
|
||||||
* arising from the use of this software.
|
|
||||||
*
|
|
||||||
* Permission is granted to anyone to use this software for any purpose,
|
|
||||||
* including commercial applications, and to alter it and redistribute it
|
|
||||||
* freely, subject to the following restrictions:
|
|
||||||
*
|
|
||||||
* 1. The origin of this software must not be misrepresented; you must not
|
|
||||||
* claim that you wrote the original software. If you use this software
|
|
||||||
* in a product, an acknowledgment in the product documentation would be
|
|
||||||
* appreciated but is not required.
|
|
||||||
* 2. Altered source versions must be plainly marked as such, and must not be
|
|
||||||
* misrepresented as being the original software.
|
|
||||||
* 3. This notice may not be removed or altered from any source distribution.
|
|
||||||
*/
|
|
||||||
// Auto generated from makesdna dna.c
|
|
||||||
#ifndef __BULLET_BTVECTOR3DATA__H__
|
|
||||||
#define __BULLET_BTVECTOR3DATA__H__
|
|
||||||
|
|
||||||
|
|
||||||
// -------------------------------------------------- //
|
|
||||||
#include "bullet_Common.h"
|
|
||||||
|
|
||||||
namespace Bullet {
|
|
||||||
|
|
||||||
|
|
||||||
// ---------------------------------------------- //
|
|
||||||
class btVector3Data
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
btScalar m_floats[4];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#endif//__BULLET_BTVECTOR3DATA__H__
|
|
||||||
@@ -21,3 +21,12 @@ INCLUDE_DIRECTORIES(${includes})
|
|||||||
SET(Main_LIBS LinearMath)
|
SET(Main_LIBS LinearMath)
|
||||||
|
|
||||||
ADD_EXECUTABLE(HeaderGenerator ${cpp_SRC} ${h_SRC})
|
ADD_EXECUTABLE(HeaderGenerator ${cpp_SRC} ${h_SRC})
|
||||||
|
|
||||||
|
IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
|
||||||
|
ADD_CUSTOM_COMMAND(
|
||||||
|
TARGET HeaderGenerator
|
||||||
|
POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/Extras/Serialize/HeaderGenerator/createDnaString.bat ${CMAKE_CURRENT_BINARY_DIR}/createDnaString.bat
|
||||||
|
COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/Extras/Serialize/HeaderGenerator/bulletGenerate.py ${CMAKE_CURRENT_BINARY_DIR}/bulletGenerate.py
|
||||||
|
)
|
||||||
|
ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ header = """/* Copyright (C) 2006-2009 Erwin Coumans & Charlie C
|
|||||||
|
|
||||||
dtList = dump.DataTypeList
|
dtList = dump.DataTypeList
|
||||||
|
|
||||||
out = "../BulletFileLoader/autogenerated/"
|
out = "autogenerated/"
|
||||||
spaces = 4
|
spaces = 4
|
||||||
|
|
||||||
def addSpaces(file, space):
|
def addSpaces(file, space):
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
delete dnaString.txt
|
delete dnaString.txt
|
||||||
|
|
||||||
|
mkdir autogenerated
|
||||||
|
|
||||||
Debug\HeaderGenerator.exe
|
Debug\HeaderGenerator.exe
|
||||||
|
|
||||||
python bulletGenerate.py
|
python bulletGenerate.py
|
||||||
@@ -329,21 +329,17 @@ void applyAnisotropicFriction(btCollisionObject* colObj,btVector3& frictionDirec
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void btSequentialImpulseConstraintSolver::setupFrictionConstraint(btSolverConstraint& solverConstraint, const btVector3& normalAxis,btRigidBody* solverBodyA,btRigidBody* solverBodyB,btManifoldPoint& cp,const btVector3& rel_pos1,const btVector3& rel_pos2,btCollisionObject* colObj0,btCollisionObject* colObj1, btScalar relaxation, btScalar desiredVelocity, btScalar cfmSlip)
|
||||||
btSolverConstraint& btSequentialImpulseConstraintSolver::addFrictionConstraint(const btVector3& normalAxis,btRigidBody* solverBodyA,btRigidBody* solverBodyB,int frictionIndex,btManifoldPoint& cp,const btVector3& rel_pos1,const btVector3& rel_pos2,btCollisionObject* colObj0,btCollisionObject* colObj1, btScalar relaxation, btScalar desiredVelocity, btScalar cfmSlip)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
btRigidBody* body0=btRigidBody::upcast(colObj0);
|
btRigidBody* body0=btRigidBody::upcast(colObj0);
|
||||||
btRigidBody* body1=btRigidBody::upcast(colObj1);
|
btRigidBody* body1=btRigidBody::upcast(colObj1);
|
||||||
|
|
||||||
btSolverConstraint& solverConstraint = m_tmpSolverContactFrictionConstraintPool.expandNonInitializing();
|
|
||||||
//memset(&solverConstraint,0xff,sizeof(btSolverConstraint));
|
|
||||||
solverConstraint.m_contactNormal = normalAxis;
|
solverConstraint.m_contactNormal = normalAxis;
|
||||||
|
|
||||||
solverConstraint.m_solverBodyA = body0 ? body0 : &getFixedBody();
|
solverConstraint.m_solverBodyA = body0 ? body0 : &getFixedBody();
|
||||||
solverConstraint.m_solverBodyB = body1 ? body1 : &getFixedBody();
|
solverConstraint.m_solverBodyB = body1 ? body1 : &getFixedBody();
|
||||||
solverConstraint.m_frictionIndex = frictionIndex;
|
|
||||||
|
|
||||||
solverConstraint.m_friction = cp.m_combinedFriction;
|
solverConstraint.m_friction = cp.m_combinedFriction;
|
||||||
solverConstraint.m_originalContactPoint = 0;
|
solverConstraint.m_originalContactPoint = 0;
|
||||||
@@ -413,7 +409,16 @@ btSolverConstraint& btSequentialImpulseConstraintSolver::addFrictionConstraint(c
|
|||||||
solverConstraint.m_lowerLimit = 0;
|
solverConstraint.m_lowerLimit = 0;
|
||||||
solverConstraint.m_upperLimit = 1e10f;
|
solverConstraint.m_upperLimit = 1e10f;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
btSolverConstraint& btSequentialImpulseConstraintSolver::addFrictionConstraint(const btVector3& normalAxis,btRigidBody* solverBodyA,btRigidBody* solverBodyB,int frictionIndex,btManifoldPoint& cp,const btVector3& rel_pos1,const btVector3& rel_pos2,btCollisionObject* colObj0,btCollisionObject* colObj1, btScalar relaxation, btScalar desiredVelocity, btScalar cfmSlip)
|
||||||
|
{
|
||||||
|
btSolverConstraint& solverConstraint = m_tmpSolverContactFrictionConstraintPool.expandNonInitializing();
|
||||||
|
solverConstraint.m_frictionIndex = frictionIndex;
|
||||||
|
setupFrictionConstraint(solverConstraint, normalAxis, solverBodyA, solverBodyB, cp, rel_pos1, rel_pos2,
|
||||||
|
colObj0, colObj1, relaxation, desiredVelocity, cfmSlip);
|
||||||
return solverConstraint;
|
return solverConstraint;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -447,62 +452,30 @@ int btSequentialImpulseConstraintSolver::getOrInitSolverBody(btCollisionObject&
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
||||||
|
void btSequentialImpulseConstraintSolver::setupContactConstraint(btSolverConstraint& solverConstraint,
|
||||||
void btSequentialImpulseConstraintSolver::convertContact(btPersistentManifold* manifold,const btContactSolverInfo& infoGlobal)
|
btCollisionObject* colObj0, btCollisionObject* colObj1,
|
||||||
|
btManifoldPoint& cp, const btContactSolverInfo& infoGlobal,
|
||||||
|
btVector3& vel, btScalar& rel_vel, btScalar& relaxation,
|
||||||
|
btVector3& rel_pos1, btVector3& rel_pos2)
|
||||||
{
|
{
|
||||||
btCollisionObject* colObj0=0,*colObj1=0;
|
btRigidBody* rb0 = btRigidBody::upcast(colObj0);
|
||||||
|
btRigidBody* rb1 = btRigidBody::upcast(colObj1);
|
||||||
colObj0 = (btCollisionObject*)manifold->getBody0();
|
|
||||||
colObj1 = (btCollisionObject*)manifold->getBody1();
|
|
||||||
|
|
||||||
|
|
||||||
btRigidBody* solverBodyA = btRigidBody::upcast(colObj0);
|
|
||||||
btRigidBody* solverBodyB = btRigidBody::upcast(colObj1);
|
|
||||||
|
|
||||||
|
|
||||||
///avoid collision response between two static objects
|
|
||||||
if (!solverBodyA && !solverBodyB)
|
|
||||||
return;
|
|
||||||
|
|
||||||
btVector3 rel_pos1;
|
|
||||||
btVector3 rel_pos2;
|
|
||||||
btScalar relaxation;
|
|
||||||
|
|
||||||
for (int j=0;j<manifold->getNumContacts();j++)
|
|
||||||
{
|
|
||||||
|
|
||||||
btManifoldPoint& cp = manifold->getContactPoint(j);
|
|
||||||
|
|
||||||
if (cp.getDistance() <= manifold->getContactProcessingThreshold())
|
|
||||||
{
|
|
||||||
|
|
||||||
const btVector3& pos1 = cp.getPositionWorldOnA();
|
const btVector3& pos1 = cp.getPositionWorldOnA();
|
||||||
const btVector3& pos2 = cp.getPositionWorldOnB();
|
const btVector3& pos2 = cp.getPositionWorldOnB();
|
||||||
|
|
||||||
|
// btVector3 rel_pos1 = pos1 - colObj0->getWorldTransform().getOrigin();
|
||||||
|
// btVector3 rel_pos2 = pos2 - colObj1->getWorldTransform().getOrigin();
|
||||||
rel_pos1 = pos1 - colObj0->getWorldTransform().getOrigin();
|
rel_pos1 = pos1 - colObj0->getWorldTransform().getOrigin();
|
||||||
rel_pos2 = pos2 - colObj1->getWorldTransform().getOrigin();
|
rel_pos2 = pos2 - colObj1->getWorldTransform().getOrigin();
|
||||||
|
|
||||||
|
|
||||||
relaxation = 1.f;
|
relaxation = 1.f;
|
||||||
btScalar rel_vel;
|
|
||||||
btVector3 vel;
|
|
||||||
|
|
||||||
int frictionIndex = m_tmpSolverContactConstraintPool.size();
|
|
||||||
|
|
||||||
{
|
|
||||||
btSolverConstraint& solverConstraint = m_tmpSolverContactConstraintPool.expandNonInitializing();
|
|
||||||
btRigidBody* rb0 = btRigidBody::upcast(colObj0);
|
|
||||||
btRigidBody* rb1 = btRigidBody::upcast(colObj1);
|
|
||||||
|
|
||||||
solverConstraint.m_solverBodyA = rb0? rb0 : &getFixedBody();
|
|
||||||
solverConstraint.m_solverBodyB = rb1? rb1 : &getFixedBody();
|
|
||||||
|
|
||||||
solverConstraint.m_originalContactPoint = &cp;
|
|
||||||
|
|
||||||
btVector3 torqueAxis0 = rel_pos1.cross(cp.m_normalWorldOnB);
|
btVector3 torqueAxis0 = rel_pos1.cross(cp.m_normalWorldOnB);
|
||||||
solverConstraint.m_angularComponentA = rb0 ? rb0->getInvInertiaTensorWorld()*torqueAxis0*rb0->getAngularFactor() : btVector3(0,0,0);
|
solverConstraint.m_angularComponentA = rb0 ? rb0->getInvInertiaTensorWorld()*torqueAxis0*rb0->getAngularFactor() : btVector3(0,0,0);
|
||||||
btVector3 torqueAxis1 = rel_pos2.cross(cp.m_normalWorldOnB);
|
btVector3 torqueAxis1 = rel_pos2.cross(cp.m_normalWorldOnB);
|
||||||
solverConstraint.m_angularComponentB = rb1 ? rb1->getInvInertiaTensorWorld()*-torqueAxis1*rb1->getAngularFactor() : btVector3(0,0,0);
|
solverConstraint.m_angularComponentB = rb1 ? rb1->getInvInertiaTensorWorld()*-torqueAxis1*rb1->getAngularFactor() : btVector3(0,0,0);
|
||||||
|
|
||||||
{
|
{
|
||||||
#ifdef COMPUTE_IMPULSE_DENOM
|
#ifdef COMPUTE_IMPULSE_DENOM
|
||||||
btScalar denom0 = rb0->computeImpulseDenominator(pos1,cp.m_normalWorldOnB);
|
btScalar denom0 = rb0->computeImpulseDenominator(pos1,cp.m_normalWorldOnB);
|
||||||
@@ -532,11 +505,11 @@ void btSequentialImpulseConstraintSolver::convertContact(btPersistentManifold* m
|
|||||||
solverConstraint.m_relpos2CrossNormal = rel_pos2.cross(-cp.m_normalWorldOnB);
|
solverConstraint.m_relpos2CrossNormal = rel_pos2.cross(-cp.m_normalWorldOnB);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
btVector3 vel1 = rb0 ? rb0->getVelocityInLocalPoint(rel_pos1) : btVector3(0,0,0);
|
btVector3 vel1 = rb0 ? rb0->getVelocityInLocalPoint(rel_pos1) : btVector3(0,0,0);
|
||||||
btVector3 vel2 = rb1 ? rb1->getVelocityInLocalPoint(rel_pos2) : btVector3(0,0,0);
|
btVector3 vel2 = rb1 ? rb1->getVelocityInLocalPoint(rel_pos2) : btVector3(0,0,0);
|
||||||
|
|
||||||
vel = vel1 - vel2;
|
vel = vel1 - vel2;
|
||||||
|
|
||||||
rel_vel = cp.m_normalWorldOnB.dot(vel);
|
rel_vel = cp.m_normalWorldOnB.dot(vel);
|
||||||
|
|
||||||
btScalar penetration = cp.getDistance()+infoGlobal.m_linearSlop;
|
btScalar penetration = cp.getDistance()+infoGlobal.m_linearSlop;
|
||||||
@@ -605,13 +578,110 @@ void btSequentialImpulseConstraintSolver::convertContact(btPersistentManifold* m
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void btSequentialImpulseConstraintSolver::setFrictionConstraintImpulse( btSolverConstraint& solverConstraint,
|
||||||
|
btRigidBody* rb0, btRigidBody* rb1,
|
||||||
|
btManifoldPoint& cp, const btContactSolverInfo& infoGlobal)
|
||||||
|
{
|
||||||
|
if (infoGlobal.m_solverMode & SOLVER_USE_FRICTION_WARMSTARTING)
|
||||||
|
{
|
||||||
|
{
|
||||||
|
btSolverConstraint& frictionConstraint1 = m_tmpSolverContactFrictionConstraintPool[solverConstraint.m_frictionIndex];
|
||||||
|
if (infoGlobal.m_solverMode & SOLVER_USE_WARMSTARTING)
|
||||||
|
{
|
||||||
|
frictionConstraint1.m_appliedImpulse = cp.m_appliedImpulseLateral1 * infoGlobal.m_warmstartingFactor;
|
||||||
|
if (rb0)
|
||||||
|
rb0->internalApplyImpulse(frictionConstraint1.m_contactNormal*rb0->getInvMass()*rb0->getLinearFactor(),frictionConstraint1.m_angularComponentA,frictionConstraint1.m_appliedImpulse);
|
||||||
|
if (rb1)
|
||||||
|
rb1->internalApplyImpulse(frictionConstraint1.m_contactNormal*rb1->getInvMass()*rb1->getLinearFactor(),-frictionConstraint1.m_angularComponentB,-frictionConstraint1.m_appliedImpulse);
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
frictionConstraint1.m_appliedImpulse = 0.f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((infoGlobal.m_solverMode & SOLVER_USE_2_FRICTION_DIRECTIONS))
|
||||||
|
{
|
||||||
|
btSolverConstraint& frictionConstraint2 = m_tmpSolverContactFrictionConstraintPool[solverConstraint.m_frictionIndex+1];
|
||||||
|
if (infoGlobal.m_solverMode & SOLVER_USE_WARMSTARTING)
|
||||||
|
{
|
||||||
|
frictionConstraint2.m_appliedImpulse = cp.m_appliedImpulseLateral2 * infoGlobal.m_warmstartingFactor;
|
||||||
|
if (rb0)
|
||||||
|
rb0->internalApplyImpulse(frictionConstraint2.m_contactNormal*rb0->getInvMass(),frictionConstraint2.m_angularComponentA,frictionConstraint2.m_appliedImpulse);
|
||||||
|
if (rb1)
|
||||||
|
rb1->internalApplyImpulse(frictionConstraint2.m_contactNormal*rb1->getInvMass(),-frictionConstraint2.m_angularComponentB,-frictionConstraint2.m_appliedImpulse);
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
frictionConstraint2.m_appliedImpulse = 0.f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
btSolverConstraint& frictionConstraint1 = m_tmpSolverContactFrictionConstraintPool[solverConstraint.m_frictionIndex];
|
||||||
|
frictionConstraint1.m_appliedImpulse = 0.f;
|
||||||
|
if ((infoGlobal.m_solverMode & SOLVER_USE_2_FRICTION_DIRECTIONS))
|
||||||
|
{
|
||||||
|
btSolverConstraint& frictionConstraint2 = m_tmpSolverContactFrictionConstraintPool[solverConstraint.m_frictionIndex+1];
|
||||||
|
frictionConstraint2.m_appliedImpulse = 0.f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void btSequentialImpulseConstraintSolver::convertContact(btPersistentManifold* manifold,const btContactSolverInfo& infoGlobal)
|
||||||
|
{
|
||||||
|
btCollisionObject* colObj0=0,*colObj1=0;
|
||||||
|
|
||||||
|
colObj0 = (btCollisionObject*)manifold->getBody0();
|
||||||
|
colObj1 = (btCollisionObject*)manifold->getBody1();
|
||||||
|
|
||||||
|
|
||||||
|
btRigidBody* solverBodyA = btRigidBody::upcast(colObj0);
|
||||||
|
btRigidBody* solverBodyB = btRigidBody::upcast(colObj1);
|
||||||
|
|
||||||
|
//??????????????????
|
||||||
|
// TODO : check InverseMass instead
|
||||||
|
///avoid collision response between two static objects
|
||||||
|
if (!solverBodyA && !solverBodyB)
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (int j=0;j<manifold->getNumContacts();j++)
|
||||||
|
{
|
||||||
|
|
||||||
|
btManifoldPoint& cp = manifold->getContactPoint(j);
|
||||||
|
|
||||||
|
if (cp.getDistance() <= manifold->getContactProcessingThreshold())
|
||||||
|
{
|
||||||
|
btVector3 rel_pos1;
|
||||||
|
btVector3 rel_pos2;
|
||||||
|
btScalar relaxation;
|
||||||
|
btScalar rel_vel;
|
||||||
|
btVector3 vel;
|
||||||
|
|
||||||
|
int frictionIndex = m_tmpSolverContactConstraintPool.size();
|
||||||
|
btSolverConstraint& solverConstraint = m_tmpSolverContactConstraintPool.expandNonInitializing();
|
||||||
|
btRigidBody* rb0 = btRigidBody::upcast(colObj0);
|
||||||
|
btRigidBody* rb1 = btRigidBody::upcast(colObj1);
|
||||||
|
solverConstraint.m_solverBodyA = rb0? rb0 : &getFixedBody();
|
||||||
|
solverConstraint.m_solverBodyB = rb1? rb1 : &getFixedBody();
|
||||||
|
solverConstraint.m_originalContactPoint = &cp;
|
||||||
|
|
||||||
|
setupContactConstraint(solverConstraint, colObj0, colObj1, cp, infoGlobal, vel, rel_vel, relaxation, rel_pos1, rel_pos2);
|
||||||
|
|
||||||
|
const btVector3& pos1 = cp.getPositionWorldOnA();
|
||||||
|
const btVector3& pos2 = cp.getPositionWorldOnB();
|
||||||
|
|
||||||
/////setup the friction constraints
|
/////setup the friction constraints
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (1)
|
|
||||||
{
|
|
||||||
solverConstraint.m_frictionIndex = m_tmpSolverContactFrictionConstraintPool.size();
|
solverConstraint.m_frictionIndex = m_tmpSolverContactFrictionConstraintPool.size();
|
||||||
|
|
||||||
if (!(infoGlobal.m_solverMode & SOLVER_ENABLE_FRICTION_DIRECTION_CACHING) || !cp.m_lateralFrictionInitialized)
|
if (!(infoGlobal.m_solverMode & SOLVER_ENABLE_FRICTION_DIRECTION_CACHING) || !cp.m_lateralFrictionInitialized)
|
||||||
{
|
{
|
||||||
cp.m_lateralFrictionDir1 = vel - cp.m_normalWorldOnB * rel_vel;
|
cp.m_lateralFrictionDir1 = vel - cp.m_normalWorldOnB * rel_vel;
|
||||||
@@ -657,51 +727,7 @@ void btSequentialImpulseConstraintSolver::convertContact(btPersistentManifold* m
|
|||||||
addFrictionConstraint(cp.m_lateralFrictionDir2,solverBodyA,solverBodyB,frictionIndex,cp,rel_pos1,rel_pos2,colObj0,colObj1, relaxation, cp.m_contactMotion2, cp.m_contactCFM2);
|
addFrictionConstraint(cp.m_lateralFrictionDir2,solverBodyA,solverBodyB,frictionIndex,cp,rel_pos1,rel_pos2,colObj0,colObj1, relaxation, cp.m_contactMotion2, cp.m_contactCFM2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (infoGlobal.m_solverMode & SOLVER_USE_FRICTION_WARMSTARTING)
|
setFrictionConstraintImpulse( solverConstraint, rb0, rb1, cp, infoGlobal);
|
||||||
{
|
|
||||||
{
|
|
||||||
btSolverConstraint& frictionConstraint1 = m_tmpSolverContactFrictionConstraintPool[solverConstraint.m_frictionIndex];
|
|
||||||
if (infoGlobal.m_solverMode & SOLVER_USE_WARMSTARTING)
|
|
||||||
{
|
|
||||||
frictionConstraint1.m_appliedImpulse = cp.m_appliedImpulseLateral1 * infoGlobal.m_warmstartingFactor;
|
|
||||||
if (rb0)
|
|
||||||
rb0->internalApplyImpulse(frictionConstraint1.m_contactNormal*rb0->getInvMass()*rb0->getLinearFactor(),frictionConstraint1.m_angularComponentA,frictionConstraint1.m_appliedImpulse);
|
|
||||||
if (rb1)
|
|
||||||
rb1->internalApplyImpulse(frictionConstraint1.m_contactNormal*rb1->getInvMass()*rb1->getLinearFactor(),-frictionConstraint1.m_angularComponentB,-frictionConstraint1.m_appliedImpulse);
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
frictionConstraint1.m_appliedImpulse = 0.f;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((infoGlobal.m_solverMode & SOLVER_USE_2_FRICTION_DIRECTIONS))
|
|
||||||
{
|
|
||||||
btSolverConstraint& frictionConstraint2 = m_tmpSolverContactFrictionConstraintPool[solverConstraint.m_frictionIndex+1];
|
|
||||||
if (infoGlobal.m_solverMode & SOLVER_USE_WARMSTARTING)
|
|
||||||
{
|
|
||||||
frictionConstraint2.m_appliedImpulse = cp.m_appliedImpulseLateral2 * infoGlobal.m_warmstartingFactor;
|
|
||||||
if (rb0)
|
|
||||||
rb0->internalApplyImpulse(frictionConstraint2.m_contactNormal*rb0->getInvMass(),frictionConstraint2.m_angularComponentA,frictionConstraint2.m_appliedImpulse);
|
|
||||||
if (rb1)
|
|
||||||
rb1->internalApplyImpulse(frictionConstraint2.m_contactNormal*rb1->getInvMass(),-frictionConstraint2.m_angularComponentB,-frictionConstraint2.m_appliedImpulse);
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
frictionConstraint2.m_appliedImpulse = 0.f;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
btSolverConstraint& frictionConstraint1 = m_tmpSolverContactFrictionConstraintPool[solverConstraint.m_frictionIndex];
|
|
||||||
frictionConstraint1.m_appliedImpulse = 0.f;
|
|
||||||
if ((infoGlobal.m_solverMode & SOLVER_USE_2_FRICTION_DIRECTIONS))
|
|
||||||
{
|
|
||||||
btSolverConstraint& frictionConstraint2 = m_tmpSolverContactFrictionConstraintPool[solverConstraint.m_frictionIndex+1];
|
|
||||||
frictionConstraint2.m_appliedImpulse = 0.f;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -901,20 +927,14 @@ btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup(btCol
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendlyIterations(btCollisionObject** /*bodies */,int /*numBodies*/,btPersistentManifold** /*manifoldPtr*/, int /*numManifolds*/,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* /*debugDrawer*/,btStackAlloc* /*stackAlloc*/)
|
btScalar btSequentialImpulseConstraintSolver::solveSingleIteration(int iteration, btCollisionObject** /*bodies */,int /*numBodies*/,btPersistentManifold** /*manifoldPtr*/, int /*numManifolds*/,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* /*debugDrawer*/,btStackAlloc* /*stackAlloc*/)
|
||||||
{
|
{
|
||||||
BT_PROFILE("solveGroupCacheFriendlyIterations");
|
|
||||||
|
|
||||||
int numConstraintPool = m_tmpSolverContactConstraintPool.size();
|
int numConstraintPool = m_tmpSolverContactConstraintPool.size();
|
||||||
int numFrictionPool = m_tmpSolverContactFrictionConstraintPool.size();
|
int numFrictionPool = m_tmpSolverContactFrictionConstraintPool.size();
|
||||||
|
|
||||||
//should traverse the contacts random order...
|
|
||||||
int iteration;
|
|
||||||
{
|
|
||||||
for ( iteration = 0;iteration<infoGlobal.m_numIterations;iteration++)
|
|
||||||
{
|
|
||||||
|
|
||||||
int j;
|
int j;
|
||||||
|
|
||||||
if (infoGlobal.m_solverMode & SOLVER_RANDMIZE_ORDER)
|
if (infoGlobal.m_solverMode & SOLVER_RANDMIZE_ORDER)
|
||||||
{
|
{
|
||||||
if ((iteration & 7) == 0) {
|
if ((iteration & 7) == 0) {
|
||||||
@@ -1008,9 +1028,13 @@ btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendlyIterations(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return 0.f;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
void btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySplitImpulseIterations(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc)
|
||||||
|
{
|
||||||
|
int iteration;
|
||||||
if (infoGlobal.m_splitImpulse)
|
if (infoGlobal.m_splitImpulse)
|
||||||
{
|
{
|
||||||
if (infoGlobal.m_solverMode & SOLVER_SIMD)
|
if (infoGlobal.m_solverMode & SOLVER_SIMD)
|
||||||
@@ -1046,32 +1070,30 @@ btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendlyIterations(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendlyIterations(btCollisionObject** bodies ,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc)
|
||||||
|
{
|
||||||
|
BT_PROFILE("solveGroupCacheFriendlyIterations");
|
||||||
|
|
||||||
|
|
||||||
|
//should traverse the contacts random order...
|
||||||
|
int iteration;
|
||||||
|
{
|
||||||
|
for ( iteration = 0;iteration<infoGlobal.m_numIterations;iteration++)
|
||||||
|
{
|
||||||
|
solveSingleIteration(iteration, bodies ,numBodies,manifoldPtr, numManifolds,constraints,numConstraints,infoGlobal,debugDrawer,stackAlloc);
|
||||||
|
}
|
||||||
|
|
||||||
|
solveGroupCacheFriendlySplitImpulseIterations(bodies ,numBodies,manifoldPtr, numManifolds,constraints,numConstraints,infoGlobal,debugDrawer,stackAlloc);
|
||||||
}
|
}
|
||||||
return 0.f;
|
return 0.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendlyFinish(btCollisionObject** bodies ,int numBodies,btPersistentManifold** /*manifoldPtr*/, int /*numManifolds*/,btTypedConstraint** /*constraints*/,int /* numConstraints*/,const btContactSolverInfo& infoGlobal,btIDebugDraw* /*debugDrawer*/,btStackAlloc* /*stackAlloc*/)
|
||||||
|
|
||||||
/// btSequentialImpulseConstraintSolver Sequentially applies impulses
|
|
||||||
btScalar btSequentialImpulseConstraintSolver::solveGroup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc,btDispatcher* /*dispatcher*/)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
BT_PROFILE("solveGroup");
|
|
||||||
//we only implement SOLVER_CACHE_FRIENDLY now
|
|
||||||
//you need to provide at least some bodies
|
|
||||||
btAssert(bodies);
|
|
||||||
btAssert(numBodies);
|
|
||||||
|
|
||||||
int i;
|
|
||||||
|
|
||||||
solveGroupCacheFriendlySetup( bodies, numBodies, manifoldPtr, numManifolds,constraints, numConstraints,infoGlobal,debugDrawer, stackAlloc);
|
|
||||||
solveGroupCacheFriendlyIterations(bodies, numBodies, manifoldPtr, numManifolds,constraints, numConstraints,infoGlobal,debugDrawer, stackAlloc);
|
|
||||||
|
|
||||||
int numPoolConstraints = m_tmpSolverContactConstraintPool.size();
|
int numPoolConstraints = m_tmpSolverContactConstraintPool.size();
|
||||||
int j;
|
int i,j;
|
||||||
|
|
||||||
for (j=0;j<numPoolConstraints;j++)
|
for (j=0;j<numPoolConstraints;j++)
|
||||||
{
|
{
|
||||||
@@ -1128,11 +1150,23 @@ btScalar btSequentialImpulseConstraintSolver::solveGroup(btCollisionObject** bod
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// btSequentialImpulseConstraintSolver Sequentially applies impulses
|
||||||
|
btScalar btSequentialImpulseConstraintSolver::solveGroup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc,btDispatcher* /*dispatcher*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
BT_PROFILE("solveGroup");
|
||||||
|
//you need to provide at least some bodies
|
||||||
|
btAssert(bodies);
|
||||||
|
btAssert(numBodies);
|
||||||
|
|
||||||
|
solveGroupCacheFriendlySetup( bodies, numBodies, manifoldPtr, numManifolds,constraints, numConstraints,infoGlobal,debugDrawer, stackAlloc);
|
||||||
|
|
||||||
|
solveGroupCacheFriendlyIterations(bodies, numBodies, manifoldPtr, numManifolds,constraints, numConstraints,infoGlobal,debugDrawer, stackAlloc);
|
||||||
|
|
||||||
|
solveGroupCacheFriendlyFinish(bodies, numBodies, manifoldPtr, numManifolds,constraints, numConstraints,infoGlobal,debugDrawer, stackAlloc);
|
||||||
|
|
||||||
|
return 0.f;
|
||||||
|
}
|
||||||
|
|
||||||
void btSequentialImpulseConstraintSolver::reset()
|
void btSequentialImpulseConstraintSolver::reset()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -36,8 +36,20 @@ protected:
|
|||||||
btAlignedObjectArray<int> m_orderFrictionConstraintPool;
|
btAlignedObjectArray<int> m_orderFrictionConstraintPool;
|
||||||
btAlignedObjectArray<btTypedConstraint::btConstraintInfo1> m_tmpConstraintSizesPool;
|
btAlignedObjectArray<btTypedConstraint::btConstraintInfo1> m_tmpConstraintSizesPool;
|
||||||
|
|
||||||
|
void setupFrictionConstraint( btSolverConstraint& solverConstraint, const btVector3& normalAxis,btRigidBody* solverBodyA,btRigidBody* solverBodyIdB,
|
||||||
|
btManifoldPoint& cp,const btVector3& rel_pos1,const btVector3& rel_pos2,
|
||||||
|
btCollisionObject* colObj0,btCollisionObject* colObj1, btScalar relaxation,
|
||||||
|
btScalar desiredVelocity=0., btScalar cfmSlip=0.);
|
||||||
|
|
||||||
btSolverConstraint& addFrictionConstraint(const btVector3& normalAxis,btRigidBody* solverBodyA,btRigidBody* solverBodyB,int frictionIndex,btManifoldPoint& cp,const btVector3& rel_pos1,const btVector3& rel_pos2,btCollisionObject* colObj0,btCollisionObject* colObj1, btScalar relaxation, btScalar desiredVelocity=0., btScalar cfmSlip=0.);
|
btSolverConstraint& addFrictionConstraint(const btVector3& normalAxis,btRigidBody* solverBodyA,btRigidBody* solverBodyB,int frictionIndex,btManifoldPoint& cp,const btVector3& rel_pos1,const btVector3& rel_pos2,btCollisionObject* colObj0,btCollisionObject* colObj1, btScalar relaxation, btScalar desiredVelocity=0., btScalar cfmSlip=0.);
|
||||||
|
|
||||||
|
void setupContactConstraint(btSolverConstraint& solverConstraint, btCollisionObject* colObj0, btCollisionObject* colObj1, btManifoldPoint& cp,
|
||||||
|
const btContactSolverInfo& infoGlobal, btVector3& vel, btScalar& rel_vel, btScalar& relaxation,
|
||||||
|
btVector3& rel_pos1, btVector3& rel_pos2);
|
||||||
|
|
||||||
|
void setFrictionConstraintImpulse( btSolverConstraint& solverConstraint, btRigidBody* rb0, btRigidBody* rb1,
|
||||||
|
btManifoldPoint& cp, const btContactSolverInfo& infoGlobal);
|
||||||
|
|
||||||
///m_btSeed2 is used for re-arranging the constraint rows. improves convergence/quality of friction
|
///m_btSeed2 is used for re-arranging the constraint rows. improves convergence/quality of friction
|
||||||
unsigned long m_btSeed2;
|
unsigned long m_btSeed2;
|
||||||
|
|
||||||
@@ -75,6 +87,13 @@ protected:
|
|||||||
s_fixed.setMassProps(btScalar(0.),btVector3(btScalar(0.),btScalar(0.),btScalar(0.)));
|
s_fixed.setMassProps(btScalar(0.),btVector3(btScalar(0.),btScalar(0.),btScalar(0.)));
|
||||||
return s_fixed;
|
return s_fixed;
|
||||||
}
|
}
|
||||||
|
virtual void solveGroupCacheFriendlySplitImpulseIterations(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc);
|
||||||
|
virtual btScalar solveGroupCacheFriendlyFinish(btCollisionObject** bodies ,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc);
|
||||||
|
btScalar solveSingleIteration(int iteration, btCollisionObject** bodies ,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc);
|
||||||
|
|
||||||
|
virtual btScalar solveGroupCacheFriendlySetup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc);
|
||||||
|
virtual btScalar solveGroupCacheFriendlyIterations(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@@ -84,8 +103,7 @@ public:
|
|||||||
|
|
||||||
virtual btScalar solveGroup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifold,int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& info, btIDebugDraw* debugDrawer, btStackAlloc* stackAlloc,btDispatcher* dispatcher);
|
virtual btScalar solveGroup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifold,int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& info, btIDebugDraw* debugDrawer, btStackAlloc* stackAlloc,btDispatcher* dispatcher);
|
||||||
|
|
||||||
btScalar solveGroupCacheFriendlySetup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc);
|
|
||||||
btScalar solveGroupCacheFriendlyIterations(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc);
|
|
||||||
|
|
||||||
///clear internal cached data and reset random seed
|
///clear internal cached data and reset random seed
|
||||||
virtual void reset();
|
virtual void reset();
|
||||||
|
|||||||
@@ -1,226 +1,3 @@
|
|||||||
unsigned char sBulletDNAstr64[]= {
|
|
||||||
83,68,78,65,78,65,77,69,-124,0,0,0,109,95,115,105,122,101,0,109,
|
|
||||||
95,99,97,112,97,99,105,116,121,0,42,109,95,100,97,116,97,0,109,95,
|
|
||||||
99,111,108,108,105,115,105,111,110,83,104,97,112,101,115,0,109,95,99,111,
|
|
||||||
108,108,105,115,105,111,110,79,98,106,101,99,116,115,0,109,95,99,111,110,
|
|
||||||
115,116,114,97,105,110,116,115,0,42,102,105,114,115,116,0,42,108,97,115,
|
|
||||||
116,0,109,95,102,108,111,97,116,115,91,52,93,0,109,95,101,108,91,51,
|
|
||||||
93,0,109,95,98,97,115,105,115,0,109,95,111,114,105,103,105,110,0,42,
|
|
||||||
109,95,110,97,109,101,0,109,95,115,104,97,112,101,84,121,112,101,0,109,
|
|
||||||
95,112,97,100,100,105,110,103,91,52,93,0,109,95,99,111,108,108,105,115,
|
|
||||||
105,111,110,83,104,97,112,101,68,97,116,97,0,109,95,108,111,99,97,108,
|
|
||||||
83,99,97,108,105,110,103,0,109,95,112,108,97,110,101,78,111,114,109,97,
|
|
||||||
108,0,109,95,112,108,97,110,101,67,111,110,115,116,97,110,116,0,109,95,
|
|
||||||
112,97,100,91,52,93,0,109,95,105,109,112,108,105,99,105,116,83,104,97,
|
|
||||||
112,101,68,105,109,101,110,115,105,111,110,115,0,109,95,99,111,108,108,105,
|
|
||||||
115,105,111,110,77,97,114,103,105,110,0,109,95,112,97,100,100,105,110,103,
|
|
||||||
0,109,95,112,111,115,0,109,95,114,97,100,105,117,115,0,109,95,99,111,
|
|
||||||
110,118,101,120,73,110,116,101,114,110,97,108,83,104,97,112,101,68,97,116,
|
|
||||||
97,0,42,109,95,108,111,99,97,108,80,111,115,105,116,105,111,110,65,114,
|
|
||||||
114,97,121,80,116,114,0,109,95,108,111,99,97,108,80,111,115,105,116,105,
|
|
||||||
111,110,65,114,114,97,121,83,105,122,101,0,109,95,118,97,108,117,101,0,
|
|
||||||
105,110,116,0,42,109,95,118,101,114,116,105,99,101,115,51,102,0,42,109,
|
|
||||||
95,118,101,114,116,105,99,101,115,51,100,0,42,109,95,105,110,100,105,99,
|
|
||||||
101,115,51,50,0,42,109,95,105,110,100,105,99,101,115,49,54,0,109,95,
|
|
||||||
110,117,109,84,114,105,97,110,103,108,101,115,0,109,95,110,117,109,86,101,
|
|
||||||
114,116,105,99,101,115,0,42,109,95,109,101,115,104,80,97,114,116,115,80,
|
|
||||||
116,114,0,109,95,115,99,97,108,105,110,103,0,109,95,110,117,109,77,101,
|
|
||||||
115,104,80,97,114,116,115,0,109,95,109,101,115,104,73,110,116,101,114,102,
|
|
||||||
97,99,101,0,109,95,116,114,97,110,115,102,111,114,109,0,42,109,95,99,
|
|
||||||
104,105,108,100,83,104,97,112,101,0,109,95,99,104,105,108,100,83,104,97,
|
|
||||||
112,101,84,121,112,101,0,109,95,99,104,105,108,100,77,97,114,103,105,110,
|
|
||||||
0,42,109,95,99,104,105,108,100,83,104,97,112,101,80,116,114,0,109,95,
|
|
||||||
110,117,109,67,104,105,108,100,83,104,97,112,101,115,0,109,95,117,112,65,
|
|
||||||
120,105,115,0,109,95,103,105,109,112,97,99,116,83,117,98,84,121,112,101,
|
|
||||||
0,42,109,95,117,110,115,99,97,108,101,100,80,111,105,110,116,115,70,108,
|
|
||||||
111,97,116,80,116,114,0,42,109,95,117,110,115,99,97,108,101,100,80,111,
|
|
||||||
105,110,116,115,68,111,117,98,108,101,80,116,114,0,109,95,110,117,109,85,
|
|
||||||
110,115,99,97,108,101,100,80,111,105,110,116,115,0,109,95,112,97,100,100,
|
|
||||||
105,110,103,51,91,52,93,0,42,109,95,98,114,111,97,100,112,104,97,115,
|
|
||||||
101,72,97,110,100,108,101,0,42,109,95,99,111,108,108,105,115,105,111,110,
|
|
||||||
83,104,97,112,101,0,42,109,95,114,111,111,116,67,111,108,108,105,115,105,
|
|
||||||
111,110,83,104,97,112,101,0,109,95,119,111,114,108,100,84,114,97,110,115,
|
|
||||||
102,111,114,109,0,109,95,105,110,116,101,114,112,111,108,97,116,105,111,110,
|
|
||||||
87,111,114,108,100,84,114,97,110,115,102,111,114,109,0,109,95,105,110,116,
|
|
||||||
101,114,112,111,108,97,116,105,111,110,76,105,110,101,97,114,86,101,108,111,
|
|
||||||
99,105,116,121,0,109,95,105,110,116,101,114,112,111,108,97,116,105,111,110,
|
|
||||||
65,110,103,117,108,97,114,86,101,108,111,99,105,116,121,0,109,95,97,110,
|
|
||||||
105,115,111,116,114,111,112,105,99,70,114,105,99,116,105,111,110,0,109,95,
|
|
||||||
99,111,110,116,97,99,116,80,114,111,99,101,115,115,105,110,103,84,104,114,
|
|
||||||
101,115,104,111,108,100,0,109,95,100,101,97,99,116,105,118,97,116,105,111,
|
|
||||||
110,84,105,109,101,0,109,95,102,114,105,99,116,105,111,110,0,109,95,114,
|
|
||||||
101,115,116,105,116,117,116,105,111,110,0,109,95,104,105,116,70,114,97,99,
|
|
||||||
116,105,111,110,0,109,95,99,99,100,83,119,101,112,116,83,112,104,101,114,
|
|
||||||
101,82,97,100,105,117,115,0,109,95,99,99,100,77,111,116,105,111,110,84,
|
|
||||||
104,114,101,115,104,111,108,100,0,109,95,104,97,115,65,110,105,115,111,116,
|
|
||||||
114,111,112,105,99,70,114,105,99,116,105,111,110,0,109,95,99,111,108,108,
|
|
||||||
105,115,105,111,110,70,108,97,103,115,0,109,95,105,115,108,97,110,100,84,
|
|
||||||
97,103,49,0,109,95,99,111,109,112,97,110,105,111,110,73,100,0,109,95,
|
|
||||||
97,99,116,105,118,97,116,105,111,110,83,116,97,116,101,49,0,109,95,105,
|
|
||||||
110,116,101,114,110,97,108,84,121,112,101,0,109,95,99,104,101,99,107,67,
|
|
||||||
111,108,108,105,100,101,87,105,116,104,0,109,95,99,111,108,108,105,115,105,
|
|
||||||
111,110,79,98,106,101,99,116,68,97,116,97,0,109,95,105,110,118,73,110,
|
|
||||||
101,114,116,105,97,84,101,110,115,111,114,87,111,114,108,100,0,109,95,108,
|
|
||||||
105,110,101,97,114,86,101,108,111,99,105,116,121,0,109,95,97,110,103,117,
|
|
||||||
108,97,114,86,101,108,111,99,105,116,121,0,109,95,97,110,103,117,108,97,
|
|
||||||
114,70,97,99,116,111,114,0,109,95,108,105,110,101,97,114,70,97,99,116,
|
|
||||||
111,114,0,109,95,103,114,97,118,105,116,121,0,109,95,103,114,97,118,105,
|
|
||||||
116,121,95,97,99,99,101,108,101,114,97,116,105,111,110,0,109,95,105,110,
|
|
||||||
118,73,110,101,114,116,105,97,76,111,99,97,108,0,109,95,116,111,116,97,
|
|
||||||
108,70,111,114,99,101,0,109,95,116,111,116,97,108,84,111,114,113,117,101,
|
|
||||||
0,109,95,105,110,118,101,114,115,101,77,97,115,115,0,109,95,108,105,110,
|
|
||||||
101,97,114,68,97,109,112,105,110,103,0,109,95,97,110,103,117,108,97,114,
|
|
||||||
68,97,109,112,105,110,103,0,109,95,97,100,100,105,116,105,111,110,97,108,
|
|
||||||
68,97,109,112,105,110,103,70,97,99,116,111,114,0,109,95,97,100,100,105,
|
|
||||||
116,105,111,110,97,108,76,105,110,101,97,114,68,97,109,112,105,110,103,84,
|
|
||||||
104,114,101,115,104,111,108,100,83,113,114,0,109,95,97,100,100,105,116,105,
|
|
||||||
111,110,97,108,65,110,103,117,108,97,114,68,97,109,112,105,110,103,84,104,
|
|
||||||
114,101,115,104,111,108,100,83,113,114,0,109,95,97,100,100,105,116,105,111,
|
|
||||||
110,97,108,65,110,103,117,108,97,114,68,97,109,112,105,110,103,70,97,99,
|
|
||||||
116,111,114,0,109,95,108,105,110,101,97,114,83,108,101,101,112,105,110,103,
|
|
||||||
84,104,114,101,115,104,111,108,100,0,109,95,97,110,103,117,108,97,114,83,
|
|
||||||
108,101,101,112,105,110,103,84,104,114,101,115,104,111,108,100,0,109,95,97,
|
|
||||||
100,100,105,116,105,111,110,97,108,68,97,109,112,105,110,103,0,109,95,110,
|
|
||||||
117,109,67,111,110,115,116,114,97,105,110,116,82,111,119,115,0,110,117,98,
|
|
||||||
0,42,109,95,114,98,65,0,42,109,95,114,98,66,0,109,95,111,98,106,
|
|
||||||
101,99,116,84,121,112,101,0,109,95,117,115,101,114,67,111,110,115,116,114,
|
|
||||||
97,105,110,116,84,121,112,101,0,109,95,117,115,101,114,67,111,110,115,116,
|
|
||||||
114,97,105,110,116,73,100,0,109,95,110,101,101,100,115,70,101,101,100,98,
|
|
||||||
97,99,107,0,109,95,97,112,112,108,105,101,100,73,109,112,117,108,115,101,
|
|
||||||
0,109,95,100,98,103,68,114,97,119,83,105,122,101,0,109,95,100,105,115,
|
|
||||||
97,98,108,101,67,111,108,108,105,115,105,111,110,115,66,101,116,119,101,101,
|
|
||||||
110,76,105,110,107,101,100,66,111,100,105,101,115,0,109,95,112,97,100,52,
|
|
||||||
91,52,93,0,109,95,116,121,112,101,67,111,110,115,116,114,97,105,110,116,
|
|
||||||
68,97,116,97,0,109,95,112,105,118,111,116,73,110,65,0,109,95,112,105,
|
|
||||||
118,111,116,73,110,66,0,109,95,114,98,65,70,114,97,109,101,0,109,95,
|
|
||||||
114,98,66,70,114,97,109,101,0,109,95,117,115,101,82,101,102,101,114,101,
|
|
||||||
110,99,101,70,114,97,109,101,65,0,109,95,97,110,103,117,108,97,114,79,
|
|
||||||
110,108,121,0,109,95,101,110,97,98,108,101,65,110,103,117,108,97,114,77,
|
|
||||||
111,116,111,114,0,109,95,109,111,116,111,114,84,97,114,103,101,116,86,101,
|
|
||||||
108,111,99,105,116,121,0,109,95,109,97,120,77,111,116,111,114,73,109,112,
|
|
||||||
117,108,115,101,0,109,95,108,111,119,101,114,76,105,109,105,116,0,109,95,
|
|
||||||
117,112,112,101,114,76,105,109,105,116,0,109,95,108,105,109,105,116,83,111,
|
|
||||||
102,116,110,101,115,115,0,109,95,98,105,97,115,70,97,99,116,111,114,0,
|
|
||||||
109,95,114,101,108,97,120,97,116,105,111,110,70,97,99,116,111,114,0,109,
|
|
||||||
95,115,119,105,110,103,83,112,97,110,49,0,109,95,115,119,105,110,103,83,
|
|
||||||
112,97,110,50,0,109,95,116,119,105,115,116,83,112,97,110,0,109,95,100,
|
|
||||||
97,109,112,105,110,103,0,109,95,108,105,110,101,97,114,85,112,112,101,114,
|
|
||||||
76,105,109,105,116,0,109,95,108,105,110,101,97,114,76,111,119,101,114,76,
|
|
||||||
105,109,105,116,0,109,95,97,110,103,117,108,97,114,85,112,112,101,114,76,
|
|
||||||
105,109,105,116,0,109,95,97,110,103,117,108,97,114,76,111,119,101,114,76,
|
|
||||||
105,109,105,116,0,109,95,117,115,101,76,105,110,101,97,114,82,101,102,101,
|
|
||||||
114,101,110,99,101,70,114,97,109,101,65,0,109,95,117,115,101,79,102,102,
|
|
||||||
115,101,116,70,111,114,67,111,110,115,116,114,97,105,110,116,70,114,97,109,
|
|
||||||
101,0,0,0,84,89,80,69,49,0,0,0,99,104,97,114,0,117,99,104,
|
|
||||||
97,114,0,115,104,111,114,116,0,117,115,104,111,114,116,0,105,110,116,0,
|
|
||||||
108,111,110,103,0,117,108,111,110,103,0,102,108,111,97,116,0,100,111,117,
|
|
||||||
98,108,101,0,118,111,105,100,0,80,111,105,110,116,101,114,65,114,114,97,
|
|
||||||
121,0,98,116,80,104,121,115,105,99,115,83,121,115,116,101,109,0,76,105,
|
|
||||||
115,116,66,97,115,101,0,98,116,86,101,99,116,111,114,51,70,108,111,97,
|
|
||||||
116,68,97,116,97,0,98,116,86,101,99,116,111,114,51,68,111,117,98,108,
|
|
||||||
101,68,97,116,97,0,98,116,77,97,116,114,105,120,51,120,51,70,108,111,
|
|
||||||
97,116,68,97,116,97,0,98,116,77,97,116,114,105,120,51,120,51,68,111,
|
|
||||||
117,98,108,101,68,97,116,97,0,98,116,84,114,97,110,115,102,111,114,109,
|
|
||||||
70,108,111,97,116,68,97,116,97,0,98,116,84,114,97,110,115,102,111,114,
|
|
||||||
109,68,111,117,98,108,101,68,97,116,97,0,98,116,67,111,108,108,105,115,
|
|
||||||
105,111,110,83,104,97,112,101,68,97,116,97,0,98,116,83,116,97,116,105,
|
|
||||||
99,80,108,97,110,101,83,104,97,112,101,68,97,116,97,0,98,116,67,111,
|
|
||||||
110,118,101,120,73,110,116,101,114,110,97,108,83,104,97,112,101,68,97,116,
|
|
||||||
97,0,98,116,80,111,115,105,116,105,111,110,65,110,100,82,97,100,105,117,
|
|
||||||
115,0,98,116,77,117,108,116,105,83,112,104,101,114,101,83,104,97,112,101,
|
|
||||||
68,97,116,97,0,98,116,73,110,116,73,110,100,101,120,68,97,116,97,0,
|
|
||||||
98,116,83,104,111,114,116,73,110,116,73,110,100,101,120,68,97,116,97,0,
|
|
||||||
98,116,77,101,115,104,80,97,114,116,68,97,116,97,0,98,116,83,116,114,
|
|
||||||
105,100,105,110,103,77,101,115,104,73,110,116,101,114,102,97,99,101,68,97,
|
|
||||||
116,97,0,98,116,84,114,105,97,110,103,108,101,77,101,115,104,83,104,97,
|
|
||||||
112,101,68,97,116,97,0,98,116,67,111,109,112,111,117,110,100,83,104,97,
|
|
||||||
112,101,67,104,105,108,100,68,97,116,97,0,98,116,67,111,109,112,111,117,
|
|
||||||
110,100,83,104,97,112,101,68,97,116,97,0,98,116,67,121,108,105,110,100,
|
|
||||||
101,114,83,104,97,112,101,68,97,116,97,0,98,116,67,97,112,115,117,108,
|
|
||||||
101,83,104,97,112,101,68,97,116,97,0,98,116,71,73,109,112,97,99,116,
|
|
||||||
77,101,115,104,83,104,97,112,101,68,97,116,97,0,98,116,67,111,110,118,
|
|
||||||
101,120,72,117,108,108,83,104,97,112,101,68,97,116,97,0,98,116,67,111,
|
|
||||||
108,108,105,115,105,111,110,79,98,106,101,99,116,68,111,117,98,108,101,68,
|
|
||||||
97,116,97,0,98,116,67,111,108,108,105,115,105,111,110,79,98,106,101,99,
|
|
||||||
116,70,108,111,97,116,68,97,116,97,0,98,116,82,105,103,105,100,66,111,
|
|
||||||
100,121,70,108,111,97,116,68,97,116,97,0,98,116,82,105,103,105,100,66,
|
|
||||||
111,100,121,68,111,117,98,108,101,68,97,116,97,0,98,116,67,111,110,115,
|
|
||||||
116,114,97,105,110,116,73,110,102,111,49,0,98,116,84,121,112,101,100,67,
|
|
||||||
111,110,115,116,114,97,105,110,116,68,97,116,97,0,98,116,82,105,103,105,
|
|
||||||
100,66,111,100,121,68,97,116,97,0,98,116,80,111,105,110,116,50,80,111,
|
|
||||||
105,110,116,67,111,110,115,116,114,97,105,110,116,70,108,111,97,116,68,97,
|
|
||||||
116,97,0,98,116,80,111,105,110,116,50,80,111,105,110,116,67,111,110,115,
|
|
||||||
116,114,97,105,110,116,68,111,117,98,108,101,68,97,116,97,0,98,116,72,
|
|
||||||
105,110,103,101,67,111,110,115,116,114,97,105,110,116,68,111,117,98,108,101,
|
|
||||||
68,97,116,97,0,98,116,72,105,110,103,101,67,111,110,115,116,114,97,105,
|
|
||||||
110,116,70,108,111,97,116,68,97,116,97,0,98,116,67,111,110,101,84,119,
|
|
||||||
105,115,116,67,111,110,115,116,114,97,105,110,116,68,97,116,97,0,98,116,
|
|
||||||
71,101,110,101,114,105,99,54,68,111,102,67,111,110,115,116,114,97,105,110,
|
|
||||||
116,68,97,116,97,0,98,116,83,108,105,100,101,114,67,111,110,115,116,114,
|
|
||||||
97,105,110,116,68,97,116,97,0,0,0,0,84,76,69,78,1,0,1,0,
|
|
||||||
2,0,2,0,4,0,4,0,4,0,4,0,8,0,0,0,16,0,48,0,
|
|
||||||
16,0,16,0,32,0,48,0,96,0,64,0,-128,0,16,0,56,0,56,0,
|
|
||||||
20,0,72,0,4,0,4,0,40,0,32,0,56,0,80,0,32,0,64,0,
|
|
||||||
64,0,72,0,80,0,-40,1,8,1,-16,1,-88,3,8,0,56,0,0,0,
|
|
||||||
88,0,120,0,96,1,-32,0,-40,0,0,1,-48,0,0,0,83,84,82,67,
|
|
||||||
38,0,0,0,10,0,3,0,4,0,0,0,4,0,1,0,9,0,2,0,
|
|
||||||
11,0,3,0,10,0,3,0,10,0,4,0,10,0,5,0,12,0,2,0,
|
|
||||||
9,0,6,0,9,0,7,0,13,0,1,0,7,0,8,0,14,0,1,0,
|
|
||||||
8,0,8,0,15,0,1,0,13,0,9,0,16,0,1,0,14,0,9,0,
|
|
||||||
17,0,2,0,15,0,10,0,13,0,11,0,18,0,2,0,16,0,10,0,
|
|
||||||
14,0,11,0,19,0,3,0,0,0,12,0,4,0,13,0,0,0,14,0,
|
|
||||||
20,0,5,0,19,0,15,0,13,0,16,0,13,0,17,0,7,0,18,0,
|
|
||||||
0,0,19,0,21,0,5,0,19,0,15,0,13,0,16,0,13,0,20,0,
|
|
||||||
7,0,21,0,4,0,22,0,22,0,2,0,13,0,23,0,7,0,24,0,
|
|
||||||
23,0,4,0,21,0,25,0,22,0,26,0,4,0,27,0,0,0,14,0,
|
|
||||||
24,0,1,0,4,0,28,0,25,0,2,0,2,0,29,0,2,0,28,0,
|
|
||||||
26,0,6,0,13,0,30,0,14,0,31,0,24,0,32,0,25,0,33,0,
|
|
||||||
4,0,34,0,4,0,35,0,27,0,4,0,26,0,36,0,13,0,37,0,
|
|
||||||
4,0,38,0,0,0,14,0,28,0,4,0,19,0,15,0,27,0,39,0,
|
|
||||||
7,0,21,0,0,0,14,0,29,0,4,0,17,0,40,0,19,0,41,0,
|
|
||||||
4,0,42,0,7,0,43,0,30,0,4,0,19,0,15,0,29,0,44,0,
|
|
||||||
4,0,45,0,7,0,21,0,31,0,3,0,21,0,25,0,4,0,46,0,
|
|
||||||
0,0,14,0,32,0,3,0,21,0,25,0,4,0,46,0,0,0,14,0,
|
|
||||||
33,0,5,0,19,0,15,0,27,0,39,0,13,0,16,0,7,0,21,0,
|
|
||||||
4,0,47,0,34,0,5,0,21,0,25,0,13,0,48,0,14,0,49,0,
|
|
||||||
4,0,50,0,0,0,51,0,35,0,24,0,9,0,52,0,9,0,53,0,
|
|
||||||
19,0,54,0,0,0,12,0,18,0,55,0,18,0,56,0,14,0,57,0,
|
|
||||||
14,0,58,0,14,0,59,0,8,0,60,0,8,0,61,0,8,0,62,0,
|
|
||||||
8,0,63,0,8,0,64,0,8,0,65,0,8,0,66,0,4,0,67,0,
|
|
||||||
4,0,68,0,4,0,69,0,4,0,70,0,4,0,71,0,4,0,72,0,
|
|
||||||
4,0,73,0,0,0,14,0,36,0,23,0,9,0,52,0,9,0,53,0,
|
|
||||||
19,0,54,0,0,0,12,0,17,0,55,0,17,0,56,0,13,0,57,0,
|
|
||||||
13,0,58,0,13,0,59,0,7,0,60,0,7,0,61,0,7,0,62,0,
|
|
||||||
7,0,63,0,7,0,64,0,7,0,65,0,7,0,66,0,4,0,67,0,
|
|
||||||
4,0,68,0,4,0,69,0,4,0,70,0,4,0,71,0,4,0,72,0,
|
|
||||||
4,0,73,0,37,0,21,0,36,0,74,0,15,0,75,0,13,0,76,0,
|
|
||||||
13,0,77,0,13,0,78,0,13,0,79,0,13,0,80,0,13,0,81,0,
|
|
||||||
13,0,82,0,13,0,83,0,13,0,84,0,7,0,85,0,7,0,86,0,
|
|
||||||
7,0,87,0,7,0,88,0,7,0,89,0,7,0,90,0,7,0,91,0,
|
|
||||||
7,0,92,0,7,0,93,0,4,0,94,0,38,0,22,0,35,0,74,0,
|
|
||||||
16,0,75,0,14,0,76,0,14,0,77,0,14,0,78,0,14,0,79,0,
|
|
||||||
14,0,80,0,14,0,81,0,14,0,82,0,14,0,83,0,14,0,84,0,
|
|
||||||
8,0,85,0,8,0,86,0,8,0,87,0,8,0,88,0,8,0,89,0,
|
|
||||||
8,0,90,0,8,0,91,0,8,0,92,0,8,0,93,0,4,0,94,0,
|
|
||||||
0,0,14,0,39,0,2,0,4,0,95,0,4,0,96,0,40,0,11,0,
|
|
||||||
41,0,97,0,41,0,98,0,0,0,12,0,4,0,99,0,4,0,100,0,
|
|
||||||
4,0,101,0,4,0,102,0,7,0,103,0,7,0,104,0,4,0,105,0,
|
|
||||||
0,0,106,0,42,0,3,0,40,0,107,0,13,0,108,0,13,0,109,0,
|
|
||||||
43,0,3,0,40,0,107,0,14,0,108,0,14,0,109,0,44,0,13,0,
|
|
||||||
40,0,107,0,18,0,110,0,18,0,111,0,4,0,112,0,4,0,113,0,
|
|
||||||
4,0,114,0,7,0,115,0,7,0,116,0,7,0,117,0,7,0,118,0,
|
|
||||||
7,0,119,0,7,0,120,0,7,0,121,0,45,0,13,0,40,0,107,0,
|
|
||||||
17,0,110,0,17,0,111,0,4,0,112,0,4,0,113,0,4,0,114,0,
|
|
||||||
7,0,115,0,7,0,116,0,7,0,117,0,7,0,118,0,7,0,119,0,
|
|
||||||
7,0,120,0,7,0,121,0,46,0,11,0,40,0,107,0,17,0,110,0,
|
|
||||||
17,0,111,0,7,0,122,0,7,0,123,0,7,0,124,0,7,0,119,0,
|
|
||||||
7,0,120,0,7,0,121,0,7,0,125,0,0,0,19,0,47,0,9,0,
|
|
||||||
40,0,107,0,17,0,110,0,17,0,111,0,13,0,126,0,13,0,127,0,
|
|
||||||
13,0,-128,0,13,0,-127,0,4,0,-126,0,4,0,-125,0,48,0,9,0,
|
|
||||||
40,0,107,0,17,0,110,0,17,0,111,0,7,0,126,0,7,0,127,0,
|
|
||||||
7,0,-128,0,7,0,-127,0,4,0,-126,0,4,0,-125,0,};
|
|
||||||
int sBulletDNAlen64= sizeof(sBulletDNAstr64);
|
|
||||||
|
|
||||||
unsigned char sBulletDNAstr[]= {
|
unsigned char sBulletDNAstr[]= {
|
||||||
83,68,78,65,78,65,77,69,-124,0,0,0,109,95,115,105,122,101,0,109,
|
83,68,78,65,78,65,77,69,-124,0,0,0,109,95,115,105,122,101,0,109,
|
||||||
95,99,97,112,97,99,105,116,121,0,42,109,95,100,97,116,97,0,109,95,
|
95,99,97,112,97,99,105,116,121,0,42,109,95,100,97,116,97,0,109,95,
|
||||||
|
|||||||
Reference in New Issue
Block a user