~ubuntu-branches/ubuntu/trusty/blender/trusty-proposed

« back to all changes in this revision

Viewing changes to extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObjectWrapper.h

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2013-08-14 10:43:49 UTC
  • mfrom: (14.2.19 sid)
  • Revision ID: package-import@ubuntu.com-20130814104349-t1d5mtwkphp12dyj
Tags: 2.68a-3
* Upload to unstable
* debian/: python3.3 Depends simplified
  - debian/control: python3.3 Depends dropped
    for blender-data package
  - 0001-blender_thumbnailer.patch refreshed
* debian/control: libavcodec b-dep versioning dropped

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef BT_COLLISION_OBJECT_WRAPPER_H
 
2
#define BT_COLLISION_OBJECT_WRAPPER_H
 
3
 
 
4
///btCollisionObjectWrapperis an internal data structure. 
 
5
///Most users can ignore this and use btCollisionObject and btCollisionShape instead
 
6
class btCollisionShape;
 
7
class btCollisionObject;
 
8
class btTransform;
 
9
#include "LinearMath/btScalar.h" // for SIMD_FORCE_INLINE definition
 
10
 
 
11
#define BT_DECLARE_STACK_ONLY_OBJECT \
 
12
        private: \
 
13
                void* operator new(size_t size); \
 
14
                void operator delete(void*);
 
15
 
 
16
struct btCollisionObjectWrapper;
 
17
struct btCollisionObjectWrapper
 
18
{
 
19
BT_DECLARE_STACK_ONLY_OBJECT
 
20
 
 
21
private:
 
22
        btCollisionObjectWrapper(const btCollisionObjectWrapper&); // not implemented. Not allowed.
 
23
        btCollisionObjectWrapper* operator=(const btCollisionObjectWrapper&);
 
24
 
 
25
public:
 
26
        const btCollisionObjectWrapper* m_parent;
 
27
        const btCollisionShape* m_shape;
 
28
        const btCollisionObject* m_collisionObject;
 
29
        const btTransform& m_worldTransform;
 
30
        int             m_partId;
 
31
        int             m_index;
 
32
 
 
33
        btCollisionObjectWrapper(const btCollisionObjectWrapper* parent, const btCollisionShape* shape, const btCollisionObject* collisionObject, const btTransform& worldTransform, int partId, int index)
 
34
        : m_parent(parent), m_shape(shape), m_collisionObject(collisionObject), m_worldTransform(worldTransform),
 
35
        m_partId(partId), m_index(index)
 
36
        {}
 
37
 
 
38
        SIMD_FORCE_INLINE const btTransform& getWorldTransform() const { return m_worldTransform; }
 
39
        SIMD_FORCE_INLINE const btCollisionObject* getCollisionObject() const { return m_collisionObject; }
 
40
        SIMD_FORCE_INLINE const btCollisionShape* getCollisionShape() const { return m_shape; }
 
41
};
 
42
 
 
43
#endif //BT_COLLISION_OBJECT_WRAPPER_H