btConvexShape.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_CONVEX_SHAPE_INTERFACE1
00017 #define BT_CONVEX_SHAPE_INTERFACE1
00018 
00019 #include "btCollisionShape.h"
00020 
00021 #include "LinearMath/btVector3.h"
00022 #include "LinearMath/btTransform.h"
00023 #include "LinearMath/btMatrix3x3.h"
00024 #include "btCollisionMargin.h"
00025 #include "LinearMath/btAlignedAllocator.h"
00026 
00027 #define MAX_PREFERRED_PENETRATION_DIRECTIONS 10
00028 
00031 ATTRIBUTE_ALIGNED16(class) btConvexShape : public btCollisionShape
00032 {
00033 
00034 
00035 public:
00036 
00037         BT_DECLARE_ALIGNED_ALLOCATOR();
00038 
00039         btConvexShape ();
00040 
00041         virtual ~btConvexShape();
00042 
00043         virtual btVector3       localGetSupportingVertex(const btVector3& vec)const = 0;
00044 
00046         #ifndef __SPU__
00047         virtual btVector3       localGetSupportingVertexWithoutMargin(const btVector3& vec) const=0;
00048         #endif //#ifndef __SPU__
00049 
00050         btVector3 localGetSupportVertexWithoutMarginNonVirtual (const btVector3& vec) const;
00051         btVector3 localGetSupportVertexNonVirtual (const btVector3& vec) const;
00052         btScalar getMarginNonVirtual () const;
00053         void getAabbNonVirtual (const btTransform& t, btVector3& aabbMin, btVector3& aabbMax) const;
00054 
00055         virtual void project(const btTransform& trans, const btVector3& dir, float& min, float& max) const;
00056 
00057         
00058         //notice that the vectors should be unit length
00059         virtual void    batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const= 0;
00060 
00062         void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const =0;
00063 
00064         virtual void getAabbSlow(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const =0;
00065 
00066         virtual void    setLocalScaling(const btVector3& scaling) =0;
00067         virtual const btVector3& getLocalScaling() const =0;
00068 
00069         virtual void    setMargin(btScalar margin)=0;
00070 
00071         virtual btScalar        getMargin() const=0;
00072 
00073         virtual int             getNumPreferredPenetrationDirections() const=0;
00074         
00075         virtual void    getPreferredPenetrationDirection(int index, btVector3& penetrationVector) const=0;
00076 
00077 
00078         
00079         
00080 };
00081 
00082 
00083 
00084 #endif //BT_CONVEX_SHAPE_INTERFACE1
 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