Blender V4.5
btConvexInternalShape.h File Reference

Go to the source code of this file.

Classes

struct  btConvexInternalShapeData
 do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64 More...
class  btConvexInternalAabbCachingShape
 btConvexInternalAabbCachingShape adds local aabb caching for convex shapes, to avoid expensive bounding box calculations More...

Functions

 btConvexInternalShape ()
 BT_DECLARE_ALIGNED_ALLOCATOR ()
virtual ~btConvexInternalShape ()
virtual btVector3 localGetSupportingVertex (const btVector3 &vec) const
const btVector3 & getImplicitShapeDimensions () const
void setImplicitShapeDimensions (const btVector3 &dimensions)
void setSafeMargin (btScalar minDimension, btScalar defaultMarginMultiplier=0.1f)
void setSafeMargin (const btVector3 &halfExtents, btScalar defaultMarginMultiplier=0.1f)
void getAabb (const btTransform &t, btVector3 &aabbMin, btVector3 &aabbMax) const
 getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version
virtual void getAabbSlow (const btTransform &t, btVector3 &aabbMin, btVector3 &aabbMax) const
virtual void setLocalScaling (const btVector3 &scaling)
virtual const btVector3 & getLocalScaling () const
const btVector3 & getLocalScalingNV () const
virtual void setMargin (btScalar margin)
virtual btScalar getMargin () const
btScalar getMarginNV () const
virtual int getNumPreferredPenetrationDirections () const
virtual void getPreferredPenetrationDirection (int index, btVector3 &penetrationVector) const
virtual int calculateSerializeBufferSize () const
virtual const char * serialize (void *dataBuffer, btSerializer *serializer) const
 fills the dataBuffer and returns the struct name (and 0 on failure)

Variables

btConvexInternalShape __pad0__
btVector3 m_implicitShapeDimensions
btScalar m_collisionMargin
btScalar m_padding

Function Documentation

◆ BT_DECLARE_ALIGNED_ALLOCATOR()

BT_DECLARE_ALIGNED_ALLOCATOR ( )

◆ btConvexInternalShape()

◆ calculateSerializeBufferSize()

virtual int calculateSerializeBufferSize ( ) const
virtual

◆ getAabb()

void getAabb ( const btTransform & t,
btVector3 & aabbMin,
btVector3 & aabbMax ) const

getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version

Definition at line 84 of file btConvexInternalShape.h.

References btTransform, btVector3, getAabb(), and getAabbSlow().

◆ getAabbSlow()

virtual void getAabbSlow ( const btTransform & t,
btVector3 & aabbMin,
btVector3 & aabbMax ) const
virtual

◆ getImplicitShapeDimensions()

const btVector3 & getImplicitShapeDimensions ( ) const

◆ getLocalScaling()

virtual const btVector3 & getLocalScaling ( ) const
virtual

Definition at line 92 of file btConvexInternalShape.h.

References btVector3, getLocalScaling(), and m_localScaling.

◆ getLocalScalingNV()

const btVector3 & getLocalScalingNV ( ) const

Definition at line 97 of file btConvexInternalShape.h.

References btVector3, getLocalScalingNV(), and m_localScaling.

Referenced by getLocalScalingNV().

◆ getMargin()

virtual btScalar getMargin ( ) const
virtual

Definition at line 106 of file btConvexInternalShape.h.

References getMargin(), and m_collisionMargin.

Referenced by btConvexInternalAabbCachingShape::getAabb().

◆ getMarginNV()

btScalar getMarginNV ( ) const

Definition at line 111 of file btConvexInternalShape.h.

References getMarginNV(), and m_collisionMargin.

Referenced by getMarginNV().

◆ getNumPreferredPenetrationDirections()

virtual int getNumPreferredPenetrationDirections ( ) const
virtual

Definition at line 116 of file btConvexInternalShape.h.

References getNumPreferredPenetrationDirections().

◆ getPreferredPenetrationDirection()

virtual void getPreferredPenetrationDirection ( int index,
btVector3 & penetrationVector ) const
virtual

Definition at line 121 of file btConvexInternalShape.h.

References btAssert, btVector3, and getPreferredPenetrationDirection().

◆ localGetSupportingVertex()

virtual btVector3 localGetSupportingVertex ( const btVector3 & vec) const
virtual

Definition at line 51 of file btBox2dShape.h.

Referenced by btConvexInternalAabbCachingShape::recalcLocalAabb().

◆ serialize()

virtual const char * serialize ( void * dataBuffer,
btSerializer * serializer ) const
virtual

fills the dataBuffer and returns the struct name (and 0 on failure)

References serialize().

◆ setImplicitShapeDimensions()

void setImplicitShapeDimensions ( const btVector3 & dimensions)

warning: use setImplicitShapeDimensions with care changing a collision shape while the body is in the world is not recommended, it is best to remove the body from the world, then make the change, and re-add it alternatively flush the contact points, see documentation for 'cleanProxyFromPairs'

Definition at line 61 of file btConvexInternalShape.h.

References btVector3, m_implicitShapeDimensions, and setImplicitShapeDimensions().

Referenced by setImplicitShapeDimensions().

◆ setLocalScaling()

virtual void setLocalScaling ( const btVector3 & scaling)
virtual

Definition at line 120 of file btBox2dShape.h.

◆ setMargin()

virtual void setMargin ( btScalar margin)
virtual

Definition at line 102 of file btConvexInternalShape.h.

References m_collisionMargin, and setMargin().

◆ setSafeMargin() [1/2]

void setSafeMargin ( btScalar minDimension,
btScalar defaultMarginMultiplier = 0.1f )

◆ setSafeMargin() [2/2]

void setSafeMargin ( const btVector3 & halfExtents,
btScalar defaultMarginMultiplier = 0.1f )

Definition at line 74 of file btConvexInternalShape.h.

References btVector3, and setSafeMargin().

◆ ~btConvexInternalShape()

virtual ~btConvexInternalShape ( )
virtual

Definition at line 46 of file btConvexInternalShape.h.

References btConvexInternalShape().

Variable Documentation

◆ __pad0__

The btConvexInternalShape is an internal base class, shared by most convex shape implementations. The btConvexInternalShape uses a default collision margin set to CONVEX_DISTANCE_MARGIN. This collision margin used by Gjk and some other algorithms, see also btCollisionMargin.h Note that when creating small shapes (derived from btConvexInternalShape), you need to make sure to set a smaller collision margin, using the 'setMargin' API There is a automatic mechanism 'setSafeMargin' used by btBoxShape and btCylinderShape

Definition at line 29 of file btConvexInternalShape.h.

◆ m_collisionMargin

btScalar m_collisionMargin

Definition at line 37 of file btConvexInternalShape.h.

◆ m_implicitShapeDimensions

◆ m_padding

btScalar m_padding

Definition at line 39 of file btConvexInternalShape.h.