- Timestamp:
- Oct 20, 2008, 5:40:38 PM (16 years ago)
- Location:
- code/branches/physics/src/bullet/BulletCollision/CollisionShapes
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/physics/src/bullet/BulletCollision/CollisionShapes/btConvexPointCloudShape.cpp
r1963 r1972 18 18 #include "LinearMath/btQuaternion.h" 19 19 20 btConvexPointCloudShape::btConvexPointCloudShape (btVector3* points,int numPoints) : btPolyhedralConvexShape () 21 { 22 m_shapeType = CONVEX_POINT_CLOUD_SHAPE_PROXYTYPE; 23 m_points = points; 24 m_numPoints = numPoints; 25 26 recalcLocalAabb(); 27 } 28 29 void btConvexPointCloudShape::setPoints (btVector3* points, int numPoints) 30 { 31 m_points = points; 32 m_numPoints = numPoints; 33 34 recalcLocalAabb(); 35 } 36 37 20 38 void btConvexPointCloudShape::setLocalScaling(const btVector3& scaling) 21 39 { … … 24 42 } 25 43 26 #ifndef __SPU__27 44 btVector3 btConvexPointCloudShape::localGetSupportingVertexWithoutMargin(const btVector3& vec0)const 28 45 { … … 108 125 109 126 110 #endif 127 111 128 112 129 -
code/branches/physics/src/bullet/BulletCollision/CollisionShapes/btConvexPointCloudShape.h
r1963 r1972 29 29 BT_DECLARE_ALIGNED_ALLOCATOR(); 30 30 31 btConvexPointCloudShape(btVector3* points,int numPoints, bool computeAabb = true) 32 { 33 m_shapeType = CONVEX_POINT_CLOUD_SHAPE_PROXYTYPE; 34 m_points = points; 35 m_numPoints = numPoints; 31 btConvexPointCloudShape(btVector3* points,int numPoints); 36 32 37 if (computeAabb) 38 recalcLocalAabb(); 39 } 40 41 void setPoints (btVector3* points, int numPoints, bool computeAabb = true) 42 { 43 m_points = points; 44 m_numPoints = numPoints; 45 46 if (computeAabb) 47 recalcLocalAabb(); 48 } 33 void setPoints (btVector3* points, int numPoints); 49 34 50 35 btPoint3* getPoints() … … 63 48 } 64 49 65 #ifndef __SPU__66 50 virtual btVector3 localGetSupportingVertex(const btVector3& vec)const; 67 51 virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const; 68 52 virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const; 69 #endif70 53 71 54 -
code/branches/physics/src/bullet/BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp
r1963 r1972 16 16 #include "BulletCollision/CollisionShapes/btPolyhedralConvexShape.h" 17 17 18 btPolyhedralConvexShape::btPolyhedralConvexShape() :btConvexInternalShape(), 18 btPolyhedralConvexShape::btPolyhedralConvexShape() 19 :btConvexInternalShape(), 19 20 m_localAabbMin(1,1,1), 20 21 m_localAabbMax(-1,-1,-1), … … 24 25 25 26 } 27 26 28 27 29 -
code/branches/physics/src/bullet/BulletCollision/CollisionShapes/btPolyhedralConvexShape.h
r1963 r1972 32 32 bool m_isLocalAabbValid; 33 33 34 btPolyhedralConvexShape(); 34 35 public: 35 36 36 btPolyhedralConvexShape();37 37 38 38 39 //brute force implementations 39 40 40 virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const; 41 41 virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const; 42 43 42 44 43 virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const; 45 44 46 47 void setCachedLocalAabb (const btVector3& aabbMin, const btVector3& aabbMax)48 {49 m_isLocalAabbValid = true;50 m_localAabbMin = aabbMin;51 m_localAabbMax = aabbMax;52 }53 54 inline void getCachedLocalAabb (btVector3& aabbMin, btVector3& aabbMax) const55 {56 btAssert(m_isLocalAabbValid);57 aabbMin = m_localAabbMin;58 aabbMax = m_localAabbMax;59 }60 45 61 46 inline void getNonvirtualAabb(const btTransform& trans,btVector3& aabbMin,btVector3& aabbMax, btScalar margin) const -
code/branches/physics/src/bullet/BulletCollision/CollisionShapes/btSphereShape.cpp
r1963 r1972 18 18 19 19 #include "LinearMath/btQuaternion.h" 20 21 22 btSphereShape ::btSphereShape (btScalar radius) : btConvexInternalShape () 23 { 24 m_shapeType = SPHERE_SHAPE_PROXYTYPE; 25 m_implicitShapeDimensions.setX(radius); 26 m_collisionMargin = radius; 27 } 20 28 21 29 btVector3 btSphereShape::localGetSupportingVertexWithoutMargin(const btVector3& vec)const -
code/branches/physics/src/bullet/BulletCollision/CollisionShapes/btSphereShape.h
r1963 r1972 28 28 BT_DECLARE_ALIGNED_ALLOCATOR(); 29 29 30 btSphereShape (btScalar radius) : btConvexInternalShape () 31 { 32 m_shapeType = SPHERE_SHAPE_PROXYTYPE; 33 m_implicitShapeDimensions.setX(radius); 34 m_collisionMargin = radius; 35 } 30 btSphereShape (btScalar radius); 31 36 32 37 33 virtual btVector3 localGetSupportingVertex(const btVector3& vec)const;
Note: See TracChangeset
for help on using the changeset viewer.