Blender  V3.3
Classes | Functions | Variables
btConvexInternalShape.h File Reference
#include "btConvexShape.h"
#include "LinearMath/btAabbUtil2.h"

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 More...
 
virtual void getAabbSlow (const btTransform &t, btVector3 &aabbMin, btVector3 &aabbMax) const
 
virtual void setLocalScaling (const btVector3 &scaling)
 in case we receive negative scaling More...
 
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) More...
 

Variables

btConvexInternalShape __pad0__
 
btVector3 m_implicitShapeDimensions
 
btScalar m_collisionMargin
 
btScalar m_padding
 

Function Documentation

◆ BT_DECLARE_ALIGNED_ALLOCATOR()

BT_DECLARE_ALIGNED_ALLOCATOR ( )

◆ btConvexInternalShape()

btConvexInternalShape::btConvexInternalShape ( )

Definition at line 18 of file btConvexInternalShape.cpp.

◆ 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

getAabb returns the axis aligned bounding box in the coordinate frame of the given transform t.

Definition at line 84 of file btConvexInternalShape.h.

References getAabbSlow(), and t.

◆ getAabbSlow()

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

Referenced by getAabb().

◆ getImplicitShapeDimensions()

const btVector3& getImplicitShapeDimensions ( ) const

Definition at line 52 of file btConvexInternalShape.h.

References m_implicitShapeDimensions.

◆ getLocalScaling()

virtual const btVector3& getLocalScaling ( ) const
virtual

Definition at line 92 of file btConvexInternalShape.h.

References m_localScaling.

◆ getLocalScalingNV()

const btVector3& getLocalScalingNV ( ) const

Definition at line 97 of file btConvexInternalShape.h.

References m_localScaling.

◆ getMargin()

virtual btScalar getMargin ( ) const
virtual

Definition at line 106 of file btConvexInternalShape.h.

References m_collisionMargin.

Referenced by setSafeMargin().

◆ getMarginNV()

btScalar getMarginNV ( ) const

Definition at line 111 of file btConvexInternalShape.h.

References m_collisionMargin.

◆ getNumPreferredPenetrationDirections()

virtual int getNumPreferredPenetrationDirections ( ) const
virtual

Definition at line 116 of file btConvexInternalShape.h.

◆ getPreferredPenetrationDirection()

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

Definition at line 121 of file btConvexInternalShape.h.

References btAssert, and void.

◆ localGetSupportingVertex()

virtual btVector3 localGetSupportingVertex ( const btVector3 &  vec) const
virtual

Definition at line 51 of file btBox2dShape.h.

◆ serialize()

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

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

◆ 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 m_implicitShapeDimensions.

◆ setLocalScaling()

virtual void setLocalScaling ( const btVector3 &  scaling)
virtual

in case we receive negative scaling

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.

Referenced by setSafeMargin().

◆ setSafeMargin() [1/2]

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

Definition at line 66 of file btConvexInternalShape.h.

References getMargin(), and setMargin().

Referenced by btBox2dShape(), btBoxShape(), btCylinderShape(), and setSafeMargin().

◆ setSafeMargin() [2/2]

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

Definition at line 74 of file btConvexInternalShape.h.

References setSafeMargin().

◆ ~btConvexInternalShape()

virtual ~btConvexInternalShape ( )
virtual

Definition at line 46 of file btConvexInternalShape.h.

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.

Referenced by getMargin(), getMarginNV(), and setMargin().

◆ m_implicitShapeDimensions

btVector3 m_implicitShapeDimensions

◆ m_padding

btScalar m_padding

Definition at line 39 of file btConvexInternalShape.h.