From b21d8caa9a825253731bef57e0d05d7f726d482a Mon Sep 17 00:00:00 2001 From: "erwin.coumans" Date: Wed, 27 Aug 2008 22:01:50 +0000 Subject: [PATCH] Added more Doxygen comments for classes in src/BulletCollision/CollisionShapes --- src/BulletCollision/CollisionShapes/btBoxShape.h | 2 +- .../CollisionShapes/btBvhTriangleMeshShape.h | 6 ++++-- src/BulletCollision/CollisionShapes/btCapsuleShape.h | 6 +++--- src/BulletCollision/CollisionShapes/btCollisionShape.h | 2 +- src/BulletCollision/CollisionShapes/btCompoundShape.h | 2 +- src/BulletCollision/CollisionShapes/btConcaveShape.h | 4 ++-- src/BulletCollision/CollisionShapes/btConeShape.h | 2 +- src/BulletCollision/CollisionShapes/btConvexHullShape.h | 6 ++---- .../CollisionShapes/btConvexInternalShape.h | 2 +- src/BulletCollision/CollisionShapes/btConvexShape.h | 5 ++--- .../CollisionShapes/btConvexTriangleMeshShape.h | 4 ++-- src/BulletCollision/CollisionShapes/btCylinderShape.h | 2 +- src/BulletCollision/CollisionShapes/btEmptyShape.h | 4 ++-- .../CollisionShapes/btHeightfieldTerrainShape.h | 3 ++- .../CollisionShapes/btMinkowskiSumShape.h | 2 +- src/BulletCollision/CollisionShapes/btMultiSphereShape.h | 3 ++- .../CollisionShapes/btMultimaterialTriangleMeshShape.h | 3 +-- src/BulletCollision/CollisionShapes/btOptimizedBvh.h | 2 +- .../CollisionShapes/btPolyhedralConvexShape.h | 2 +- src/BulletCollision/CollisionShapes/btShapeHull.h | 4 +++- src/BulletCollision/CollisionShapes/btSphereShape.h | 2 +- src/BulletCollision/CollisionShapes/btStaticPlaneShape.h | 3 +-- .../CollisionShapes/btStridingMeshInterface.h | 3 ++- src/BulletCollision/CollisionShapes/btTetrahedronShape.h | 2 +- src/BulletCollision/CollisionShapes/btTriangleBuffer.cpp | 9 +-------- src/BulletCollision/CollisionShapes/btTriangleBuffer.h | 8 ++++++++ src/BulletCollision/CollisionShapes/btTriangleCallback.h | 2 ++ .../CollisionShapes/btTriangleIndexVertexArray.h | 7 +++---- .../CollisionShapes/btTriangleIndexVertexMaterialArray.h | 2 +- src/BulletCollision/CollisionShapes/btTriangleMesh.h | 6 +++--- .../CollisionShapes/btTriangleMeshShape.h | 2 +- .../CollisionShapes/btUniformScalingShape.h | 2 ++ 32 files changed, 60 insertions(+), 54 deletions(-) diff --git a/src/BulletCollision/CollisionShapes/btBoxShape.h b/src/BulletCollision/CollisionShapes/btBoxShape.h index 98f1bd34b..4d4fbefea 100644 --- a/src/BulletCollision/CollisionShapes/btBoxShape.h +++ b/src/BulletCollision/CollisionShapes/btBoxShape.h @@ -22,7 +22,7 @@ subject to the following restrictions: #include "LinearMath/btPoint3.h" #include "LinearMath/btMinMax.h" -///btBoxShape implements both a feature based (vertex/edge/plane) and implicit (getSupportingVertex) Box +///The btBoxShape is a box primitive around the origin, its sides axis aligned with length specified by half extents, in local shape coordinates. When used as part of a btCollisionObject or btRigidBody it will be an oriented box in world space. class btBoxShape: public btPolyhedralConvexShape { diff --git a/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h b/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h index 499bd8d35..6e587340d 100644 --- a/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h +++ b/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h @@ -21,8 +21,10 @@ subject to the following restrictions: #include "LinearMath/btAlignedAllocator.h" -///Bvh Concave triangle mesh is a static-triangle mesh shape with Bounding Volume Hierarchy optimization. -///Uses an interface to access the triangles to allow for sharing graphics/physics triangles. +///The btBvhTriangleMeshShape is a static-triangle mesh shape with several optimizations, such as bounding volume hierarchy and cache friendly traversal for PlayStation 3 Cell SPU. It is recommended to enable useQuantizedAabbCompression for better memory usage. +///It takes a triangle mesh as input, for example a btTriangleMesh or btTriangleIndexVertexArray. The btBvhTriangleMeshShape class allows for triangle mesh deformations by a refit or partialRefit method. +///Instead of building the bounding volume hierarchy acceleration structure, it is also possible to serialize (save) and deserialize (load) the structure from disk. +///See Demos\ConcaveDemo\ConcavePhysicsDemo.cpp for an example. ATTRIBUTE_ALIGNED16(class) btBvhTriangleMeshShape : public btTriangleMeshShape { diff --git a/src/BulletCollision/CollisionShapes/btCapsuleShape.h b/src/BulletCollision/CollisionShapes/btCapsuleShape.h index c0056a210..5c0c7cc27 100644 --- a/src/BulletCollision/CollisionShapes/btCapsuleShape.h +++ b/src/BulletCollision/CollisionShapes/btCapsuleShape.h @@ -20,9 +20,9 @@ subject to the following restrictions: #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types -///btCapsuleShape represents a capsule around the Y axis -///A more general solution that can represent capsules is the btMultiSphereShape -///the total height is height+2*radius, so the height is just the height between the center of each 'sphere' of the capsule caps. +///The btCapsuleShape represents a capsule around the Y axis, there is also the btCapsuleShapeX aligned around the X axis and btCapsuleShapeZ around the Z axis. +///The total height is height+2*radius, so the height is just the height between the center of each 'sphere' of the capsule caps. +///The btCapsuleShape is a convex hull of two spheres. The btMultiSphereShape is a more general collision shape that takes the convex hull of multiple sphere, so it can also represent a capsule when just using two spheres. class btCapsuleShape : public btConvexInternalShape { protected: diff --git a/src/BulletCollision/CollisionShapes/btCollisionShape.h b/src/BulletCollision/CollisionShapes/btCollisionShape.h index a9b1cc355..3a352b907 100644 --- a/src/BulletCollision/CollisionShapes/btCollisionShape.h +++ b/src/BulletCollision/CollisionShapes/btCollisionShape.h @@ -22,7 +22,7 @@ subject to the following restrictions: #include "LinearMath/btPoint3.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" //for the shape types -///btCollisionShape provides interface for collision shapes that can be shared among btCollisionObjects. +///The btCollisionShape class provides an interface for collision shapes that can be shared among btCollisionObjects. class btCollisionShape { diff --git a/src/BulletCollision/CollisionShapes/btCompoundShape.h b/src/BulletCollision/CollisionShapes/btCompoundShape.h index 096680c23..f77e4b595 100644 --- a/src/BulletCollision/CollisionShapes/btCompoundShape.h +++ b/src/BulletCollision/CollisionShapes/btCompoundShape.h @@ -46,7 +46,7 @@ SIMD_FORCE_INLINE bool operator==(const btCompoundShapeChild& c1, const btCompou } /// btCompoundShape allows to store multiple other btCollisionShapes -/// This allows for concave collision objects. This is more general then the Static Concave btTriangleMeshShape. +/// This allows for moving concave collision objects. This is more general then the static concave btBvhTriangleMeshShape. ATTRIBUTE_ALIGNED16(class) btCompoundShape : public btCollisionShape { //btAlignedObjectArray m_childTransforms; diff --git a/src/BulletCollision/CollisionShapes/btConcaveShape.h b/src/BulletCollision/CollisionShapes/btConcaveShape.h index 4db4e6513..f3f57206a 100644 --- a/src/BulletCollision/CollisionShapes/btConcaveShape.h +++ b/src/BulletCollision/CollisionShapes/btConcaveShape.h @@ -21,8 +21,8 @@ subject to the following restrictions: #include "btTriangleCallback.h" -///Concave shape proves an interface concave shapes that can produce triangles that overlapping a given AABB. -///Static triangle mesh, infinite plane, height field/landscapes are example that implement this interface. +///The btConcaveShape class provides an interface for non-moving (static) concave shapes. +///It has been implemented by the btStaticPlaneShape, btBvhTriangleMeshShape and btHeightfieldTerrainShape. class btConcaveShape : public btCollisionShape { protected: diff --git a/src/BulletCollision/CollisionShapes/btConeShape.h b/src/BulletCollision/CollisionShapes/btConeShape.h index 34f36b35f..685369742 100644 --- a/src/BulletCollision/CollisionShapes/btConeShape.h +++ b/src/BulletCollision/CollisionShapes/btConeShape.h @@ -19,7 +19,7 @@ subject to the following restrictions: #include "btConvexInternalShape.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types -///btConeShape implements a Cone shape, around the Y axis +///The btConeShape implements a cone shape primitive, centered around the origin and aligned with the Y axis. The btConeShapeX is aligned around the X axis and btConeShapeZ around the Z axis. class btConeShape : public btConvexInternalShape { diff --git a/src/BulletCollision/CollisionShapes/btConvexHullShape.h b/src/BulletCollision/CollisionShapes/btConvexHullShape.h index abde7862b..c029ca194 100644 --- a/src/BulletCollision/CollisionShapes/btConvexHullShape.h +++ b/src/BulletCollision/CollisionShapes/btConvexHullShape.h @@ -20,10 +20,8 @@ subject to the following restrictions: #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types #include "LinearMath/btAlignedObjectArray.h" -///ConvexHullShape implements an implicit (getSupportingVertex) Convex Hull of a Point Cloud (vertices) -///No connectivity is needed. localGetSupportingVertex iterates linearly though all vertices. -///on modern hardware, due to cache coherency this isn't that bad. Complex algorithms tend to trash the cash. -///(memory is much slower then the cpu) +///The btConvexHullShape implements an implicit convex hull of an array of vertices. +///Bullet provides a general and fast collision detector for convex shapes based on GJK and EPA using localGetSupportingVertex. ATTRIBUTE_ALIGNED16(class) btConvexHullShape : public btPolyhedralConvexShape { btAlignedObjectArray m_points; diff --git a/src/BulletCollision/CollisionShapes/btConvexInternalShape.h b/src/BulletCollision/CollisionShapes/btConvexInternalShape.h index 7fcaad3fc..9388ccf31 100644 --- a/src/BulletCollision/CollisionShapes/btConvexInternalShape.h +++ b/src/BulletCollision/CollisionShapes/btConvexInternalShape.h @@ -4,7 +4,7 @@ #include "btConvexShape.h" -///btConvexInternalShape carries some additional data, shared by most implementations +///The btConvexInternalShape is an internal base class, shared by most convex shape implementations. class btConvexInternalShape : public btConvexShape { diff --git a/src/BulletCollision/CollisionShapes/btConvexShape.h b/src/BulletCollision/CollisionShapes/btConvexShape.h index 6dfd288e0..e4eb7f6db 100644 --- a/src/BulletCollision/CollisionShapes/btConvexShape.h +++ b/src/BulletCollision/CollisionShapes/btConvexShape.h @@ -28,9 +28,8 @@ subject to the following restrictions: struct btConvexCastResult; #define MAX_PREFERRED_PENETRATION_DIRECTIONS 10 -/// btConvexShape is an abstract shape interface. -/// It describes general convex shapes using the localGetSupportingVertex interface -/// used in combination with GJK or btConvexCast +/// The btConvexShape is an abstract shape interface, implemented by all convex shapes such as btBoxShape, btConvexHullShape etc. +/// It describes general convex shapes using the localGetSupportingVertex interface, used by collision detectors such as btGjkPairDetector. ATTRIBUTE_ALIGNED16(class) btConvexShape : public btCollisionShape { diff --git a/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h b/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h index f3daa5836..57dcff16a 100644 --- a/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h +++ b/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h @@ -6,8 +6,8 @@ #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types -/// btConvexTriangleMeshShape is a convex hull of a triangle mesh. If you just have a point cloud, you can use btConvexHullShape instead. -/// It uses the btStridingMeshInterface instead of a point cloud. This can avoid the duplication of the triangle mesh data. +/// The btConvexTriangleMeshShape is a convex hull of a triangle mesh, but the performance is not as good as btConvexHullShape. +/// A small benefit of this class is that it uses the btStridingMeshInterface, so you can avoid the duplication of the triangle mesh data. Nevertheless, most users should use the much better performing btConvexHullShape instead. class btConvexTriangleMeshShape : public btPolyhedralConvexShape { diff --git a/src/BulletCollision/CollisionShapes/btCylinderShape.h b/src/BulletCollision/CollisionShapes/btCylinderShape.h index dc1ff3b57..30938acf7 100644 --- a/src/BulletCollision/CollisionShapes/btCylinderShape.h +++ b/src/BulletCollision/CollisionShapes/btCylinderShape.h @@ -20,7 +20,7 @@ subject to the following restrictions: #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types #include "LinearMath/btVector3.h" -/// implements cylinder shape interface +/// The btCylinderShape class implements a cylinder shape primitive, centered around the origin. Its central axis aligned with the Y axis. btCylinderShapeX is aligned with the X axis and btCylinderShapeZ around the Z axis. class btCylinderShape : public btBoxShape { diff --git a/src/BulletCollision/CollisionShapes/btEmptyShape.h b/src/BulletCollision/CollisionShapes/btEmptyShape.h index f8552e37b..d7d78407b 100644 --- a/src/BulletCollision/CollisionShapes/btEmptyShape.h +++ b/src/BulletCollision/CollisionShapes/btEmptyShape.h @@ -26,8 +26,8 @@ subject to the following restrictions: -/// btEmptyShape is a collision shape without actual collision detection. -///It can be replaced by another shape during runtime +/// The btEmptyShape is a collision shape without actual collision detection shape, so most users should ignore this class. +/// It can be replaced by another shape during runtime, but the inertia tensor should be recomputed. class btEmptyShape : public btConcaveShape { public: diff --git a/src/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h b/src/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h index 216e9ee7c..eb3507e8b 100644 --- a/src/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h +++ b/src/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h @@ -18,7 +18,8 @@ subject to the following restrictions: #include "btConcaveShape.h" -///btHeightfieldTerrainShape simulates a 2D heightfield terrain +///The btHeightfieldTerrainShape simulates a 2D heightfield terrain collision shape. You can also use the more general btBvhTriangleMeshShape instead. +///An example implementation of btHeightfieldTerrainShape is provided in Demos/VehicleDemo/VehicleDemo.cpp class btHeightfieldTerrainShape : public btConcaveShape { protected: diff --git a/src/BulletCollision/CollisionShapes/btMinkowskiSumShape.h b/src/BulletCollision/CollisionShapes/btMinkowskiSumShape.h index 484e317e6..f9c8427c2 100644 --- a/src/BulletCollision/CollisionShapes/btMinkowskiSumShape.h +++ b/src/BulletCollision/CollisionShapes/btMinkowskiSumShape.h @@ -19,7 +19,7 @@ subject to the following restrictions: #include "btConvexInternalShape.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types -/// btMinkowskiSumShape represents implicit (getSupportingVertex) based minkowski sum of two convex implicit shapes. +/// The btMinkowskiSumShape is only for advanced users. This shape represents implicit based minkowski sum of two convex implicit shapes. class btMinkowskiSumShape : public btConvexInternalShape { diff --git a/src/BulletCollision/CollisionShapes/btMultiSphereShape.h b/src/BulletCollision/CollisionShapes/btMultiSphereShape.h index 7db54e7a2..45968f394 100644 --- a/src/BulletCollision/CollisionShapes/btMultiSphereShape.h +++ b/src/BulletCollision/CollisionShapes/btMultiSphereShape.h @@ -21,7 +21,8 @@ subject to the following restrictions: #define MAX_NUM_SPHERES 5 -///btMultiSphereShape represents implicit convex hull of a collection of spheres (using getSupportingVertex) +///The btMultiSphereShape represents the convex hull of a collection of spheres. You can create special capsules or other smooth volumes. +///It is possible to animate the spheres for deformation. class btMultiSphereShape : public btConvexInternalShape { diff --git a/src/BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.h b/src/BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.h index dab7575ca..e0b71b737 100644 --- a/src/BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.h +++ b/src/BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.h @@ -21,8 +21,7 @@ subject to the following restrictions: #include "btBvhTriangleMeshShape.h" #include "btMaterial.h" -///BvhTriangleMaterialMeshShape extends BvhTriangleMeshShape. -///Its main contribution is the interface into a material array. +///The BvhTriangleMaterialMeshShape extends the btBvhTriangleMeshShape. Its main contribution is the interface into a material array, which allows per-triangle friction and restitution. ATTRIBUTE_ALIGNED16(class) btMultimaterialTriangleMeshShape : public btBvhTriangleMeshShape { btAlignedObjectArray m_materialList; diff --git a/src/BulletCollision/CollisionShapes/btOptimizedBvh.h b/src/BulletCollision/CollisionShapes/btOptimizedBvh.h index 06972ea97..d7536417d 100644 --- a/src/BulletCollision/CollisionShapes/btOptimizedBvh.h +++ b/src/BulletCollision/CollisionShapes/btOptimizedBvh.h @@ -21,7 +21,7 @@ subject to the following restrictions: class btStridingMeshInterface; -///OptimizedBvh extends the btQuantizedBvh to create AABB tree for triangle meshes, through the btStridingMeshInterface. +///The btOptimizedBvh extends the btQuantizedBvh to create AABB tree for triangle meshes, through the btStridingMeshInterface. ATTRIBUTE_ALIGNED16(class) btOptimizedBvh : public btQuantizedBvh { diff --git a/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.h b/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.h index 9d46b991e..ac3d18800 100644 --- a/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.h +++ b/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.h @@ -21,7 +21,7 @@ subject to the following restrictions: #include "btConvexInternalShape.h" -///PolyhedralConvexShape is an interface class for feature based (vertex/edge/face) convex shapes. +///The btPolyhedralConvexShape is an internal interface class for polyhedral convex shapes. class btPolyhedralConvexShape : public btConvexInternalShape { diff --git a/src/BulletCollision/CollisionShapes/btShapeHull.h b/src/BulletCollision/CollisionShapes/btShapeHull.h index 870bbf81f..8fce57b7c 100644 --- a/src/BulletCollision/CollisionShapes/btShapeHull.h +++ b/src/BulletCollision/CollisionShapes/btShapeHull.h @@ -22,7 +22,9 @@ subject to the following restrictions: #include "BulletCollision/CollisionShapes/btConvexShape.h" -///btShapeHull takes a btConvexShape, builds the convex hull using btConvexHull and provides triangle indices and vertices. +///The btShapeHull class takes a btConvexShape, builds a simplified convex hull using btConvexHull and provides triangle indices and vertices. +///It can be useful for to simplify a complex convex object and for visualization of a non-polyhedral convex object. +///It approximates the convex hull using the supporting vertex of 42 directions. class btShapeHull { public: diff --git a/src/BulletCollision/CollisionShapes/btSphereShape.h b/src/BulletCollision/CollisionShapes/btSphereShape.h index d89a78b08..83421d69e 100644 --- a/src/BulletCollision/CollisionShapes/btSphereShape.h +++ b/src/BulletCollision/CollisionShapes/btSphereShape.h @@ -19,7 +19,7 @@ subject to the following restrictions: #include "btConvexInternalShape.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types -///btSphereShape implements an implicit (getSupportingVertex) Sphere +///The btSphereShape implements an implicit sphere, centered around a local origin with radius. ATTRIBUTE_ALIGNED16(class) btSphereShape : public btConvexInternalShape { diff --git a/src/BulletCollision/CollisionShapes/btStaticPlaneShape.h b/src/BulletCollision/CollisionShapes/btStaticPlaneShape.h index 42b8cf113..ddebca73d 100644 --- a/src/BulletCollision/CollisionShapes/btStaticPlaneShape.h +++ b/src/BulletCollision/CollisionShapes/btStaticPlaneShape.h @@ -19,8 +19,7 @@ subject to the following restrictions: #include "btConcaveShape.h" -///StaticPlaneShape simulates an 'infinite' plane by dynamically reporting triangles approximated by intersection of the plane with the AABB. -///Assumed is that the other objects is not also infinite, so a reasonable sized AABB. +///The btStaticPlaneShape simulates an infinite non-moving (static) collision plane. class btStaticPlaneShape : public btConcaveShape { protected: diff --git a/src/BulletCollision/CollisionShapes/btStridingMeshInterface.h b/src/BulletCollision/CollisionShapes/btStridingMeshInterface.h index 7b3716154..345e774fb 100644 --- a/src/BulletCollision/CollisionShapes/btStridingMeshInterface.h +++ b/src/BulletCollision/CollisionShapes/btStridingMeshInterface.h @@ -29,7 +29,8 @@ typedef enum PHY_ScalarType { PHY_FIXEDPOINT88 } PHY_ScalarType; -/// btStridingMeshInterface is the interface class for high performance access to triangle meshes +/// The btStridingMeshInterface is the interface class for high performance generic access to triangle meshes, used in combination with btBvhTriangleMeshShape and some other collision shapes. +/// Using index striding of 3*sizeof(integer) it can use triangle arrays, using index striding of 1*sizeof(integer) it can handle triangle strips. /// It allows for sharing graphics and collision meshes. Also it provides locking/unlocking of graphics meshes that are in gpu memory. class btStridingMeshInterface { diff --git a/src/BulletCollision/CollisionShapes/btTetrahedronShape.h b/src/BulletCollision/CollisionShapes/btTetrahedronShape.h index ca1b4b42a..09272d61d 100644 --- a/src/BulletCollision/CollisionShapes/btTetrahedronShape.h +++ b/src/BulletCollision/CollisionShapes/btTetrahedronShape.h @@ -21,7 +21,7 @@ subject to the following restrictions: #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" -///BU_Simplex1to4 implements feature based and implicit simplex of up to 4 vertices (tetrahedron, triangle, line, vertex). +///The btBU_Simplex1to4 implements tetrahedron, triangle, line, vertex collision shapes. In most cases it is better to use btConvexHullShape instead. class btBU_Simplex1to4 : public btPolyhedralConvexShape { protected: diff --git a/src/BulletCollision/CollisionShapes/btTriangleBuffer.cpp b/src/BulletCollision/CollisionShapes/btTriangleBuffer.cpp index 21374fd99..c84180442 100644 --- a/src/BulletCollision/CollisionShapes/btTriangleBuffer.cpp +++ b/src/BulletCollision/CollisionShapes/btTriangleBuffer.cpp @@ -16,14 +16,7 @@ subject to the following restrictions: #include "btTriangleBuffer.h" -///example usage of this class: -// btTriangleBuffer triBuf; -// concaveShape->processAllTriangles(&triBuf,aabbMin, aabbMax); -// for (int i=0;iprocessAllTriangles(&triBuf,aabbMin, aabbMax); +/// for (int i=0;i IndexedMeshArray; -///TriangleIndexVertexArray allows to use multiple meshes, by indexing into existing triangle/index arrays. +///The btTriangleIndexVertexArray allows to access multiple triangle meshes, by indexing into existing triangle/index arrays. ///Additional meshes can be added using addIndexedMesh ///No duplcate is made of the vertex/index data, it only indexes into external vertex/index arrays. ///So keep those arrays around during the lifetime of this btTriangleIndexVertexArray. diff --git a/src/BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.h b/src/BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.h index c712071a2..7c7cef8b7 100644 --- a/src/BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.h +++ b/src/BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.h @@ -41,7 +41,7 @@ ATTRIBUTE_ALIGNED16( struct) btMaterialProperties typedef btAlignedObjectArray MaterialArray; -///TriangleIndexVertexMaterialArray is built on TriangleIndexVertexArray +///Teh btTriangleIndexVertexMaterialArray is built on TriangleIndexVertexArray ///The addition of a material array allows for the utilization of the partID and ///triangleIndex that are returned in the ContactAddedCallback. As with ///TriangleIndexVertexArray, no duplicate is made of the material data, so it diff --git a/src/BulletCollision/CollisionShapes/btTriangleMesh.h b/src/BulletCollision/CollisionShapes/btTriangleMesh.h index 109a735bd..e4d41d5ed 100644 --- a/src/BulletCollision/CollisionShapes/btTriangleMesh.h +++ b/src/BulletCollision/CollisionShapes/btTriangleMesh.h @@ -21,10 +21,10 @@ subject to the following restrictions: #include "LinearMath/btVector3.h" #include "LinearMath/btAlignedObjectArray.h" -///btTriangleMesh provides storage for a concave triangle mesh. It can be used as data for the btTriangleMeshShape. +///The btTriangleMesh class is a convenience class derived from btTriangleIndexVertexArray, that provides storage for a concave triangle mesh. It can be used as data for the btBvhTriangleMeshShape. ///It allows either 32bit or 16bit indices, and 4 (x-y-z-w) or 3 (x-y-z) component vertices. -///btTriangleMesh will duplicate/keep all mesh data. -///If you prefer, you can avoid using btTriangleMesh and directly use btTriangleIndexVertexArray or derive your own class from btStridingMeshInterface. This allows to share render and collision meshes. +///If you want to share triangle/index data between graphics mesh and collision mesh (btBvhTriangleMeshShape), you can directly use btTriangleIndexVertexArray or derive your own class from btStridingMeshInterface. +///Performance of btTriangleMesh and btTriangleIndexVertexArray used in a btBvhTriangleMeshShape is the same. class btTriangleMesh : public btTriangleIndexVertexArray { btAlignedObjectArray m_4componentVertices; diff --git a/src/BulletCollision/CollisionShapes/btTriangleMeshShape.h b/src/BulletCollision/CollisionShapes/btTriangleMeshShape.h index c72ce19b9..9fba77cb5 100644 --- a/src/BulletCollision/CollisionShapes/btTriangleMeshShape.h +++ b/src/BulletCollision/CollisionShapes/btTriangleMeshShape.h @@ -20,7 +20,7 @@ subject to the following restrictions: #include "btStridingMeshInterface.h" -///Concave triangle mesh interface. Don't use this class directly, use btBvhTriangleMeshShape instead. +///The btTriangleMeshShape is an internal concave triangle mesh interface. Don't use this class directly, use btBvhTriangleMeshShape instead. class btTriangleMeshShape : public btConcaveShape { protected: diff --git a/src/BulletCollision/CollisionShapes/btUniformScalingShape.h b/src/BulletCollision/CollisionShapes/btUniformScalingShape.h index 3a0ecf021..1e17fc8e1 100644 --- a/src/BulletCollision/CollisionShapes/btUniformScalingShape.h +++ b/src/BulletCollision/CollisionShapes/btUniformScalingShape.h @@ -19,6 +19,8 @@ subject to the following restrictions: #include "btConvexShape.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types +///The btUniformScalingShape allows to re-use uniform scaled instances of btConvexShape in a memory efficient way. +///Istead of using btUniformScalingShape, it is better to use the non-uniform setLocalScaling method on convex shapes that implement it. class btUniformScalingShape : public btConvexShape { btConvexShape* m_childConvexShape;