diff --git a/Demos/SoftDemo/SoftDemo.cpp b/Demos/SoftDemo/SoftDemo.cpp index 1d78e5427..e7a16a28b 100644 --- a/Demos/SoftDemo/SoftDemo.cpp +++ b/Demos/SoftDemo/SoftDemo.cpp @@ -1724,9 +1724,16 @@ void SoftDemo::initPhysics() tr.setOrigin(btVector3(0,-12,0)); - - localCreateRigidBody(0.f,tr,m_collisionShapes[0]); - +#define USE_COLLISION_OBJECT 1 +#ifdef USE_COLLISION_OBJECT + btCollisionObject* newOb = new btCollisionObject(); + newOb->setWorldTransform(tr); + newOb->setInterpolationWorldTransform( tr); + newOb->setCollisionShape(m_collisionShapes[0]); + m_dynamicsWorld->addCollisionObject(newOb); +#else + this->localCreateRigidBody(0,tr,m_collisionShapes[0]); +#endif //USE_COLLISION_OBJECT // clientResetScene(); diff --git a/Extras/LibXML/CMakeLists.txt b/Extras/LibXML/CMakeLists.txt index 5b5c4d5d4..2bf11f1d1 100644 --- a/Extras/LibXML/CMakeLists.txt +++ b/Extras/LibXML/CMakeLists.txt @@ -22,7 +22,6 @@ ADD_LIBRARY(XML hash.c HTMLparser.c HTMLtree.c - legacy.c list.c nanoftp.c nanohttp.c diff --git a/Extras/LibXML/Makefile.am b/Extras/LibXML/Makefile.am index 5ef9d90ca..c21ffeffd 100644 --- a/Extras/LibXML/Makefile.am +++ b/Extras/LibXML/Makefile.am @@ -27,7 +27,7 @@ libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c \ catalog.c globals.c threads.c c14n.c xmlstring.c \ xmlregexp.c xmlschemas.c xmlschemastypes.c xmlunicode.c \ triostr.c trio.c xmlreader.c relaxng.c dict.c SAX2.c \ - xmlwriter.c legacy.c chvalid.c pattern.c xmlsave.c \ + xmlwriter.c chvalid.c pattern.c xmlsave.c \ xmlmodule.c schematron.c else libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c \ @@ -37,7 +37,7 @@ libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c \ catalog.c globals.c threads.c c14n.c xmlstring.c \ xmlregexp.c xmlschemas.c xmlschemastypes.c xmlunicode.c \ xmlreader.c relaxng.c dict.c SAX2.c \ - xmlwriter.c legacy.c chvalid.c pattern.c xmlsave.c \ + xmlwriter.c chvalid.c pattern.c xmlsave.c \ xmlmodule.c schematron.c endif diff --git a/src/BulletSoftBody/btSoftBody.cpp b/src/BulletSoftBody/btSoftBody.cpp index 90056587a..7d2a03712 100644 --- a/src/BulletSoftBody/btSoftBody.cpp +++ b/src/BulletSoftBody/btSoftBody.cpp @@ -2600,7 +2600,7 @@ void btSoftBody::defaultCollisionHandler(btCollisionObject* pco) case fCollision::CL_RS: { btSoftColliders::CollideCL_RS collider; - collider.Process(this,btRigidBody::upcast(pco)); + collider.Process(this,pco); } break; } diff --git a/src/BulletSoftBody/btSoftBody.h b/src/BulletSoftBody/btSoftBody.h index ff244605f..4521f6bcb 100644 --- a/src/BulletSoftBody/btSoftBody.h +++ b/src/BulletSoftBody/btSoftBody.h @@ -324,11 +324,17 @@ public: /* Body */ struct Body { - Cluster* m_soft; - btRigidBody* m_rigid; - Body() : m_soft(0),m_rigid(0) {} - Body(Cluster* p) : m_soft(p),m_rigid(0) {} - Body(btRigidBody* p) : m_soft(0),m_rigid(p) {} + Cluster* m_soft; + btRigidBody* m_rigid; + btCollisionObject* m_collisionObject; + + Body() : m_soft(0),m_rigid(0),m_collisionObject(0) {} + Body(Cluster* p) : m_soft(p),m_rigid(0),m_collisionObject(0) {} + Body(btCollisionObject* colObj) : m_soft(0),m_collisionObject(colObj) + { + m_rigid = btRigidBody::upcast(m_collisionObject); + } + void activate() const { if(m_rigid) m_rigid->activate(); @@ -349,7 +355,7 @@ public: const btTransform& xform() const { static const btTransform identity=btTransform::getIdentity(); - if(m_rigid) return(m_rigid->getInterpolationWorldTransform()); + if(m_collisionObject) return(m_collisionObject->getInterpolationWorldTransform()); if(m_soft) return(m_soft->m_framexform); return(identity); } diff --git a/src/BulletSoftBody/btSoftBodyInternals.h b/src/BulletSoftBody/btSoftBodyInternals.h index ea22241a0..d14128e94 100644 --- a/src/BulletSoftBody/btSoftBodyInternals.h +++ b/src/BulletSoftBody/btSoftBodyInternals.h @@ -708,23 +708,24 @@ struct btSoftColliders struct CollideCL_RS : ClusterBase { btSoftBody* psb; - btRigidBody* prb; + + btCollisionObject* m_colObj; void Process(const btDbvtNode* leaf) { btSoftBody::Cluster* cluster=(btSoftBody::Cluster*)leaf->data; btSoftClusterCollisionShape cshape(cluster); - const btConvexShape* rshape=(const btConvexShape*)prb->getCollisionShape(); + const btConvexShape* rshape=(const btConvexShape*)m_colObj->getCollisionShape(); btGjkEpaSolver2::sResults res; if(btGjkEpaSolver2::SignedDistance( &cshape,btTransform::getIdentity(), - rshape,prb->getInterpolationWorldTransform(), + rshape,m_colObj->getInterpolationWorldTransform(), btVector3(1,0,0),res)) { btSoftBody::CJoint joint; - if(SolveContact(res,cluster,prb,joint)) + if(SolveContact(res,cluster,m_colObj,joint))//prb,joint)) { btSoftBody::CJoint* pj=new(btAlignedAlloc(sizeof(btSoftBody::CJoint),16)) btSoftBody::CJoint(); *pj=joint;psb->m_joints.push_back(pj); - if(prb->isStaticOrKinematicObject()) + if(m_colObj->isStaticOrKinematicObject()) { pj->m_erp *= psb->m_cfg.kSKHR_CL; pj->m_split *= psb->m_cfg.kSK_SPLT_CL; @@ -737,19 +738,19 @@ struct btSoftColliders } } } - void Process(btSoftBody* ps,btRigidBody* pr) + void Process(btSoftBody* ps,btCollisionObject* colOb) { psb = ps; - prb = pr; + m_colObj = colOb; idt = ps->m_sst.isdt; - margin = ps->getCollisionShape()->getMargin()+ - pr->getCollisionShape()->getMargin(); - friction = btMin(psb->m_cfg.kDF,prb->getFriction()); + margin = m_colObj->getCollisionShape()->getMargin()+ + m_colObj->getCollisionShape()->getMargin(); + friction = btMin(psb->m_cfg.kDF,m_colObj->getFriction()); btVector3 mins; btVector3 maxs; ATTRIBUTE_ALIGNED16(btDbvtVolume) volume; - pr->getCollisionShape()->getAabb(pr->getInterpolationWorldTransform(),mins,maxs); + colOb->getCollisionShape()->getAabb(colOb->getInterpolationWorldTransform(),mins,maxs); volume=btDbvtVolume::FromMM(mins,maxs); volume.Expand(btVector3(1,1,1)*margin); ps->m_cdbvt.collideTV(ps->m_cdbvt.m_root,volume,*this); diff --git a/src/LinearMath/btQuadWord.h b/src/LinearMath/btQuadWord.h index ad9c3dce2..10aec4fd2 100644 --- a/src/LinearMath/btQuadWord.h +++ b/src/LinearMath/btQuadWord.h @@ -18,7 +18,7 @@ subject to the following restrictions: #include "btScalar.h" #include "btMinMax.h" -#include + #if defined (__CELLOS_LV2) && defined (__SPU__) #include diff --git a/src/LinearMath/btScalar.h b/src/LinearMath/btScalar.h index b2a641469..8b7a6d13f 100644 --- a/src/LinearMath/btScalar.h +++ b/src/LinearMath/btScalar.h @@ -18,6 +18,7 @@ subject to the following restrictions: #define SIMD___SCALAR_H #include + #include //size_t for MSVC 6.0 #include