68 : m_dispatcher1(dispatcher),
69 m_broadphasePairCache(pairCache),
71 m_forceUpdateAllAabbs(true)
91 collisionObject->setBroadphaseHandle(0);
98 if (collisionObject->getBroadphaseHandle())
100 int collisionFilterGroup = collisionObject->getBroadphaseHandle()->m_collisionFilterGroup;
101 int collisionFilterMask = collisionObject->getBroadphaseHandle()->m_collisionFilterMask;
106 btTransform trans = collisionObject->getWorldTransform();
110 collisionObject->getCollisionShape()->getAabb(trans, minAabb, maxAabb);
112 int type = collisionObject->getCollisionShape()->getShapeType();
113 collisionObject->setBroadphaseHandle(
getBroadphase()->createProxy(
118 collisionFilterGroup,
130 btAssert(collisionObject->getWorldArrayIndex() == -1);
136 btTransform trans = collisionObject->getWorldTransform();
140 collisionObject->getCollisionShape()->getAabb(trans, minAabb, maxAabb);
142 int type = collisionObject->getCollisionShape()->getShapeType();
143 collisionObject->setBroadphaseHandle(
getBroadphase()->createProxy(
148 collisionFilterGroup,
156 colObj->getCollisionShape()->getAabb(colObj->getWorldTransform(), minAabb, maxAabb);
159 minAabb -= contactThreshold;
160 maxAabb += contactThreshold;
165 colObj->getCollisionShape()->getAabb(colObj->getInterpolationWorldTransform(), minAabb2, maxAabb2);
166 minAabb2 -= contactThreshold;
167 maxAabb2 += contactThreshold;
168 minAabb.setMin(minAabb2);
169 maxAabb.setMax(maxAabb2);
175 if (colObj->isStaticObject() || ((maxAabb - minAabb).
length2() <
btScalar(1e12)))
185 static bool reportMe =
true;
205 btAssert(colObj->getWorldArrayIndex() == i);
223 BT_PROFILE(
"performDiscreteCollisionDetection");
252 collisionObject->setBroadphaseHandle(0);
256 int iObj = collisionObject->getWorldArrayIndex();
274 collisionObject->setWorldArrayIndex(-1);
292 pointShape.setMargin(0.f);
297 if (collisionShape->isConvex())
307 btGjkConvexCast gjkConvexCaster(castShape, convexShape, &simplexSolver);
314 convexCasterPtr = &gjkConvexCaster;
316 convexCasterPtr = &subSimplexConvexCaster;
320 if (convexCaster.
calcTimeOfImpact(rayFromTrans, rayToTrans, colObjWorldTransform, colObjWorldTransform, castResult))
328 #ifdef USE_SUBSIMPLEX_CONVEX_CAST
340 bool normalInWorldSpace =
true;
348 if (collisionShape->isConcave())
362 m_resultCallback(resultCallback),
363 m_collisionObject(collisionObject),
364 m_triangleMesh(triangleMesh),
365 m_colObjWorldTransform(colObjWorldTransform)
375 btVector3 hitNormalWorld = m_colObjWorldTransform.getBasis() * hitNormalLocal;
382 bool normalInWorldSpace =
true;
383 return m_resultCallback->
addSingleResult(rayResult, normalInWorldSpace);
387 btTransform worldTocollisionObject = colObjWorldTransform.inverse();
388 btVector3 rayFromLocal = worldTocollisionObject * rayFromTrans.getOrigin();
389 btVector3 rayToLocal = worldTocollisionObject * rayToTrans.getOrigin();
397 BridgeTriangleRaycastCallback rcb(rayFromLocal, rayToLocal, &resultCallback, collisionObjectWrap->
getCollisionObject(), triangleMesh, colObjWorldTransform);
399 triangleMesh->performRaycast(&rcb, rayFromLocal, rayToLocal);
408 btVector3 scale = scaledTriangleMesh->getLocalScaling();
409 btVector3 rayFromLocalScaled = rayFromLocal / scale;
410 btVector3 rayToLocalScaled = rayToLocal / scale;
413 BridgeTriangleRaycastCallback rcb(rayFromLocalScaled, rayToLocalScaled, &resultCallback, collisionObjectWrap->
getCollisionObject(), triangleMesh, colObjWorldTransform);
415 triangleMesh->performRaycast(&rcb, rayFromLocalScaled, rayToLocalScaled);
423 btTransform worldTocollisionObject = colObjWorldTransform.inverse();
424 btVector3 rayFromLocal = worldTocollisionObject * rayFromTrans.getOrigin();
425 btVector3 rayToLocal = worldTocollisionObject * rayToTrans.getOrigin();
427 BridgeTriangleRaycastCallback rcb(rayFromLocal, rayToLocal, &resultCallback, collisionObjectWrap->
getCollisionObject(), heightField, colObjWorldTransform);
429 heightField->performRaycast(&rcb, rayFromLocal, rayToLocal);
436 btTransform worldTocollisionObject = colObjWorldTransform.inverse();
438 btVector3 rayFromLocal = worldTocollisionObject * rayFromTrans.getOrigin();
439 btVector3 rayToLocal = worldTocollisionObject * rayToTrans.getOrigin();
454 m_resultCallback(resultCallback),
455 m_collisionObject(collisionObject),
456 m_triangleMesh(triangleMesh),
457 m_colObjWorldTransform(colObjWorldTransform)
467 btVector3 hitNormalWorld = m_colObjWorldTransform.getBasis() * hitNormalLocal;
474 bool normalInWorldSpace =
true;
475 return m_resultCallback->
addSingleResult(rayResult, normalInWorldSpace);
479 BridgeTriangleRaycastCallback rcb(rayFromLocal, rayToLocal, &resultCallback, collisionObjectWrap->
getCollisionObject(), concaveShape, colObjWorldTransform);
482 btVector3 rayAabbMinLocal = rayFromLocal;
483 rayAabbMinLocal.setMin(rayToLocal);
484 btVector3 rayAabbMaxLocal = rayFromLocal;
485 rayAabbMaxLocal.setMax(rayToLocal);
487 concaveShape->processAllTriangles(&rcb, rayAabbMinLocal, rayAabbMaxLocal);
493 if (collisionShape->isCompound())
501 : m_userCallback(user), m_i(i)
516 if (
r.m_localShapeInfo ==
NULL)
517 r.m_localShapeInfo = &shapeInfo;
540 m_compoundShape(compoundShape),
541 m_colObjWorldTransform(colObjWorldTransform),
542 m_rayFromTrans(rayFromTrans),
543 m_rayToTrans(rayToTrans),
544 m_resultCallback(resultCallback)
548 void ProcessLeaf(
int i)
550 const btCollisionShape* childCollisionShape = m_compoundShape->getChildShape(i);
551 const btTransform& childTrans = m_compoundShape->getChildTransform(i);
552 btTransform childWorldTrans = m_colObjWorldTransform * childTrans;
557 LocalInfoAdder2 my_cb(i, &m_resultCallback);
573 const btDbvt* dbvt = compoundShape->getDynamicAabbTree();
578 colObjWorldTransform,
582 #ifndef DISABLE_DBVT_COMPOUNDSHAPE_RAYCAST_ACCELERATION
585 btVector3 localRayFrom = colObjWorldTransform.inverseTimes(rayFromTrans).getOrigin();
586 btVector3 localRayTo = colObjWorldTransform.inverseTimes(rayToTrans).getOrigin();
592 for (
int i = 0, n = compoundShape->getNumChildShapes(); i < n; ++i)
594 rayCB.ProcessLeaf(i);
619 if (collisionShape->isConvex())
636 if (castPtr->
calcTimeOfImpact(convexFromTrans, convexToTrans, colObjWorldTransform, colObjWorldTransform, castResult))
651 bool normalInWorldSpace =
true;
659 if (collisionShape->isConcave())
665 btTransform worldTocollisionObject = colObjWorldTransform.inverse();
666 btVector3 convexFromLocal = worldTocollisionObject * convexFromTrans.getOrigin();
667 btVector3 convexToLocal = worldTocollisionObject * convexToTrans.getOrigin();
680 m_resultCallback(resultCallback),
681 m_collisionObject(collisionObject),
682 m_triangleMesh(triangleMesh)
691 if (hitFraction <= m_resultCallback->m_closestHitFraction)
699 bool normalInWorldSpace =
true;
701 return m_resultCallback->
addSingleResult(convexResult, normalInWorldSpace);
707 BridgeTriangleConvexcastCallback tccb(castShape, convexFromTrans, convexToTrans, &resultCallback, colObjWrap->
getCollisionObject(), triangleMesh, colObjWorldTransform);
709 tccb.m_allowedPenetration = allowedPenetration;
711 castShape->getAabb(rotationXform, boxMinLocal, boxMaxLocal);
712 triangleMesh->performConvexcast(&tccb, convexFromLocal, convexToLocal, boxMinLocal, boxMaxLocal);
725 if (castPtr->
calcTimeOfImpact(convexFromTrans, convexToTrans, colObjWorldTransform, colObjWorldTransform, castResult))
740 bool normalInWorldSpace =
true;
750 btTransform worldTocollisionObject = colObjWorldTransform.inverse();
751 btVector3 convexFromLocal = worldTocollisionObject * convexFromTrans.getOrigin();
752 btVector3 convexToLocal = worldTocollisionObject * convexToTrans.getOrigin();
765 m_resultCallback(resultCallback),
766 m_collisionObject(collisionObject),
767 m_triangleMesh(triangleMesh)
776 if (hitFraction <= m_resultCallback->m_closestHitFraction)
784 bool normalInWorldSpace =
true;
786 return m_resultCallback->
addSingleResult(convexResult, normalInWorldSpace);
792 BridgeTriangleConvexcastCallback tccb(castShape, convexFromTrans, convexToTrans, &resultCallback, colObjWrap->
getCollisionObject(), concaveShape, colObjWorldTransform);
794 tccb.m_allowedPenetration = allowedPenetration;
796 castShape->getAabb(rotationXform, boxMinLocal, boxMaxLocal);
798 btVector3 rayAabbMinLocal = convexFromLocal;
799 rayAabbMinLocal.setMin(convexToLocal);
800 btVector3 rayAabbMaxLocal = convexFromLocal;
801 rayAabbMaxLocal.setMax(convexToLocal);
802 rayAabbMinLocal += boxMinLocal;
803 rayAabbMaxLocal += boxMaxLocal;
804 concaveShape->processAllTriangles(&tccb, rayAabbMinLocal, rayAabbMaxLocal);
810 if (collisionShape->isCompound())
823 : m_colObjWrap(colObjWrap),
824 m_castShape(castShape),
825 m_convexFromTrans(convexFromTrans),
826 m_convexToTrans(convexToTrans),
827 m_allowedPenetration(allowedPenetration),
828 m_compoundShape(compoundShape),
829 m_colObjWorldTransform(colObjWorldTransform),
830 m_resultCallback(resultCallback)
846 btTransform childWorldTrans = m_colObjWorldTransform * childTrans;
854 : m_userCallback(user), m_i(i)
867 if (
r.m_localShapeInfo ==
NULL)
868 r.m_localShapeInfo = &shapeInfo;
875 LocalInfoAdder my_cb(index, &m_resultCallback);
887 btTransform childTrans = m_compoundShape->getChildTransform(index);
888 const btCollisionShape* childCollisionShape = m_compoundShape->getChildShape(index);
890 ProcessChild(index, childTrans, childCollisionShape);
897 btVector3 fromLocalAabbMin, fromLocalAabbMax;
898 btVector3 toLocalAabbMin, toLocalAabbMax;
900 castShape->getAabb(colObjWorldTransform.inverse() * convexFromTrans, fromLocalAabbMin, fromLocalAabbMax);
901 castShape->getAabb(colObjWorldTransform.inverse() * convexToTrans, toLocalAabbMin, toLocalAabbMax);
903 fromLocalAabbMin.setMin(toLocalAabbMin);
904 fromLocalAabbMax.setMax(toLocalAabbMax);
907 allowedPenetration, compoundShape, colObjWorldTransform, resultCallback);
909 const btDbvt*
tree = compoundShape->getDynamicAabbTree();
918 for (i = 0; i < compoundShape->getNumChildShapes(); i++)
920 const btCollisionShape* childCollisionShape = compoundShape->getChildShape(i);
921 btTransform childTrans = compoundShape->getChildTransform(i);
922 callback.ProcessChild(i, childTrans, childCollisionShape);
952 btVector3 rayDir = (rayToWorld - rayFromWorld);
980 #ifdef RECALCULATE_AABB
981 btVector3 collisionObjectAabbMin,collisionObjectAabbMax;
982 collisionObject->getCollisionShape()->getAabb(collisionObject->getWorldTransform(),collisionObjectAabbMin,collisionObjectAabbMax);
985 const btVector3& collisionObjectAabbMin = collisionObject->getBroadphaseHandle()->m_aabbMin;
986 const btVector3& collisionObjectAabbMax = collisionObject->getBroadphaseHandle()->m_aabbMax;
995 collisionObject->getCollisionShape(),
996 collisionObject->getWorldTransform(),
1011 #ifndef USE_BRUTEFORCE_RAYBROADPHASE
1040 btVector3 rayDir = unnormalizedRayDir.normalized();
1066 collisionObject->getCollisionShape(),
1067 collisionObject->getWorldTransform(),
1084 convexFromTrans = convexFromWorld;
1085 convexToTrans = convexToWorld;
1086 btVector3 castShapeAabbMin, castShapeAabbMax;
1092 zeroLinVel.setValue(0, 0, 0);
1095 R.setRotation(convexFromTrans.getRotation());
1096 castShape->calculateTemporalAabb(
R, zeroLinVel, angVel, 1.0f, castShapeAabbMin, castShapeAabbMax);
1099 #ifndef USE_BRUTEFORCE_RAYBROADPHASE
1101 btSingleSweepCallback convexCB(castShape, convexFromWorld, convexToWorld,
this, resultCallback, allowedCcdPenetration);
1113 if (resultCallback.
needsCollision(collisionObject->getBroadphaseHandle()))
1116 btVector3 collisionObjectAabbMin, collisionObjectAabbMax;
1117 collisionObject->getCollisionShape()->getAabb(collisionObject->getWorldTransform(), collisionObjectAabbMin, collisionObjectAabbMax);
1118 AabbExpand(collisionObjectAabbMin, collisionObjectAabbMax, castShapeAabbMin, castShapeAabbMax);
1121 if (
btRayAabb(convexFromWorld.getOrigin(), convexToWorld.getOrigin(), collisionObjectAabbMin, collisionObjectAabbMax, hitLambda, hitNormal))
1125 collisionObject->getCollisionShape(),
1126 collisionObject->getWorldTransform(),
1128 allowedCcdPenetration);
1148 btVector3 pointA = pointInWorld + normalOnBInWorld * depth;
1212 btCollisionObjectWrapper ob1(0, collisionObject->getCollisionShape(), collisionObject, collisionObject->getWorldTransform(), -1, -1);
1235 colObj->getCollisionShape()->getAabb(colObj->getWorldTransform(), aabbMin, aabbMax);
1270 m_worldTrans(worldTrans)
1282 (
void)triangleIndex;
1285 wv0 = m_worldTrans * triangle[0];
1286 wv1 = m_worldTrans * triangle[1];
1287 wv2 = m_worldTrans * triangle[2];
1297 m_debugDrawer->
drawLine(wv0, wv1, m_color);
1298 m_debugDrawer->
drawLine(wv1, wv2, m_color);
1299 m_debugDrawer->
drawLine(wv2, wv0, m_color);
1314 for (
int i = compoundShape->getNumChildShapes() - 1; i >= 0; i--)
1316 btTransform childTrans = compoundShape->getChildTransform(i);
1323 switch (shape->getShapeType())
1328 btVector3 halfExtents = boxShape->getHalfExtentsWithMargin();
1336 btScalar radius = sphereShape->getMargin();
1346 childTransform.setIdentity();
1348 for (
int i = multiSphereShape->getSphereCount() - 1; i >= 0; i--)
1350 childTransform.setOrigin(multiSphereShape->getSpherePosition(i));
1360 btScalar radius = capsuleShape->getRadius();
1361 btScalar halfHeight = capsuleShape->getHalfHeight();
1363 int upAxis = capsuleShape->getUpAxis();
1370 btScalar radius = coneShape->getRadius();
1373 int upAxis = coneShape->getConeUpIndex();
1380 int upAxis = cylinder->getUpAxis();
1381 btScalar radius = cylinder->getRadius();
1382 btScalar halfHeight = cylinder->getHalfExtentsWithMargin()[upAxis];
1390 btScalar planeConst = staticPlaneShape->getPlaneConstant();
1391 const btVector3& planeNormal = staticPlaneShape->getPlaneNormal();
1398 if (shape->isPolyhedral())
1403 if (polyshape->getConvexPolyhedron())
1406 for (i = 0; i < poly->m_faces.size(); i++)
1409 int numVerts = poly->m_faces[i].m_indices.size();
1412 int lastV = poly->m_faces[i].m_indices[numVerts - 1];
1413 for (
int v = 0;
v < poly->m_faces[i].m_indices.size();
v++)
1415 int curVert = poly->m_faces[i].m_indices[
v];
1416 centroid += poly->m_vertices[curVert];
1425 btVector3 faceNormal(poly->m_faces[i].m_plane[0], poly->m_faces[i].m_plane[1], poly->m_faces[i].m_plane[2]);
1426 getDebugDrawer()->
drawLine(worldTransform * centroid, worldTransform * (centroid + faceNormal), normalColor);
1432 for (i = 0; i < polyshape->getNumEdges(); i++)
1435 polyshape->getEdge(i,
a,
b);
1443 if (shape->isConcave())
1452 concaveMesh->processAllTriangles(&drawCallback, aabbMin, aabbMax);
1463 convexMesh->getMeshInterface()->InternalProcessAllTriangles(&drawCallback, aabbMin, aabbMax);
1490 int numContacts = contactManifold->getNumContacts();
1491 for (
int j = 0; j < numContacts; j++)
1513 switch (colObj->getActivationState())
1516 color = defaultColors.m_activeObject;
1519 color = defaultColors.m_deactivatedObject;
1522 color = defaultColors.m_wantsDeactivationObject;
1525 color = defaultColors.m_disabledDeactivationObject;
1528 color = defaultColors.m_disabledSimulationObject;
1536 colObj->getCustomDebugColor(
color);
1543 btVector3 colorvec = defaultColors.m_aabb;
1544 colObj->getCollisionShape()->getAabb(colObj->getWorldTransform(), minAabb, maxAabb);
1546 minAabb -= contactThreshold;
1547 maxAabb += contactThreshold;
1553 colObj->getCollisionShape()->getAabb(colObj->getInterpolationWorldTransform(), minAabb2, maxAabb2);
1554 minAabb2 -= contactThreshold;
1555 maxAabb2 += contactThreshold;
1556 minAabb.setMin(minAabb2);
1557 maxAabb.setMax(maxAabb2);
1580 if (!serializedShapes.
find(shape))
1582 serializedShapes.
insert(shape, shape);
1583 shape->serializeSingleShape(serializer);
1593 colObj->serializeSingleObject(serializer);
1608 if (manifold->getNumContacts() == 0)
1611 btChunk* chunk = serializer->
allocate(manifold->calculateSerializeBufferSize(), 1);
1612 const char* structType = manifold->serialize(manifold, chunk->
m_oldPtr, serializer);
NSNotificationCenter * center
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble GLdouble r _GL_VOID_RET _GL_VOID GLfloat GLfloat r _GL_VOID_RET _GL_VOID GLint GLint r _GL_VOID_RET _GL_VOID GLshort GLshort r _GL_VOID_RET _GL_VOID GLdouble GLdouble r
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert a color
ATTR_WARN_UNUSED_RESULT const BMVert * v
SIMD_FORCE_INLINE bool btRayAabb(const btVector3 &rayFrom, const btVector3 &rayTo, const btVector3 &aabbMin, const btVector3 &aabbMax, btScalar ¶m, btVector3 &normal)
SIMD_FORCE_INLINE void AabbExpand(btVector3 &aabbMin, btVector3 &aabbMax, const btVector3 &expansionMin, const btVector3 &expansionMax)
btBoxShape(const btVector3 &boxHalfExtents)
@ CONVEX_TRIANGLEMESH_SHAPE_PROXYTYPE
@ COMPOUND_SHAPE_PROXYTYPE
@ SCALED_TRIANGLE_MESH_SHAPE_PROXYTYPE
@ TRIANGLE_MESH_SHAPE_PROXYTYPE
@ TERRAIN_SHAPE_PROXYTYPE
@ MULTI_SPHERE_SHAPE_PROXYTYPE
@ CYLINDER_SHAPE_PROXYTYPE
@ CAPSULE_SHAPE_PROXYTYPE
btBvhTriangleMeshShape(btStridingMeshInterface *meshInterface, bool useQuantizedAabbCompression, bool buildBvh=true)
btCapsuleShape()
only used for btCapsuleShapeZ and btCapsuleShapeX subclasses.
SIMD_FORCE_INLINE btBroadphaseProxy * getBroadphaseHandle()
#define DISABLE_DEACTIVATION
@ CF_DISABLE_VISUALIZE_OBJECT
#define WANTS_DEACTIVATION
#define DISABLE_SIMULATION
btCollisionShape
The btCollisionShape class provides an interface for collision shapes that can be shared among btColl...
btCompoundShape(bool enableDynamicAabbTree=true, const int initialChildCapacity=0)
btConeShape(btScalar radius, btScalar height)
btScalar gContactBreakingThreshold
btConvexShape()
not supported on IBM SDK, until we fix the alignment of btVector3
btConvexTriangleMeshShape(btStridingMeshInterface *meshInterface, bool calcAabb=true)
btCylinderShape(const btVector3 &halfExtents)
static btDbvtVolume bounds(btDbvtNode **leaves, int count)
@ BT_CLOSEST_POINT_ALGORITHMS
btHeightfieldTerrainShape(int heightStickWidth, int heightStickLength, const void *heightfieldData, btScalar heightScale, btScalar minHeight, btScalar maxHeight, int upAxis, PHY_ScalarType heightDataType, bool flipQuadEdges)
preferred constructor
virtual bool needsCollision(const btCollisionObject *body0, const btCollisionObject *body1)
btMultiSphereShape(const btVector3 *positions, const btScalar *radi, int numSpheres)
btPolyhedralConvexShape()
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
#define ATTRIBUTE_ALIGNED16(a)
btScaledBvhTriangleMeshShape(btBvhTriangleMeshShape *childShape, const btVector3 &localScaling)
btSequentialImpulseConstraintSolverMt int btPersistentManifold int numManifolds
@ BT_SERIALIZE_CONTACT_MANIFOLDS
#define BT_CONTACTMANIFOLD_CODE
btSphereShape(btScalar radius)
btStaticPlaneShape(const btVector3 &planeNormal, btScalar planeConstant)
btTriangleMeshShape(btStridingMeshInterface *meshInterface)
SIMD_FORCE_INLINE btScalar length2() const
Return the length of the vector squared.
btVector3
btVector3 can be used to represent 3D points and vectors. It has an un-used w component to suit 16-by...
virtual void internalProcessTriangleIndex(btVector3 *triangle, int partId, int triangleIndex)
virtual void processTriangle(btVector3 *triangle, int partId, int triangleIndex)
DebugDrawcallback(btIDebugDraw *debugDrawer, const btTransform &worldTrans, const btVector3 &color)
int findLinearSearch(const T &key) const
SIMD_FORCE_INLINE int size() const
return the number of elements in the array
void swap(int index0, int index1)
SIMD_FORCE_INLINE void pop_back()
void remove(const T &key)
SIMD_FORCE_INLINE void push_back(const T &_Val)
virtual void aabbTest(const btVector3 &aabbMin, const btVector3 &aabbMax, btBroadphaseAabbCallback &callback)=0
virtual void calculateOverlappingPairs(btDispatcher *dispatcher)=0
calculateOverlappingPairs is optional: incremental algorithms (sweep and prune) might do it during th...
virtual void rayTest(const btVector3 &rayFrom, const btVector3 &rayTo, btBroadphaseRayCallback &rayCallback, const btVector3 &aabbMin=btVector3(0, 0, 0), const btVector3 &aabbMax=btVector3(0, 0, 0))=0
virtual void setAabb(btBroadphaseProxy *proxy, const btVector3 &aabbMin, const btVector3 &aabbMax, btDispatcher *dispatcher)=0
virtual void destroyProxy(btBroadphaseProxy *proxy, btDispatcher *dispatcher)=0
virtual btOverlappingPairCache * getOverlappingPairCache()=0
virtual void processCollision(const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut)=0
virtual ~btCollisionAlgorithm()
CollisionWorld is interface and container for the collision detection.
virtual void rayTest(const btVector3 &rayFromWorld, const btVector3 &rayToWorld, RayResultCallback &resultCallback) const
virtual void updateAabbs()
virtual void serialize(btSerializer *serializer)
Preliminary serialization test for Bullet 2.76. Loading those files requires a separate parser (Bulle...
virtual void debugDrawWorld()
const btBroadphaseInterface * getBroadphase() const
static void objectQuerySingleInternal(const btConvexShape *castShape, const btTransform &convexFromTrans, const btTransform &convexToTrans, const btCollisionObjectWrapper *colObjWrap, ConvexResultCallback &resultCallback, btScalar allowedPenetration)
virtual ~btCollisionWorld()
virtual void refreshBroadphaseProxy(btCollisionObject *collisionObject)
btBroadphaseInterface * m_broadphasePairCache
void updateSingleAabb(btCollisionObject *colObj)
virtual void removeCollisionObject(btCollisionObject *collisionObject)
virtual void addCollisionObject(btCollisionObject *collisionObject, int collisionFilterGroup=btBroadphaseProxy::DefaultFilter, int collisionFilterMask=btBroadphaseProxy::AllFilter)
btAlignedObjectArray< btCollisionObject * > m_collisionObjects
btDispatcher * getDispatcher()
virtual btIDebugDraw * getDebugDrawer()
btCollisionWorld(btDispatcher *dispatcher, btBroadphaseInterface *broadphasePairCache, btCollisionConfiguration *collisionConfiguration)
for debug drawing
int getNumCollisionObjects() const
virtual void performDiscreteCollisionDetection()
static void rayTestSingleInternal(const btTransform &rayFromTrans, const btTransform &rayToTrans, const btCollisionObjectWrapper *collisionObjectWrap, RayResultCallback &resultCallback)
void convexSweepTest(const btConvexShape *castShape, const btTransform &from, const btTransform &to, ConvexResultCallback &resultCallback, btScalar allowedCcdPenetration=btScalar(0.)) const
bool m_forceUpdateAllAabbs
btIDebugDraw * m_debugDrawer
static void objectQuerySingle(const btConvexShape *castShape, const btTransform &rayFromTrans, const btTransform &rayToTrans, btCollisionObject *collisionObject, const btCollisionShape *collisionShape, const btTransform &colObjWorldTransform, ConvexResultCallback &resultCallback, btScalar allowedPenetration)
objectQuerySingle performs a collision detection query and calls the resultCallback....
btDispatcherInfo & getDispatchInfo()
btDispatcher * m_dispatcher1
void contactPairTest(btCollisionObject *colObjA, btCollisionObject *colObjB, ContactResultCallback &resultCallback)
void serializeContactManifolds(btSerializer *serializer)
virtual void debugDrawObject(const btTransform &worldTransform, const btCollisionShape *shape, const btVector3 &color)
static void rayTestSingle(const btTransform &rayFromTrans, const btTransform &rayToTrans, btCollisionObject *collisionObject, const btCollisionShape *collisionShape, const btTransform &colObjWorldTransform, RayResultCallback &resultCallback)
void contactTest(btCollisionObject *colObj, ContactResultCallback &resultCallback)
void serializeCollisionObjects(btSerializer *serializer)
virtual void computeOverlappingPairs()
btConvexCast is an interface for Casting
virtual bool calcTimeOfImpact(const btTransform &fromA, const btTransform &toA, const btTransform &fromB, const btTransform &toB, CastResult &result)=0
cast a convex against another convex object
virtual int getNumManifolds() const =0
virtual void dispatchAllCollisionPairs(btOverlappingPairCache *pairCache, const btDispatcherInfo &dispatchInfo, btDispatcher *dispatcher)=0
virtual btPersistentManifold * getManifoldByIndexInternal(int index)=0
virtual btPersistentManifold ** getInternalManifoldPointer()=0
virtual void freeCollisionAlgorithm(void *ptr)=0
virtual btCollisionAlgorithm * findAlgorithm(const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, btPersistentManifold *sharedManifold, ebtDispatcherQueryType queryType)=0
GjkConvexCast performs a raycast on a convex object using support mapping.
void insert(const Key &key, const Value &value)
const Value * find(const Key &key) const
virtual void drawCone(btScalar radius, btScalar height, int upAxis, const btTransform &transform, const btVector3 &color)
virtual void drawPlane(const btVector3 &planeNormal, btScalar planeConst, const btTransform &transform, const btVector3 &color)
virtual void drawLine(const btVector3 &from, const btVector3 &to, const btVector3 &color)=0
virtual void drawSphere(btScalar radius, const btTransform &transform, const btVector3 &color)
virtual void reportErrorWarning(const char *warningString)=0
virtual void clearLines()
virtual void drawTransform(const btTransform &transform, btScalar orthoLen)
virtual void drawContactPoint(const btVector3 &PointOnB, const btVector3 &normalOnB, btScalar distance, int lifeTime, const btVector3 &color)=0
virtual int getDebugMode() const =0
virtual void drawBox(const btVector3 &bbMin, const btVector3 &bbMax, const btVector3 &color)
virtual void drawCylinder(btScalar radius, btScalar halfHeight, int upAxis, const btTransform &transform, const btVector3 &color)
virtual DefaultColors getDefaultColors() const
virtual void drawAabb(const btVector3 &from, const btVector3 &to, const btVector3 &color)
virtual void drawCapsule(btScalar radius, btScalar halfHeight, int upAxis, const btTransform &transform, const btVector3 &color)
btScalar getDistance() const
btVector3 m_positionWorldOnA
m_positionWorldOnA is redundant information, see getPositionWorldOnA(), but for clarity
btVector3 m_normalWorldOnB
btVector3 m_positionWorldOnB
btManifoldResult is a helper class to manage contact results.
const btCollisionObjectWrapper * m_body0Wrap
const btCollisionObjectWrapper * m_body1Wrap
btScalar m_closestPointDistanceThreshold
btPersistentManifold * m_manifoldPtr
virtual void cleanProxyFromPairs(btBroadphaseProxy *proxy, btDispatcher *dispatcher)=0
virtual btChunk * allocate(size_t size, int numElements)=0
virtual int getSerializationFlags() const =0
virtual void finishSerialization()=0
virtual void startSerialization()=0
virtual void finalizeChunk(btChunk *chunk, const char *structType, int chunkCode, void *oldPtr)=0
@ kF_DisableHeightfieldAccelerator
@ kF_UseGjkConvexCastRaytest
DEGForeachIDComponentCallback callback
SyclQueue void void size_t num_bytes void
IconTextureDrawCall normal
vec_base< T, 3 > cross(const vec_base< T, 3 > &a, const vec_base< T, 3 > &b)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
btCollisionWorld::ContactResultCallback & m_resultCallback
virtual void addContactPoint(const btVector3 &normalOnBInWorld, const btVector3 &pointInWorld, btScalar depth)
btBridgedManifoldResult(const btCollisionObjectWrapper *obj0Wrap, const btCollisionObjectWrapper *obj1Wrap, btCollisionWorld::ContactResultCallback &resultCallback)
btVector3 m_rayDirectionInverse
added some cached data to accelerate ray-AABB tests
SIMD_FORCE_INLINE const btCollisionShape * getCollisionShape() const
SIMD_FORCE_INLINE const btTransform & getWorldTransform() const
SIMD_FORCE_INLINE const btCollisionObject * getCollisionObject() const
RayResultCallback is used to report new raycast results.
virtual bool needsCollision(btBroadphaseProxy *proxy0) const
btScalar m_closestHitFraction
virtual btScalar addSingleResult(LocalConvexResult &convexResult, bool normalInWorldSpace)=0
RayResultCallback is used to report new raycast results.
btScalar m_closestHitFraction
virtual bool needsCollision(btBroadphaseProxy *proxy0) const
virtual btScalar addSingleResult(LocalRayResult &rayResult, bool normalInWorldSpace)=0
btScalar m_allowedPenetration
static btDbvtAabbMm FromMM(const btVector3 &mi, const btVector3 &mx)
static DBVT_PREFIX void rayTest(const btDbvtNode *root, const btVector3 &rayFrom, const btVector3 &rayTo, DBVT_IPOLICY)
const btCollisionWorld * m_world
btTransform m_rayFromTrans
virtual bool process(const btBroadphaseProxy *proxy)
btSingleRayCallback(const btVector3 &rayFromWorld, const btVector3 &rayToWorld, const btCollisionWorld *world, btCollisionWorld::RayResultCallback &resultCallback)
btCollisionWorld::RayResultCallback & m_resultCallback
const btConvexShape * m_castShape
btTransform m_convexToTrans
virtual bool process(const btBroadphaseProxy *proxy)
const btCollisionWorld * m_world
btTransform m_convexFromTrans
btCollisionWorld::ConvexResultCallback & m_resultCallback
btScalar m_allowedCcdPenetration
btSingleSweepCallback(const btConvexShape *castShape, const btTransform &convexFromTrans, const btTransform &convexToTrans, const btCollisionWorld *world, btCollisionWorld::ConvexResultCallback &resultCallback, btScalar allowedPenetration)