| Bullet Collision Detection & Physics Library
    | 
 
 
 
Go to the documentation of this file.
   16 #ifndef BT_OBB_BOX_MINKOWSKI_H 
   17 #define BT_OBB_BOX_MINKOWSKI_H 
   36                 btVector3 halfExtents = getHalfExtentsWithoutMargin();
 
   37                 btVector3 margin(getMargin(), getMargin(), getMargin());
 
   38                 halfExtents += margin;
 
   44                 return m_implicitShapeDimensions;  
 
   49                 btVector3 halfExtents = getHalfExtentsWithoutMargin();
 
   50                 btVector3 margin(getMargin(), getMargin(), getMargin());
 
   51                 halfExtents += margin;
 
   54                                                  btFsels(vec.
y(), halfExtents.
y(), -halfExtents.
y()),
 
   55                                                  btFsels(vec.
z(), halfExtents.
z(), -halfExtents.
z()));
 
   60                 const btVector3& halfExtents = getHalfExtentsWithoutMargin();
 
   63                                                  btFsels(vec.
y(), halfExtents.
y(), -halfExtents.
y()),
 
   64                                                  btFsels(vec.
z(), halfExtents.
z(), -halfExtents.
z()));
 
   69                 const btVector3& halfExtents = getHalfExtentsWithoutMargin();
 
   71                 for (
int i = 0; i < numVectors; i++)
 
   75                                                                                    btFsels(vec.
y(), halfExtents.
y(), -halfExtents.
y()),
 
   76                                                                                    btFsels(vec.
z(), halfExtents.
z(), -halfExtents.
z()));
 
   85                 btVector3 oldMargin(getMargin(), getMargin(), getMargin());
 
   86                 btVector3 implicitShapeDimensionsWithMargin = m_implicitShapeDimensions + oldMargin;
 
   89                 btVector3 newMargin(getMargin(), getMargin(), getMargin());
 
   90                 m_implicitShapeDimensions = implicitShapeDimensionsWithMargin - newMargin;
 
   94                 btVector3 oldMargin(getMargin(), getMargin(), getMargin());
 
   95                 btVector3 implicitShapeDimensionsWithMargin = m_implicitShapeDimensions + oldMargin;
 
   96                 btVector3 unScaledImplicitShapeDimensionsWithMargin = implicitShapeDimensionsWithMargin / m_localScaling;
 
  100                 m_implicitShapeDimensions = (unScaledImplicitShapeDimensionsWithMargin * m_localScaling) - oldMargin;
 
  111                 getPlaneEquation(plane, i);
 
  113                 planeSupport = localGetSupportingVertex(-planeNormal);
 
  133                 btVector3 halfExtents = getHalfExtentsWithMargin();
 
  136                         halfExtents.
x() * (1 - (i & 1)) - halfExtents.
x() * (i & 1),
 
  137                         halfExtents.
y() * (1 - ((i & 2) >> 1)) - halfExtents.
y() * ((i & 2) >> 1),
 
  138                         halfExtents.
z() * (1 - ((i & 4) >> 2)) - halfExtents.
z() * ((i & 4) >> 2));
 
  143                 btVector3 halfExtents = getHalfExtentsWithoutMargin();
 
  232                 getVertex(edgeVert0, pa);
 
  233                 getVertex(edgeVert1, pb);
 
  238                 btVector3 halfExtents = getHalfExtentsWithoutMargin();
 
  242                 bool result = (pt.
x() <= (halfExtents.
x() + tolerance)) &&
 
  243                                           (pt.
x() >= (-halfExtents.
x() - tolerance)) &&
 
  244                                           (pt.
y() <= (halfExtents.
y() + tolerance)) &&
 
  245                                           (pt.
y() >= (-halfExtents.
y() - tolerance)) &&
 
  246                                           (pt.
z() <= (halfExtents.
z() + tolerance)) &&
 
  247                                           (pt.
z() >= (-halfExtents.
z() - tolerance));
 
  291 #endif  //BT_OBB_BOX_MINKOWSKI_H 
  
The btPolyhedralConvexShape is an internal interface class for polyhedral convex shapes.
virtual void getPlane(btVector3 &planeNormal, btVector3 &planeSupport, int i) const
virtual btVector3 localGetSupportingVertex(const btVector3 &vec) const
btVector3 localGetSupportingVertexWithoutMargin(const btVector3 &vec) const
void setValue(const btScalar &_x, const btScalar &_y, const btScalar &_z)
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
The btBoxShape is a box primitive around the origin, its sides axis aligned with length specified by ...
void setValue(const btScalar &_x, const btScalar &_y, const btScalar &_z, const btScalar &_w)
Set x,y,z and zero w.
virtual void setLocalScaling(const btVector3 &scaling)
virtual void getPreferredPenetrationDirection(int index, btVector3 &penetrationVector) const
const btScalar & y() const
Return the y value.
const btScalar & getX() const
Return the x value.
virtual void setLocalScaling(const btVector3 &scaling)
virtual int getNumVertices() const
virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3 *vectors, btVector3 *supportVerticesOut, int numVectors) const
#define BT_DECLARE_ALIGNED_ALLOCATOR()
btVector3 can be used to represent 3D points and vectors.
const btVector3 & getHalfExtentsWithoutMargin() const
virtual int getNumPlanes() const
virtual void setMargin(btScalar collisionMargin)
#define ATTRIBUTE_ALIGNED16(a)
virtual void getEdge(int i, btVector3 &pa, btVector3 &pb) const
const btScalar & getZ() const
Return the z value.
virtual void getPlaneEquation(btVector4 &plane, int i) const
const btScalar & getY() const
Return the y value.
#define SIMD_FORCE_INLINE
virtual int getNumEdges() const
const btScalar & x() const
Return the x value.
virtual const char * getName() const
virtual void getVertex(int i, btVector3 &vtx) const
btVector3 getHalfExtentsWithMargin() const
virtual bool isInside(const btVector3 &pt, btScalar tolerance) const
virtual void setMargin(btScalar margin)
virtual int getNumPreferredPenetrationDirections() const
const btScalar & z() const
Return the z value.