Blender  V3.3
Classes | Functions | Variables
btConvexHullShape.h File Reference
#include "btPolyhedralConvexShape.h"
#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
#include "LinearMath/btAlignedObjectArray.h"

Go to the source code of this file.

Classes

struct  btConvexHullShapeData
 do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64 More...
 

Functions

 BT_DECLARE_ALIGNED_ALLOCATOR ()
 
 btConvexHullShape (const btScalar *points=0, int numPoints=0, int stride=sizeof(btVector3))
 
void addPoint (const btVector3 &point, bool recalculateLocalAabb=true)
 
btVector3getUnscaledPoints ()
 
const btVector3getPoints () const
 getPoints is obsolete, please use getUnscaledPoints More...
 
void optimizeConvexHull ()
 
SIMD_FORCE_INLINE btVector3 getScaledPoint (int i) const
 
SIMD_FORCE_INLINE int getNumPoints () const
 
virtual btVector3 localGetSupportingVertex (const btVector3 &vec) const
 
virtual btVector3 localGetSupportingVertexWithoutMargin (const btVector3 &vec) const
 btConvexShape Interface More...
 
virtual void batchedUnitVectorGetSupportingVertexWithoutMargin (const btVector3 *vectors, btVector3 *supportVerticesOut, int numVectors) const
 
virtual void project (const btTransform &trans, const btVector3 &dir, btScalar &minProj, btScalar &maxProj, btVector3 &witnesPtMin, btVector3 &witnesPtMax) const
 
virtual const char * getName () const
 
virtual int getNumVertices () const
 
virtual int getNumEdges () const
 
virtual void getEdge (int i, btVector3 &pa, btVector3 &pb) const
 
virtual void getVertex (int i, btVector3 &vtx) const
 
virtual int getNumPlanes () const
 
virtual void getPlane (btVector3 &planeNormal, btVector3 &planeSupport, int i) const
 
virtual bool isInside (const btVector3 &pt, btScalar tolerance) const
 
virtual void setLocalScaling (const btVector3 &scaling)
 in case we receive negative scaling More...
 
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

btConvexHullShape __pad0__
 

Function Documentation

◆ addPoint()

void btConvexHullShape::addPoint ( const btVector3 point,
bool  recalculateLocalAabb = true 
)

Definition at line 51 of file btConvexHullShape.cpp.

References point, recalcLocalAabb(), and recalculateLocalAabb().

◆ batchedUnitVectorGetSupportingVertexWithoutMargin()

virtual void batchedUnitVectorGetSupportingVertexWithoutMargin ( const btVector3 vectors,
btVector3 supportVerticesOut,
int  numVectors 
) const
virtual

Definition at line 71 of file btBox2dShape.h.

◆ BT_DECLARE_ALIGNED_ALLOCATOR()

BT_DECLARE_ALIGNED_ALLOCATOR ( )

◆ btConvexHullShape()

btConvexHullShape::btConvexHullShape ( const btScalar points = 0,
int  numPoints = 0,
int  stride = sizeof(btVector3) 
)

this constructor optionally takes in a pointer to points. Each point is assumed to be 3 consecutive btScalar (x,y,z), the striding defines the number of bytes between each point, in memory. It is easier to not pass any points in the constructor, and just add one point at a time, using addPoint. btConvexHullShape make an internal copy of the points.

Definition at line 28 of file btConvexHullShape.cpp.

References btVector3, CONVEX_HULL_SHAPE_PROXYTYPE, point, recalcLocalAabb(), and stride.

Referenced by btCollisionWorldImporter::convertCollisionShape(), btCollisionWorldImporter::createConvexHullShape(), localGetSupportVertexWithoutMarginNonVirtual(), btSoftBodyTriangleCallback::processTriangle(), and RB_shape_new_convex_hull().

◆ calculateSerializeBufferSize()

virtual int calculateSerializeBufferSize ( ) const
virtual

◆ getEdge()

virtual void getEdge ( int  i,
btVector3 pa,
btVector3 pb 
) const
virtual

Definition at line 218 of file btBox2dShape.h.

◆ getName()

virtual const char* getName ( ) const
virtual

Definition at line 75 of file btConvexHullShape.h.

◆ getNumEdges()

virtual int getNumEdges ( ) const
virtual

Definition at line 174 of file btBox2dShape.h.

◆ getNumPlanes()

virtual int getNumPlanes ( ) const
virtual

Definition at line 169 of file btBox2dShape.h.

◆ getNumPoints()

SIMD_FORCE_INLINE int getNumPoints ( ) const

Definition at line 63 of file btConvexHullShape.h.

References btAlignedObjectArray< T >::size().

◆ getNumVertices()

virtual int getNumVertices ( ) const
virtual

Definition at line 140 of file btBox2dShape.h.

◆ getPlane()

virtual void getPlane ( btVector3 planeNormal,
btVector3 planeSupport,
int  i 
) const
virtual

Definition at line 155 of file btBox2dShape.h.

◆ getPoints()

const btVector3* getPoints ( ) const

getPoints is obsolete, please use getUnscaledPoints

Definition at line 51 of file btConvexHullShape.h.

References getUnscaledPoints().

◆ getScaledPoint()

SIMD_FORCE_INLINE btVector3 getScaledPoint ( int  i) const

Definition at line 58 of file btConvexHullShape.h.

References m_localScaling.

◆ getUnscaledPoints()

SIMD_FORCE_INLINE const btVector3 * getUnscaledPoints ( )

Definition at line 40 of file btConvexHullShape.h.

Referenced by getPoints().

◆ getVertex()

virtual void getVertex ( int  i,
btVector3 vtx 
) const
virtual

Definition at line 179 of file btBox2dShape.h.

◆ isInside()

virtual bool isInside ( const btVector3 pt,
btScalar  tolerance 
) const
virtual

Definition at line 284 of file btBox2dShape.h.

◆ localGetSupportingVertex()

virtual btVector3 localGetSupportingVertex ( const btVector3 vec) const
virtual

Definition at line 51 of file btBox2dShape.h.

◆ localGetSupportingVertexWithoutMargin()

virtual btVector3 localGetSupportingVertexWithoutMargin ( const btVector3 vec) const
virtual

btConvexShape Interface

Definition at line 62 of file btBox2dShape.h.

◆ optimizeConvexHull()

void btConvexHullShape::optimizeConvexHull ( )

◆ project()

virtual void project ( const btTransform trans,
const btVector3 dir,
btScalar minProj,
btScalar maxProj,
btVector3 witnesPtMin,
btVector3 witnesPtMax 
) const
virtual

◆ serialize()

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

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

◆ setLocalScaling()

virtual void setLocalScaling ( const btVector3 scaling)
virtual

in case we receive negative scaling

Definition at line 120 of file btBox2dShape.h.

Variable Documentation

◆ __pad0__

The btConvexHullShape implements an implicit convex hull of an array of vertices. Bullet provides a general and fast collision detector for convex shapes based on GJK and EPA using localGetSupportingVertex.

Definition at line 26 of file btConvexHullShape.h.