~ubuntu-branches/ubuntu/lucid/blender/lucid

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Chris Coulson
  • Date: 2009-08-06 22:32:19 UTC
  • mfrom: (1.2.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20090806223219-8z4eej1u8levu4pz
Tags: 2.49a+dfsg-0ubuntu1
* Merge from debian unstable, remaining changes:
  - debian/control: Build-depend on python-2.6 rather than python-2.5.
  - debian/misc/*.desktop: Add Spanish translation to .desktop 
    files.
  - debian/pyversions: 2.6.
  - debian/rules: Clean *.o of source/blender/python/api2_2x/
* New upstream release (LP: #382153).
* Refreshed patches:
  - 01_sanitize_sys.patch
  - 02_tmp_in_HOME
  - 10_use_systemwide_ftgl
  - 70_portability_platform_detection
* Removed patches merged upstream:
  - 30_fix_python_syntax_warning
  - 90_ubuntu_ffmpeg_52_changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
#include "LinearMath/btTransform.h"
20
20
#include "LinearMath/btVector3.h"
21
21
#include "LinearMath/btMatrix3x3.h"
22
 
#include "LinearMath/btPoint3.h"
23
22
#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" //for the shape types
24
23
 
25
24
///The btCollisionShape class provides an interface for collision shapes that can be shared among btCollisionObjects.
26
25
class btCollisionShape
27
26
{
28
 
 
 
27
protected:
 
28
        int m_shapeType;
29
29
        void* m_userPointer;
30
30
 
31
31
public:
32
32
 
33
 
        btCollisionShape() : m_userPointer(0)
 
33
        btCollisionShape() : m_shapeType (INVALID_SHAPE_PROXYTYPE), m_userPointer(0)
34
34
        {
35
35
        }
 
36
 
36
37
        virtual ~btCollisionShape()
37
38
        {
38
39
        }
45
46
        ///getAngularMotionDisc returns the maximus radius needed for Conservative Advancement to handle time-of-impact with rotations.
46
47
        virtual btScalar        getAngularMotionDisc() const;
47
48
 
 
49
        virtual btScalar        getContactBreakingThreshold() const;
 
50
 
48
51
 
49
52
        ///calculateTemporalAabb calculates the enclosing aabb for the moving object over interval [0..timeStep)
50
53
        ///result is conservative
76
79
                return btBroadphaseProxy::isInfinite(getShapeType());
77
80
        }
78
81
 
79
 
        virtual int             getShapeType() const=0;
 
82
        
80
83
        virtual void    setLocalScaling(const btVector3& scaling) =0;
81
84
        virtual const btVector3& getLocalScaling() const =0;
82
85
        virtual void    calculateLocalInertia(btScalar mass,btVector3& inertia) const = 0;
87
90
#endif //__SPU__
88
91
 
89
92
        
90
 
 
 
93
        int             getShapeType() const { return m_shapeType; }
91
94
        virtual void    setMargin(btScalar margin) = 0;
92
95
        virtual btScalar        getMargin() const = 0;
93
96
 
94
97
        
95
98
        ///optional user data pointer
96
 
        void    setUserPointer(void* userPtr)
 
99
        void    setUserPointer(void*  userPtr)
97
100
        {
98
101
                m_userPointer = userPtr;
99
102
        }