15 : m_localScaling(1, 1, 1),
50 btTransformAabb(localAabbMin, localAabbMax, margin, t, aabbMin, aabbMax);
67 return "btSdfCollisionShape";
91 normal.
setValue(grad[0], grad[1], grad[2]);
void btTransformAabb(const btVector3 &halfExtents, btScalar margin, const btTransform &t, btVector3 &aabbMinOut, btVector3 &aabbMaxOut)
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
#define ATTRIBUTE_ALIGNED16(a)
bool initializeSDF(const char *sdfData, int sizeInBytes)
bool queryPoint(const btVector3 &ptInSDF, btScalar &distOut, btVector3 &normal)
virtual ~btSdfCollisionShape()
virtual const char * getName() const
struct btSdfCollisionShapeInternalData * m_data
virtual void processAllTriangles(btTriangleCallback *callback, const btVector3 &aabbMin, const btVector3 &aabbMax) const
virtual btScalar getMargin() const
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.
virtual void setMargin(btScalar margin)
virtual void setLocalScaling(const btVector3 &scaling)
virtual void calculateLocalInertia(btScalar mass, btVector3 &inertia) const
virtual const btVector3 & getLocalScaling() const
The btTriangleCallback provides a callback for each overlapping triangle when calling processAllTrian...
btVector3 can be used to represent 3D points and vectors.
void setValue(const btScalar &_x, const btScalar &_y, const btScalar &_z)
bool load(const char *data, int size)
bool interpolate(unsigned int field_id, double &dist, btVector3 const &x, btVector3 *gradient) const
BT_DECLARE_ALIGNED_ALLOCATOR()
btSdfCollisionShapeInternalData()