Back to index

supertuxkart  0.5+dfsg1
Public Member Functions | Protected Attributes
btConvexInternalShape Class Reference

btConvexInternalShape carries some additional data, shared by most implementations More...

#include <btConvexInternalShape.h>

Inheritance diagram for btConvexInternalShape:
Inheritance graph
[legend]
Collaboration diagram for btConvexInternalShape:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 btConvexInternalShape ()
virtual ~btConvexInternalShape ()
virtual btVector3 localGetSupportingVertex (const btVector3 &vec) const
virtual btVector3 localGetSupportingVertexWithoutMargin (const btVector3 &vec) const =0
virtual void batchedUnitVectorGetSupportingVertexWithoutMargin (const btVector3 *vectors, btVector3 *supportVerticesOut, int numVectors) const =0
const btVector3getImplicitShapeDimensions () 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 dedicated version
virtual void getAabbSlow (const btTransform &t, btVector3 &aabbMin, btVector3 &aabbMax) const
virtual void setLocalScaling (const btVector3 &scaling)
virtual const btVector3getLocalScaling () const
const btVector3getLocalScalingNV () 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

Protected Attributes

btVector3 m_localScaling
btVector3 m_implicitShapeDimensions
btScalar m_collisionMargin
btScalar m_padding

Detailed Description

btConvexInternalShape carries some additional data, shared by most implementations

Definition at line 8 of file btConvexInternalShape.h.


Constructor & Destructor Documentation

virtual btConvexInternalShape::~btConvexInternalShape ( ) [inline, virtual]

Definition at line 26 of file btConvexInternalShape.h.

       {

       }

Member Function Documentation

virtual void btConvexInternalShape::batchedUnitVectorGetSupportingVertexWithoutMargin ( const btVector3 vectors,
btVector3 supportVerticesOut,
int  numVectors 
) const [pure virtual]
void btConvexInternalShape::getAabb ( const btTransform t,
btVector3 aabbMin,
btVector3 aabbMax 
) const [inline]

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

Reimplemented in btBoxShape, btPolyhedralConvexShape, btTriangleShape, btCapsuleShape, and btCylinderShape.

Definition at line 46 of file btConvexInternalShape.h.

       {
              getAabbSlow(t,aabbMin,aabbMax);
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void btConvexInternalShape::getAabbSlow ( const btTransform t,
btVector3 aabbMin,
btVector3 aabbMax 
) const [virtual]

Definition at line 34 of file btConvexInternalShape.cpp.

{

       btScalar margin = getMargin();
       for (int i=0;i<3;i++)
       {
              btVector3 vec(btScalar(0.),btScalar(0.),btScalar(0.));
              vec[i] = btScalar(1.);

              btVector3 sv = localGetSupportingVertex(vec*trans.getBasis());

              btVector3 tmp = trans(sv);
              maxAabb[i] = tmp[i]+margin;
              vec[i] = btScalar(-1.);
              tmp = trans(localGetSupportingVertex(vec*trans.getBasis()));
              minAabb[i] = tmp[i]-margin;
       }
};

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 40 of file btConvexInternalShape.h.

virtual const btVector3& btConvexInternalShape::getLocalScaling ( ) const [inline, virtual]

Reimplemented in btConvexTriangleMeshShape.

Definition at line 57 of file btConvexInternalShape.h.

       {
              return m_localScaling;
       }

Definition at line 62 of file btConvexInternalShape.h.

       {
              return m_localScaling;
       }
virtual btScalar btConvexInternalShape::getMargin ( ) const [inline, virtual]

Reimplemented in btMinkowskiSumShape.

Definition at line 71 of file btConvexInternalShape.h.

       {
              return m_collisionMargin;
       }

Here is the caller graph for this function:

Definition at line 76 of file btConvexInternalShape.h.

       {
              return m_collisionMargin;
       }
virtual int btConvexInternalShape::getNumPreferredPenetrationDirections ( ) const [inline, virtual]

Reimplemented in btBoxShape, and btTriangleShape.

Definition at line 81 of file btConvexInternalShape.h.

       {
              return 0;
       }
virtual void btConvexInternalShape::getPreferredPenetrationDirection ( int  index,
btVector3 penetrationVector 
) const [inline, virtual]

Reimplemented in btBoxShape, and btTriangleShape.

Definition at line 86 of file btConvexInternalShape.h.

       {
              (void)penetrationVector;
              (void)index;
              btAssert(0);
       }

Reimplemented in btBoxShape, btCylinderShape, btConeShape, and btConvexTriangleMeshShape.

Definition at line 54 of file btConvexInternalShape.cpp.

{
#ifndef __SPU__

        btVector3    supVertex = localGetSupportingVertexWithoutMargin(vec);

       if ( getMargin()!=btScalar(0.) )
       {
              btVector3 vecnorm = vec;
              if (vecnorm .length2() < (SIMD_EPSILON*SIMD_EPSILON))
              {
                     vecnorm.setValue(btScalar(-1.),btScalar(-1.),btScalar(-1.));
              } 
              vecnorm.normalize();
              supVertex+= getMargin() * vecnorm;
       }
       return supVertex;

#else
       return btVector3(0,0,0);
#endif //__SPU__

 }

Here is the call graph for this function:

Here is the caller graph for this function:

void btConvexInternalShape::setLocalScaling ( const btVector3 scaling) [virtual]

Reimplemented in btBoxShape, and btConvexTriangleMeshShape.

Definition at line 27 of file btConvexInternalShape.cpp.

{
       m_localScaling = scaling;
}
virtual void btConvexInternalShape::setMargin ( btScalar  margin) [inline, virtual]

Reimplemented in btBoxShape.

Definition at line 67 of file btConvexInternalShape.h.

       {
              m_collisionMargin = margin;
       }

Here is the caller graph for this function:


Member Data Documentation

Definition at line 18 of file btConvexInternalShape.h.

Definition at line 16 of file btConvexInternalShape.h.

Definition at line 14 of file btConvexInternalShape.h.

Definition at line 20 of file btConvexInternalShape.h.


The documentation for this class was generated from the following files: