Blender  V3.3
Classes | Functions | Variables
btStridingMeshInterface.h File Reference
#include "LinearMath/btVector3.h"
#include "btTriangleCallback.h"
#include "btConcaveShape.h"

Go to the source code of this file.

Classes

struct  btIntIndexData
 
struct  btShortIntIndexData
 
struct  btShortIntIndexTripletData
 
struct  btCharIndexTripletData
 
struct  btMeshPartData
 do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64 More...
 
struct  btStridingMeshInterfaceData
 do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64 More...
 

Functions

 BT_DECLARE_ALIGNED_ALLOCATOR ()
 
virtual ~btStridingMeshInterface ()
 
virtual void InternalProcessAllTriangles (btInternalTriangleIndexCallback *callback, const btVector3 &aabbMin, const btVector3 &aabbMax) const
 
void calculateAabbBruteForce (btVector3 &aabbMin, btVector3 &aabbMax)
 brute force method to calculate aabb More...
 
virtual void getLockedVertexIndexBase (unsigned char **vertexbase, int &numverts, PHY_ScalarType &type, int &stride, unsigned char **indexbase, int &indexstride, int &numfaces, PHY_ScalarType &indicestype, int subpart=0)=0
 
virtual void getLockedReadOnlyVertexIndexBase (const unsigned char **vertexbase, int &numverts, PHY_ScalarType &type, int &stride, const unsigned char **indexbase, int &indexstride, int &numfaces, PHY_ScalarType &indicestype, int subpart=0) const =0
 
virtual void unLockVertexBase (int subpart)=0
 
virtual void unLockReadOnlyVertexBase (int subpart) const =0
 
virtual int getNumSubParts () const =0
 
virtual void preallocateVertices (int numverts)=0
 
virtual void preallocateIndices (int numindices)=0
 
virtual bool hasPremadeAabb () const
 
virtual void setPremadeAabb (const btVector3 &aabbMin, const btVector3 &aabbMax) const
 
virtual void getPremadeAabb (btVector3 *aabbMin, btVector3 *aabbMax) const
 
const btVector3getScaling () const
 
void setScaling (const btVector3 &scaling)
 
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

 btStridingMeshInterface
 

Function Documentation

◆ BT_DECLARE_ALIGNED_ALLOCATOR()

BT_DECLARE_ALIGNED_ALLOCATOR ( )

◆ calculateAabbBruteForce()

void btStridingMeshInterface::calculateAabbBruteForce ( btVector3 aabbMin,
btVector3 aabbMax 
)

◆ calculateSerializeBufferSize()

virtual int calculateSerializeBufferSize ( ) const
virtual

◆ getLockedReadOnlyVertexIndexBase()

void btTriangleIndexVertexArray::getLockedReadOnlyVertexIndexBase ( const unsigned char **  vertexbase,
int &  numverts,
PHY_ScalarType type,
int &  stride,
const unsigned char **  indexbase,
int &  indexstride,
int &  numfaces,
PHY_ScalarType indicestype,
int  subpart = 0 
) const
pure virtual

Definition at line 57 of file btTriangleIndexVertexArray.cpp.

References btIndexedMesh, mesh, and type.

Referenced by InternalProcessAllTriangles().

◆ getLockedVertexIndexBase()

void btTriangleIndexVertexArray::getLockedVertexIndexBase ( unsigned char **  vertexbase,
int &  numverts,
PHY_ScalarType type,
int &  stride,
unsigned char **  indexbase,
int &  indexstride,
int &  numfaces,
PHY_ScalarType indicestype,
int  subpart = 0 
)
pure virtual

get read and write access to a subpart of a triangle mesh this subpart has a continuous array of vertices and indices in this way the mesh can be handled as chunks of memory with striding very similar to OpenGL vertexarray support make a call to unLockVertexBase when the read and write access is finished

Definition at line 37 of file btTriangleIndexVertexArray.cpp.

References btAssert, btIndexedMesh, getNumSubParts(), mesh, and type.

◆ getNumSubParts()

virtual int getNumSubParts ( ) const
pure virtual

getNumSubParts returns the number of separate subparts each subpart has a continuous array of vertices and indices

Definition at line 105 of file btTriangleIndexVertexArray.h.

References btAlignedObjectArray< T >::size().

Referenced by getLockedMaterialBase(), getLockedVertexIndexBase(), and InternalProcessAllTriangles().

◆ getPremadeAabb()

void btTriangleIndexVertexArray::getPremadeAabb ( btVector3 aabbMin,
btVector3 aabbMax 
) const
virtual

Definition at line 74 of file btStridingMeshInterface.h.

References void.

◆ getScaling()

const btVector3& getScaling ( ) const

Definition at line 80 of file btStridingMeshInterface.h.

Referenced by InternalProcessAllTriangles().

◆ hasPremadeAabb()

bool btTriangleIndexVertexArray::hasPremadeAabb ( ) const
virtual

Definition at line 68 of file btStridingMeshInterface.h.

◆ InternalProcessAllTriangles()

void btStridingMeshInterface::InternalProcessAllTriangles ( btInternalTriangleIndexCallback callback,
const btVector3 aabbMin,
const btVector3 aabbMax 
) const
virtual

if the number of parts is big, the performance might drop due to the innerloop switch on indextype

unlike that developers want to pass in double-precision meshes in single-precision Bullet build so disable this feature by default see patch http://code.google.com/p/bullet/issues/detail?id=213

Definition at line 23 of file btStridingMeshInterface.cpp.

References btAssert, btVector3, callback, getLockedReadOnlyVertexIndexBase(), getNumSubParts(), getScaling(), PHY_DOUBLE, PHY_FLOAT, PHY_INTEGER, PHY_SHORT, PHY_UCHAR, stride, type, unLockReadOnlyVertexBase(), and void.

Referenced by calculateAabbBruteForce().

◆ preallocateIndices()

virtual void preallocateIndices ( int  numindices)
pure virtual

Definition at line 121 of file btTriangleIndexVertexArray.h.

References void.

◆ preallocateVertices()

virtual void preallocateVertices ( int  numverts)
pure virtual

Definition at line 120 of file btTriangleIndexVertexArray.h.

References void.

◆ serialize()

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

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

◆ setPremadeAabb()

void btTriangleIndexVertexArray::setPremadeAabb ( const btVector3 aabbMin,
const btVector3 aabbMax 
) const
virtual

Definition at line 69 of file btStridingMeshInterface.h.

References void.

◆ setScaling()

void setScaling ( const btVector3 scaling)

Definition at line 84 of file btStridingMeshInterface.h.

◆ unLockReadOnlyVertexBase()

virtual void unLockReadOnlyVertexBase ( int  subpart) const
pure virtual

Definition at line 101 of file btTriangleIndexVertexArray.h.

References void.

Referenced by InternalProcessAllTriangles().

◆ unLockVertexBase()

virtual void unLockVertexBase ( int  subpart)
pure virtual

unLockVertexBase finishes the access to a subpart of the triangle mesh make a call to unLockVertexBase when the read and write access (using getLockedVertexIndexBase) is finished

Definition at line 99 of file btTriangleIndexVertexArray.h.

References void.

◆ ~btStridingMeshInterface()

btStridingMeshInterface::~btStridingMeshInterface ( )
virtual

Definition at line 19 of file btStridingMeshInterface.cpp.

Variable Documentation

◆ btStridingMeshInterface

btStridingMeshInterface
Initial value:
{
protected:
btVector3 m_scaling
btVector3
btVector3 can be used to represent 3D points and vectors. It has an un-used w component to suit 16-by...
Definition: btVector3.h:82

The btStridingMeshInterface is the interface class for high performance generic access to triangle meshes, used in combination with btBvhTriangleMeshShape and some other collision shapes. Using index striding of 3*sizeof(integer) it can use triangle arrays, using index striding of 1*sizeof(integer) it can handle triangle strips. It allows for sharing graphics and collision meshes. Also it provides locking/unlocking of graphics meshes that are in gpu memory.

Definition at line 27 of file btStridingMeshInterface.h.

Referenced by btGenerateInternalEdgeInfo(), performConvexcast(), and performRaycast().