The following tar file includes some examples from the SoftBody.cpp demo and should cover most of the the following updates.
The btogre module from the following link is required (for DebugDraw support).
http://www.ogre3d.org/addonforums/viewtopic.php?f=3&t=14854
1. bt*Shape - getName return string instead of addressof
2. getCollidingObjectsAndPoints -
http://sourceforge.net/tracker/?func=detail&aid=3312809&group_id=186291&atid=916690
myCollisionList = self.dynamicsWorld.getCollidingObjectsAndPoints()
for col in myCollisionList:
i = 0
for pt in col[2]:
b = pt.getPositionWorldOnA()
print i, pt.getDistance() , b.x(),b.y(),b.z()
i+=1
3. btCollisionShape - get/setUserPointer wrapped as get/setUserData as per CollisionObject
4. btSoftBody ctor wrapped as makeSoftBody in main namespace
btSoftBody(btSoftBodyWorldInfo* worldInfo,
int node_count,const btVector3* x,const btScalar* m);
s=4.0
x=[ bullet.btVector3(-s,0,-s),
bullet.btVector3(+s,0,-s),
bullet.btVector3(+s,0,+s),
bullet.btVector3(-s,0,+s)]
m = [0,0,0,1]
psb=bullet.makeSoftBody(pdemo.m_softBodyWorldInfo,4,x,m)
5. btSoftBodyConcaveCollisionAlgorithm and btSoftBodyTriangleCallback now included
6. btAlignedAllocator now wrapped:
- <btSoftBody::SContact,16u>
- btSoftBody::RContact,16u>
- btSoftBody::Anchor,16u>
- btSoftBody::Tetra,16u>
- btSoftBody::Face,16u>
- btSoftBody::Link,16u>
- btSoftBody::Node,16u>
- btSoftBody::Note,16u>
Manually/Ugly Fixes to edit and remove '::_' suffix.
- btSoftBody::ePSolver::_, 16u >
- btSoftBody::eVSolver::_, 16u >
- tPSolverArray
- tVSolverArray
7. btTriangleIndexVertexArray wrapped to accept python lists bullet.makeTriangleIndexVertexArray(), not working yet, don't use.
8. need to update physics/bullet/ __init__.py to include some defines:
import sys
SIMD_2_PI =6.283185307179586232
SIMD_PI = SIMD_2_PI * 0.5
SIMD_HALF_PI = SIMD_2_PI * 0.25
SIMD_RADS_PER_DEG = SIMD_2_PI / 360.0
SIMD_DEGS_PER_RAD = 360.0 / SIMD_2_PI
SIMDSQRT12 = 0.7071067811865475244008443621048490
def btRecipSqrt(x):
return (float((float(1.0)/_bullet_.btSqrt(float(x)))) )
SIMD_EPSILON=sys.float_info.epsilon
SIMD_INFINITY=sys.float_info.max