Changeset 7983 for code/branches/kicklib/src/external/bullet/BulletCollision/CollisionShapes/btPolyhedralConvexShape.h
- Timestamp:
- Feb 27, 2011, 7:43:24 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/kicklib/src/external/bullet/BulletCollision/CollisionShapes/btPolyhedralConvexShape.h
r5781 r7983 1 1 /* 2 2 Bullet Continuous Collision Detection and Physics Library 3 Copyright (c) 2003-200 6 Erwin Coumans http://continuousphysics.com/Bullet/3 Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org 4 4 5 5 This software is provided 'as-is', without any express or implied warranty. … … 18 18 19 19 #include "LinearMath/btMatrix3x3.h" 20 #include "LinearMath/btAabbUtil2.h"21 20 #include "btConvexInternalShape.h" 22 21 … … 27 26 28 27 protected: 29 btVector3 m_localAabbMin; 30 btVector3 m_localAabbMax; 31 bool m_isLocalAabbValid; 32 28 33 29 public: 34 30 … … 39 35 virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const; 40 36 virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const; 41 42 37 43 38 virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const; 39 40 41 virtual int getNumVertices() const = 0 ; 42 virtual int getNumEdges() const = 0; 43 virtual void getEdge(int i,btVector3& pa,btVector3& pb) const = 0; 44 virtual void getVertex(int i,btVector3& vtx) const = 0; 45 virtual int getNumPlanes() const = 0; 46 virtual void getPlane(btVector3& planeNormal,btVector3& planeSupport,int i ) const = 0; 47 // virtual int getIndex(int i) const = 0 ; 44 48 49 virtual bool isInside(const btVector3& pt,btScalar tolerance) const = 0; 50 51 }; 52 53 54 ///The btPolyhedralConvexAabbCachingShape adds aabb caching to the btPolyhedralConvexShape 55 class btPolyhedralConvexAabbCachingShape : public btPolyhedralConvexShape 56 { 57 58 btVector3 m_localAabbMin; 59 btVector3 m_localAabbMax; 60 bool m_isLocalAabbValid; 61 62 protected: 45 63 46 64 void setCachedLocalAabb (const btVector3& aabbMin, const btVector3& aabbMax) … … 58 76 } 59 77 78 public: 79 80 btPolyhedralConvexAabbCachingShape(); 81 60 82 inline void getNonvirtualAabb(const btTransform& trans,btVector3& aabbMin,btVector3& aabbMax, btScalar margin) const 61 83 { … … 66 88 } 67 89 68 90 virtual void setLocalScaling(const btVector3& scaling); 91 69 92 virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const; 70 93 71 virtual void setLocalScaling(const btVector3& scaling);72 73 94 void recalcLocalAabb(); 74 75 virtual int getNumVertices() const = 0 ;76 virtual int getNumEdges() const = 0;77 virtual void getEdge(int i,btVector3& pa,btVector3& pb) const = 0;78 virtual void getVertex(int i,btVector3& vtx) const = 0;79 virtual int getNumPlanes() const = 0;80 virtual void getPlane(btVector3& planeNormal,btVector3& planeSupport,int i ) const = 0;81 // virtual int getIndex(int i) const = 0 ;82 83 virtual bool isInside(const btVector3& pt,btScalar tolerance) const = 0;84 85 /// optional Hull is for optional Separating Axis Test Hull collision detection, see Hull.cpp86 class Hull* m_optionalHull;87 95 88 96 };
Note: See TracChangeset
for help on using the changeset viewer.