Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergej Reich <sergej.reich@googlemail.com>2013-03-07 21:53:16 +0400
committerSergej Reich <sergej.reich@googlemail.com>2013-03-07 21:53:16 +0400
commit643b0be4cb3f73bd876493d2a7bd6f76ef27cf06 (patch)
tree33fa8c08a902176f4204b6cc6a18702997bd90ba /extern/bullet2/src/BulletSoftBody/btSoftBody.h
parent46d32c89f6df911120579d00dd6e1246536cb6d8 (diff)
bullet: Update to current svn, r2636
Apply patches in patches directory, remove patches that were applied upstream. If you made changes without adding a patch, please check. Fixes [#32233] exporting bullet format results in corrupt files.
Diffstat (limited to 'extern/bullet2/src/BulletSoftBody/btSoftBody.h')
-rw-r--r--extern/bullet2/src/BulletSoftBody/btSoftBody.h25
1 files changed, 18 insertions, 7 deletions
diff --git a/extern/bullet2/src/BulletSoftBody/btSoftBody.h b/extern/bullet2/src/BulletSoftBody/btSoftBody.h
index ba589486f26..2116c34f06d 100644
--- a/extern/bullet2/src/BulletSoftBody/btSoftBody.h
+++ b/extern/bullet2/src/BulletSoftBody/btSoftBody.h
@@ -69,7 +69,7 @@ struct btSoftBodyWorldInfo
class btSoftBody : public btCollisionObject
{
public:
- btAlignedObjectArray<class btCollisionObject*> m_collisionDisabledObjects;
+ btAlignedObjectArray<const class btCollisionObject*> m_collisionDisabledObjects;
// The solver object that handles this soft body
btSoftBodySolver *m_softBodySolver;
@@ -182,7 +182,7 @@ public:
/* sCti is Softbody contact info */
struct sCti
{
- btCollisionObject* m_colObj; /* Rigid body */
+ const btCollisionObject* m_colObj; /* Rigid body */
btVector3 m_normal; /* Outward normal */
btScalar m_offset; /* Offset from origin */
};
@@ -374,13 +374,13 @@ public:
{
Cluster* m_soft;
btRigidBody* m_rigid;
- btCollisionObject* m_collisionObject;
+ const 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)
+ Body(const btCollisionObject* colObj) : m_soft(0),m_collisionObject(colObj)
{
- m_rigid = btRigidBody::upcast(m_collisionObject);
+ m_rigid = (btRigidBody*)btRigidBody::upcast(m_collisionObject);
}
void activate() const
@@ -671,6 +671,9 @@ public:
btTransform m_initialWorldTransform;
btVector3 m_windVelocity;
+
+ btScalar m_restLengthScale;
+
//
// Api
//
@@ -810,9 +813,15 @@ public:
void rotate( const btQuaternion& rot);
/* Scale */
void scale( const btVector3& scl);
+ /* Get link resting lengths scale */
+ btScalar getRestLengthScale();
+ /* Scale resting length of all springs */
+ void setRestLengthScale(btScalar restLength);
/* Set current state as pose */
void setPose( bool bvolume,
bool bframe);
+ /* Set current link lengths as resting lengths */
+ void resetLinkRestLengths();
/* Return the volume */
btScalar getVolume() const;
/* Cluster count */
@@ -867,7 +876,7 @@ public:
/* integrateMotion */
void integrateMotion();
/* defaultCollisionHandlers */
- void defaultCollisionHandler(btCollisionObject* pco);
+ void defaultCollisionHandler(const btCollisionObjectWrapper* pcoWrap);
void defaultCollisionHandler(btSoftBody* psb);
@@ -949,11 +958,13 @@ public:
btScalar& mint,eFeature::_& feature,int& index,bool bcountonly) const;
void initializeFaceTree();
btVector3 evaluateCom() const;
- bool checkContact(btCollisionObject* colObj,const btVector3& x,btScalar margin,btSoftBody::sCti& cti) const;
+ bool checkContact(const btCollisionObjectWrapper* colObjWrap,const btVector3& x,btScalar margin,btSoftBody::sCti& cti) const;
void updateNormals();
void updateBounds();
void updatePose();
void updateConstants();
+ void updateLinkConstants();
+ void updateArea(bool averageArea = true);
void initializeClusters();
void updateClusters();
void cleanupClusters();