btTetrahedronShape.h
Go to the documentation of this file.
00001 /*
00002 Bullet Continuous Collision Detection and Physics Library
00003 Copyright (c) 2003-2009 Erwin Coumans  http://bulletphysics.org
00004 
00005 This software is provided 'as-is', without any express or implied warranty.
00006 In no event will the authors be held liable for any damages arising from the use of this software.
00007 Permission is granted to anyone to use this software for any purpose, 
00008 including commercial applications, and to alter it and redistribute it freely, 
00009 subject to the following restrictions:
00010 
00011 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
00012 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
00013 3. This notice may not be removed or altered from any source distribution.
00014 */
00015 
00016 #ifndef BT_SIMPLEX_1TO4_SHAPE
00017 #define BT_SIMPLEX_1TO4_SHAPE
00018 
00019 
00020 #include "btPolyhedralConvexShape.h"
00021 #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
00022 
00023 
00025 class btBU_Simplex1to4 : public btPolyhedralConvexAabbCachingShape
00026 {
00027 protected:
00028 
00029         int     m_numVertices;
00030         btVector3       m_vertices[4];
00031 
00032 public:
00033         btBU_Simplex1to4();
00034 
00035         btBU_Simplex1to4(const btVector3& pt0);
00036         btBU_Simplex1to4(const btVector3& pt0,const btVector3& pt1);
00037         btBU_Simplex1to4(const btVector3& pt0,const btVector3& pt1,const btVector3& pt2);
00038         btBU_Simplex1to4(const btVector3& pt0,const btVector3& pt1,const btVector3& pt2,const btVector3& pt3);
00039 
00040     
00041         void    reset()
00042         {
00043                 m_numVertices = 0;
00044         }
00045         
00046         virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const;
00047 
00048         void addVertex(const btVector3& pt);
00049 
00050         //PolyhedralConvexShape interface
00051 
00052         virtual int     getNumVertices() const;
00053 
00054         virtual int getNumEdges() const;
00055 
00056         virtual void getEdge(int i,btVector3& pa,btVector3& pb) const;
00057         
00058         virtual void getVertex(int i,btVector3& vtx) const;
00059 
00060         virtual int     getNumPlanes() const;
00061 
00062         virtual void getPlane(btVector3& planeNormal,btVector3& planeSupport,int i) const;
00063 
00064         virtual int getIndex(int i) const;
00065 
00066         virtual bool isInside(const btVector3& pt,btScalar tolerance) const;
00067 
00068 
00070         virtual const char*     getName()const { return "btBU_Simplex1to4";}
00071 
00072 };
00073 
00074 #endif //BT_SIMPLEX_1TO4_SHAPE
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


bullet
Author(s): Erwin Coumans, ROS package maintained by Tully Foote
autogenerated on Wed Oct 31 2012 07:54:31