16#ifndef BT_CONVEX_INTERNAL_SHAPE_H
17#define BT_CONVEX_INTERNAL_SHAPE_H
54 return m_implicitShapeDimensions;
63 m_implicitShapeDimensions = dimensions;
68 btScalar safeMargin = defaultMarginMultiplier * minDimension;
69 if (safeMargin < getMargin())
71 setMargin(safeMargin);
80 setSafeMargin(minDimension, defaultMarginMultiplier);
86 getAabbSlow(t, aabbMin, aabbMax);
91 virtual void setLocalScaling(
const btVector3& scaling);
94 return m_localScaling;
99 return m_localScaling;
104 m_collisionMargin = margin;
108 return m_collisionMargin;
113 return m_collisionMargin;
123 (void)penetrationVector;
128 virtual int calculateSerializeBufferSize()
const;
131 virtual const char* serialize(
void* dataBuffer,
btSerializer* serializer)
const;
166 return "btConvexInternalShapeData";
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)
#define SIMD_FORCE_INLINE
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
btConvexInternalAabbCachingShape adds local aabb caching for convex shapes, to avoid expensive boundi...
void getNonvirtualAabb(const btTransform &trans, btVector3 &aabbMin, btVector3 &aabbMax, btScalar margin) const
void getCachedLocalAabb(btVector3 &aabbMin, btVector3 &aabbMax) const
btConvexInternalAabbCachingShape()
virtual void setLocalScaling(const btVector3 &scaling)
virtual void getAabb(const btTransform &t, btVector3 &aabbMin, btVector3 &aabbMax) const
getAabb's default implementation is brute force, expected derived classes to implement a fast dedicat...
void setCachedLocalAabb(const btVector3 &aabbMin, const btVector3 &aabbMax)
The btConvexInternalShape is an internal base class, shared by most convex shape implementations.
virtual void setMargin(btScalar margin)
btScalar m_collisionMargin
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
const btVector3 & getLocalScalingNV() const
virtual int calculateSerializeBufferSize() const
BT_DECLARE_ALIGNED_ALLOCATOR()
btVector3 m_implicitShapeDimensions
const btVector3 & getImplicitShapeDimensions() const
void setSafeMargin(const btVector3 &halfExtents, btScalar defaultMarginMultiplier=0.1f)
virtual const btVector3 & getLocalScaling() const
void setImplicitShapeDimensions(const btVector3 &dimensions)
warning: use setImplicitShapeDimensions with care changing a collision shape while the body is in the...
btScalar getMarginNV() const
void setSafeMargin(btScalar minDimension, btScalar defaultMarginMultiplier=0.1f)
virtual void getPreferredPenetrationDirection(int index, btVector3 &penetrationVector) const
void getAabb(const btTransform &t, btVector3 &aabbMin, btVector3 &aabbMax) const
getAabb's default implementation is brute force, expected derived classes to implement a fast dedicat...
virtual ~btConvexInternalShape()
virtual btScalar getMargin() const
virtual int getNumPreferredPenetrationDirections() const
The btConvexShape is an abstract shape interface, implemented by all convex shapes such as btBoxShape...
btVector3 can be used to represent 3D points and vectors.
int minAxis() const
Return the axis with the smallest value Note return values are 0,1,2 for x, y, or z.
void serializeFloat(struct btVector3FloatData &dataOut) const
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
btVector3FloatData m_implicitShapeDimensions
btVector3FloatData m_localScaling
btCollisionShapeData m_collisionShapeData