Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 13, 2008, 11:45:51 PM (17 years ago)
Author:
rgrieder
Message:

Updated to Bullet 2.73 (first part).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/physics/src/bullet/BulletCollision/CollisionShapes/btConvexHullShape.h

    r2192 r2430  
    2525ATTRIBUTE_ALIGNED16(class) btConvexHullShape : public btPolyhedralConvexShape
    2626{
    27         btAlignedObjectArray<btPoint3>  m_points;
     27        btAlignedObjectArray<btVector3> m_unscaledPoints;
    2828
    2929public:
     
    3434        ///It is easier to not pass any points in the constructor, and just add one point at a time, using addPoint.
    3535        ///btConvexHullShape make an internal copy of the points.
    36         btConvexHullShape(const btScalar* points=0,int numPoints=0, int stride=sizeof(btPoint3));
     36        btConvexHullShape(const btScalar* points=0,int numPoints=0, int stride=sizeof(btVector3));
    3737
    38         void addPoint(const btPoint3& point);
     38        void addPoint(const btVector3& point);
    3939
    40         btPoint3* getPoints()
     40       
     41        btVector3* getUnscaledPoints()
    4142        {
    42                 return &m_points[0];
     43                return &m_unscaledPoints[0];
    4344        }
    4445
    45         const btPoint3* getPoints() const
     46        const btVector3* getUnscaledPoints() const
    4647        {
    47                 return &m_points[0];
     48                return &m_unscaledPoints[0];
    4849        }
    4950
    50         int getNumPoints() const
     51        ///getPoints is obsolete, please use getUnscaledPoints
     52        const btVector3* getPoints() const
    5153        {
    52                 return m_points.size();
     54                return getUnscaledPoints();
     55        }
     56
     57       
     58
     59
     60        SIMD_FORCE_INLINE       btVector3 getScaledPoint(int i) const
     61        {
     62                return m_unscaledPoints[i] * m_localScaling;
     63        }
     64
     65        SIMD_FORCE_INLINE       int getNumPoints() const
     66        {
     67                return m_unscaledPoints.size();
    5368        }
    5469
     
    6580        virtual int     getNumVertices() const;
    6681        virtual int getNumEdges() const;
    67         virtual void getEdge(int i,btPoint3& pa,btPoint3& pb) const;
    68         virtual void getVertex(int i,btPoint3& vtx) const;
     82        virtual void getEdge(int i,btVector3& pa,btVector3& pb) const;
     83        virtual void getVertex(int i,btVector3& vtx) const;
    6984        virtual int     getNumPlanes() const;
    70         virtual void getPlane(btVector3& planeNormal,btPoint3& planeSupport,int i ) const;
    71         virtual bool isInside(const btPoint3& pt,btScalar tolerance) const;
     85        virtual void getPlane(btVector3& planeNormal,btVector3& planeSupport,int i ) const;
     86        virtual bool isInside(const btVector3& pt,btScalar tolerance) const;
    7287
    7388        ///in case we receive negative scaling
Note: See TracChangeset for help on using the changeset viewer.