Bullet Collision Detection & Physics Library
|
Go to the documentation of this file.
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";
208 #endif //BT_CONVEX_INTERNAL_SHAPE_H
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
virtual int calculateSerializeBufferSize() const
btScalar m_collisionMargin
btConvexInternalAabbCachingShape adds local aabb caching for convex shapes, to avoid expensive boundi...
The btConvexInternalShape is an internal base class, shared by most convex shape implementations.
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
void getNonvirtualAabb(const btTransform &trans, btVector3 &aabbMin, btVector3 &aabbMax, btScalar margin) const
const btVector3 & getLocalScalingNV() const
void setImplicitShapeDimensions(const btVector3 &dimensions)
warning: use setImplicitShapeDimensions with care changing a collision shape while the body is in the...
const btVector3 & getImplicitShapeDimensions() const
virtual const btVector3 & getLocalScaling() 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()
void setCachedLocalAabb(const btVector3 &aabbMin, const btVector3 &aabbMax)
btVector3FloatData m_localScaling
btCollisionShapeData m_collisionShapeData
void setSafeMargin(const btVector3 &halfExtents, btScalar defaultMarginMultiplier=0.1f)
btVector3 m_implicitShapeDimensions
void getCachedLocalAabb(btVector3 &aabbMin, btVector3 &aabbMax) const
#define BT_DECLARE_ALIGNED_ALLOCATOR()
btVector3 can be used to represent 3D points and vectors.
void setSafeMargin(btScalar minDimension, btScalar defaultMarginMultiplier=0.1f)
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...
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
#define ATTRIBUTE_ALIGNED16(a)
void serializeFloat(struct btVector3FloatData &dataOut) const
virtual btScalar getMargin() const
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
The btConvexShape is an abstract shape interface, implemented by all convex shapes such as btBoxShape...
#define SIMD_FORCE_INLINE
btConvexInternalAabbCachingShape()
void btTransformAabb(const btVector3 &halfExtents, btScalar margin, const btTransform &t, btVector3 &aabbMinOut, btVector3 &aabbMaxOut)
virtual void getPreferredPenetrationDirection(int index, btVector3 &penetrationVector) const
virtual void setMargin(btScalar margin)
virtual int getNumPreferredPenetrationDirections() const
btScalar getMarginNV() const
int minAxis() const
Return the axis with the smallest value Note return values are 0,1,2 for x, y, or z.
virtual void setLocalScaling(const btVector3 &scaling)
btVector3FloatData m_implicitShapeDimensions
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)