~ubuntu-branches/ubuntu/maverick/blender/maverick

« back to all changes in this revision

Viewing changes to extern/bullet2/src/BulletCollision/CollisionShapes/btConvexHullShape.h

  • Committer: Bazaar Package Importer
  • Author(s): Khashayar Naderehvandi, Khashayar Naderehvandi, Alessio Treglia
  • Date: 2009-01-22 16:53:59 UTC
  • mfrom: (14.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20090122165359-v0996tn7fbit64ni
Tags: 2.48a+dfsg-1ubuntu1
[ Khashayar Naderehvandi ]
* Merge from debian experimental (LP: #320045), Ubuntu remaining changes:
  - Add patch correcting header file locations.
  - Add libvorbis-dev and libgsm1-dev to Build-Depends.
  - Use avcodec_decode_audio2() in source/blender/src/hddaudio.c

[ Alessio Treglia ]
* Add missing previous changelog entries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
#define CONVEX_HULL_SHAPE_H
18
18
 
19
19
#include "btPolyhedralConvexShape.h"
20
 
#include "../BroadphaseCollision/btBroadphaseProxy.h" // for the types
21
 
#include "../../LinearMath/btAlignedObjectArray.h"
 
20
#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types
 
21
#include "LinearMath/btAlignedObjectArray.h"
22
22
 
23
 
///ConvexHullShape implements an implicit (getSupportingVertex) Convex Hull of a Point Cloud (vertices)
24
 
///No connectivity is needed. localGetSupportingVertex iterates linearly though all vertices.
25
 
///on modern hardware, due to cache coherency this isn't that bad. Complex algorithms tend to trash the cash.
26
 
///(memory is much slower then the cpu)
 
23
///The btConvexHullShape implements an implicit convex hull of an array of vertices.
 
24
///Bullet provides a general and fast collision detector for convex shapes based on GJK and EPA using localGetSupportingVertex.
27
25
ATTRIBUTE_ALIGNED16(class) btConvexHullShape : public btPolyhedralConvexShape
28
26
{
29
27
        btAlignedObjectArray<btPoint3>  m_points;
30
28
 
31
29
public:
 
30
        BT_DECLARE_ALIGNED_ALLOCATOR();
32
31
 
33
32
        
34
33
        ///this constructor optionally takes in a pointer to points. Each point is assumed to be 3 consecutive btScalar (x,y,z), the striding defines the number of bytes between each point, in memory.
43
42
                return &m_points[0];
44
43
        }
45
44
 
46
 
        int getNumPoints()
 
45
        const btPoint3* getPoints() const
 
46
        {
 
47
                return &m_points[0];
 
48
        }
 
49
 
 
50
        int getNumPoints() const 
47
51
        {
48
52
                return m_points.size();
49
53
        }
56
60
        virtual int     getShapeType()const { return CONVEX_HULL_SHAPE_PROXYTYPE; }
57
61
 
58
62
        //debugging
59
 
        virtual char*   getName()const {return "Convex";}
 
63
        virtual const char*     getName()const {return "Convex";}
60
64
 
61
65
        
62
66
        virtual int     getNumVertices() const;
67
71
        virtual void getPlane(btVector3& planeNormal,btPoint3& planeSupport,int i ) const;
68
72
        virtual bool isInside(const btPoint3& pt,btScalar tolerance) const;
69
73
 
70
 
 
 
74
        ///in case we receive negative scaling
 
75
        virtual void    setLocalScaling(const btVector3& scaling);
71
76
 
72
77
};
73
78