16 #ifndef BT_CONVEX_INTERNAL_SHAPE_H 17 #define BT_CONVEX_INTERNAL_SHAPE_H 58 return m_implicitShapeDimensions;
67 m_implicitShapeDimensions = dimensions;
72 btScalar safeMargin = defaultMarginMultiplier*minDimension;
73 if (safeMargin < getMargin())
75 setMargin(safeMargin);
84 setSafeMargin(minDimension, defaultMarginMultiplier);
90 getAabbSlow(t,aabbMin,aabbMax);
98 virtual void setLocalScaling(
const btVector3& scaling);
101 return m_localScaling;
106 return m_localScaling;
111 m_collisionMargin = margin;
115 return m_collisionMargin;
120 return m_collisionMargin;
130 (void)penetrationVector;
135 virtual int calculateSerializeBufferSize()
const;
138 virtual const char* serialize(
void* dataBuffer,
btSerializer* serializer)
const;
175 return "btConvexInternalShapeData";
194 m_isLocalAabbValid =
true;
195 m_localAabbMin = aabbMin;
196 m_localAabbMax = aabbMax;
202 aabbMin = m_localAabbMin;
203 aabbMax = m_localAabbMax;
211 btTransformAabb(m_localAabbMin,m_localAabbMax,margin,trans,aabbMin,aabbMax);
216 virtual void setLocalScaling(
const btVector3& scaling);
220 void recalcLocalAabb();
224 #endif //BT_CONVEX_INTERNAL_SHAPE_H void setSafeMargin(const btVector3 &halfExtents, btScalar defaultMarginMultiplier=0.1f)
void setCachedLocalAabb(const btVector3 &aabbMin, const btVector3 &aabbMax)
btScalar m_collisionMargin
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()
The btConvexInternalShape is an internal base class, shared by most convex shape implementations.
virtual int calculateSerializeBufferSize() const
#define SIMD_FORCE_INLINE
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64 ...
void getNonvirtualAabb(const btTransform &trans, btVector3 &aabbMin, btVector3 &aabbMax, btScalar margin) const
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
btVector3 m_implicitShapeDimensions
The btConvexShape is an abstract shape interface, implemented by all convex shapes such as btBoxShape...
void setImplicitShapeDimensions(const btVector3 &dimensions)
warning: use setImplicitShapeDimensions with care changing a collision shape while the body is in the...
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
int minAxis() const
Return the axis with the smallest value Note return values are 0,1,2 for x, y, or z...
virtual void setMargin(btScalar margin)
btScalar getMarginNV() const
virtual btScalar getMargin() const
btVector3FloatData m_localScaling
btConvexInternalAabbCachingShape adds local aabb caching for convex shapes, to avoid expensive boundi...
btCollisionShapeData m_collisionShapeData
btVector3FloatData m_implicitShapeDimensions
btVector3 can be used to represent 3D points and vectors.
#define ATTRIBUTE_ALIGNED16(a)
void getCachedLocalAabb(btVector3 &aabbMin, btVector3 &aabbMax) const
void setSafeMargin(btScalar minDimension, btScalar defaultMarginMultiplier=0.1f)
#define BT_DECLARE_ALIGNED_ALLOCATOR()
const btVector3 & getLocalScalingNV() const
virtual void getPreferredPenetrationDirection(int index, btVector3 &penetrationVector) const
void btTransformAabb(const btVector3 &halfExtents, btScalar margin, const btTransform &t, btVector3 &aabbMinOut, btVector3 &aabbMaxOut)
const btVector3 & getImplicitShapeDimensions() const
virtual const btVector3 & getLocalScaling() const
virtual int getNumPreferredPenetrationDirections() const
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64 ...
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...