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";
224 #endif //BT_CONVEX_INTERNAL_SHAPE_H
const btVector3 & getLocalScalingNV() const
void setSafeMargin(const btVector3 &halfExtents, btScalar defaultMarginMultiplier=0.1f)
void setCachedLocalAabb(const btVector3 &aabbMin, const btVector3 &aabbMax)
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...
btScalar m_collisionMargin
virtual int calculateSerializeBufferSize() const
virtual ~btConvexInternalShape()
The btConvexInternalShape is an internal base class, shared by most convex shape implementations.
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
#define SIMD_FORCE_INLINE
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64 ...
virtual btScalar getMargin() const
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...
void getCachedLocalAabb(btVector3 &aabbMin, btVector3 &aabbMax) const
virtual void setMargin(btScalar margin)
void getNonvirtualAabb(const btTransform &trans, btVector3 &aabbMin, btVector3 &aabbMax, btScalar margin) const
btVector3FloatData m_localScaling
btConvexInternalAabbCachingShape adds local aabb caching for convex shapes, to avoid expensive boundi...
btCollisionShapeData m_collisionShapeData
btVector3FloatData m_implicitShapeDimensions
void serializeFloat(struct btVector3FloatData &dataOut) const
btVector3 can be used to represent 3D points and vectors.
btConvexInternalAabbCachingShape()
#define ATTRIBUTE_ALIGNED16(a)
btScalar getMarginNV() const
void setSafeMargin(btScalar minDimension, btScalar defaultMarginMultiplier=0.1f)
virtual int getNumPreferredPenetrationDirections() const
const btVector3 & getImplicitShapeDimensions() const
virtual void setLocalScaling(const btVector3 &scaling)
#define BT_DECLARE_ALIGNED_ALLOCATOR()
int minAxis() const
Return the axis with the smallest value Note return values are 0,1,2 for x, y, or z...
virtual const btVector3 & getLocalScaling() const
virtual void getPreferredPenetrationDirection(int index, btVector3 &penetrationVector) const
void btTransformAabb(const btVector3 &halfExtents, btScalar margin, const btTransform &t, btVector3 &aabbMinOut, btVector3 &aabbMaxOut)
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...
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
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...