Bullet Collision Detection & Physics Library: btSdfCollisionShape.h Source File

Bullet Collision Detection & Physics Library

btSdfCollisionShape.h
Go to the documentation of this file.
1 #ifndef BT_SDF_COLLISION_SHAPE_H
2 #define BT_SDF_COLLISION_SHAPE_H
3
4 #include "btConcaveShape.h"
5
6 class btSdfCollisionShape : public btConcaveShape
7 {
8 struct btSdfCollisionShapeInternalData* m_data;
9
10 public:
11 btSdfCollisionShape();
12 virtual ~btSdfCollisionShape();
13
14 bool initializeSDF(const char* sdfData, int sizeInBytes);
15
16 virtual void getAabb(const btTransform& t, btVector3& aabbMin, btVector3& aabbMax) const;
17 virtual void setLocalScaling(const btVector3& scaling);
18 virtual const btVector3& getLocalScaling() const;
19 virtual void calculateLocalInertia(btScalar mass, btVector3& inertia) const;
20 virtual const char* getName() const;
21 virtual void setMargin(btScalar margin);
22 virtual btScalar getMargin() const;
23
24 virtual void processAllTriangles(btTriangleCallback* callback, const btVector3& aabbMin, const btVector3& aabbMax) const;
25
26 bool queryPoint(const btVector3& ptInSDF, btScalar& distOut, btVector3& normal);
27 };
28
29 #endif //BT_SDF_COLLISION_SHAPE_H
btSdfCollisionShapeInternalData
Definition: btSdfCollisionShape.cpp:5
btSdfCollisionShape::initializeSDF
bool initializeSDF(const char *sdfData, int sizeInBytes)
Definition: btSdfCollisionShape.cpp:18
btSdfCollisionShape::getAabb
virtual void getAabb(const btTransform &t, btVector3 &aabbMin, btVector3 &aabbMax) const
getAabb returns the axis aligned bounding box in the coordinate frame of the given transform t...
Definition: btSdfCollisionShape.cpp:41
btSdfCollisionShape::getName
virtual const char * getName() const
Definition: btSdfCollisionShape.cpp:62
btConcaveShape.h
btSdfCollisionShape::processAllTriangles
virtual void processAllTriangles(btTriangleCallback *callback, const btVector3 &aabbMin, const btVector3 &aabbMax) const
Definition: btSdfCollisionShape.cpp:75
btTriangleCallback
The btTriangleCallback provides a callback for each overlapping triangle when calling processAllTrian...
Definition: btTriangleCallback.h:23
btSdfCollisionShape::setLocalScaling
virtual void setLocalScaling(const btVector3 &scaling)
Definition: btSdfCollisionShape.cpp:50
btSdfCollisionShape::m_data
struct btSdfCollisionShapeInternalData * m_data
Definition: btSdfCollisionShape.h:8
btSdfCollisionShape::setMargin
virtual void setMargin(btScalar margin)
Definition: btSdfCollisionShape.cpp:66
btVector3
btVector3 can be used to represent 3D points and vectors.
Definition: btVector3.h:80
btSdfCollisionShape::getMargin
virtual btScalar getMargin() const
Definition: btSdfCollisionShape.cpp:70
btTransform
The btTransform class supports rigid transforms with only translation and rotation and no scaling/she...
Definition: btTransform.h:28
btSdfCollisionShape::queryPoint
bool queryPoint(const btVector3 &ptInSDF, btScalar &distOut, btVector3 &normal)
Definition: btSdfCollisionShape.cpp:80
btSdfCollisionShape::~btSdfCollisionShape
virtual ~btSdfCollisionShape()
Definition: btSdfCollisionShape.cpp:36
btSdfCollisionShape::btSdfCollisionShape
btSdfCollisionShape()
Definition: btSdfCollisionShape.cpp:23
btConcaveShape
The btConcaveShape class provides an interface for non-moving (static) concave shapes.
Definition: btConcaveShape.h:37
btSdfCollisionShape::getLocalScaling
virtual const btVector3 & getLocalScaling() const
Definition: btSdfCollisionShape.cpp:54
btSdfCollisionShape
Definition: btSdfCollisionShape.h:6
btSdfCollisionShape::calculateLocalInertia
virtual void calculateLocalInertia(btScalar mass, btVector3 &inertia) const
Definition: btSdfCollisionShape.cpp:58
btScalar
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
Definition: btScalar.h:294