Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 27, 2011, 7:43:24 AM (14 years ago)
Author:
rgrieder
Message:

Updated Bullet Physics Engine from v2.74 to v2.77

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/kicklib/src/external/bullet/BulletCollision/CollisionShapes/btPolyhedralConvexShape.h

    r5781 r7983  
    11/*
    22Bullet Continuous Collision Detection and Physics Library
    3 Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
     3Copyright (c) 2003-2009 Erwin Coumans  http://bulletphysics.org
    44
    55This software is provided 'as-is', without any express or implied warranty.
     
    1818
    1919#include "LinearMath/btMatrix3x3.h"
    20 #include "LinearMath/btAabbUtil2.h"
    2120#include "btConvexInternalShape.h"
    2221
     
    2726
    2827protected:
    29         btVector3       m_localAabbMin;
    30         btVector3       m_localAabbMax;
    31         bool            m_isLocalAabbValid;
    32 
     28       
    3329public:
    3430
     
    3935        virtual btVector3       localGetSupportingVertexWithoutMargin(const btVector3& vec)const;
    4036        virtual void    batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const;
    41 
    4237       
    4338        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 ;
    4448
     49        virtual bool isInside(const btVector3& pt,btScalar tolerance) const = 0;
     50       
     51};
     52
     53
     54///The btPolyhedralConvexAabbCachingShape adds aabb caching to the btPolyhedralConvexShape
     55class btPolyhedralConvexAabbCachingShape : public btPolyhedralConvexShape
     56{
     57
     58        btVector3       m_localAabbMin;
     59        btVector3       m_localAabbMax;
     60        bool            m_isLocalAabbValid;
     61               
     62protected:
    4563
    4664        void setCachedLocalAabb (const btVector3& aabbMin, const btVector3& aabbMax)
     
    5876        }
    5977
     78public:
     79
     80        btPolyhedralConvexAabbCachingShape();
     81       
    6082        inline void getNonvirtualAabb(const btTransform& trans,btVector3& aabbMin,btVector3& aabbMax, btScalar margin) const
    6183        {
     
    6688        }
    6789
    68        
     90        virtual void    setLocalScaling(const btVector3& scaling);
     91
    6992        virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const;
    7093
    71         virtual void    setLocalScaling(const btVector3& scaling);
    72 
    7394        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.cpp
    86         class   Hull*   m_optionalHull;
    8795
    8896};
Note: See TracChangeset for help on using the changeset viewer.