16#ifndef BT_OBB_BOX_2D_SHAPE_H
17#define BT_OBB_BOX_2D_SHAPE_H
42 halfExtents += margin;
55 halfExtents += margin;
58 btFsels(vec.
y(), halfExtents.
y(), -halfExtents.
y()),
59 btFsels(vec.
z(), halfExtents.
z(), -halfExtents.
z()));
67 btFsels(vec.
y(), halfExtents.
y(), -halfExtents.
y()),
68 btFsels(vec.
z(), halfExtents.
z(), -halfExtents.
z()));
75 for (
int i = 0; i < numVectors; i++)
79 btFsels(vec.
y(), halfExtents.
y(), -halfExtents.
y()),
80 btFsels(vec.
z(), halfExtents.
z(), -halfExtents.
z()));
100 if (minDimension > boxHalfExtents.
getY())
101 minDimension = boxHalfExtents.
getY();
184 halfExtents.
x() * (1 - (i & 1)) - halfExtents.
x() * (i & 1),
185 halfExtents.
y() * (1 - ((i & 2) >> 1)) - halfExtents.
y() * ((i & 2) >> 1),
186 halfExtents.
z() * (1 - ((i & 4) >> 2)) - halfExtents.
z() * ((i & 4) >> 2));
290 bool result = (pt.
x() <= (halfExtents.
x() + tolerance)) &&
291 (pt.
x() >= (-halfExtents.
x() - tolerance)) &&
292 (pt.
y() <= (halfExtents.
y() + tolerance)) &&
293 (pt.
y() >= (-halfExtents.
y() - tolerance)) &&
294 (pt.
z() <= (halfExtents.
z() + tolerance)) &&
295 (pt.
z() >= (-halfExtents.
z() - tolerance));
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
#define ATTRIBUTE_ALIGNED16(a)
#define SIMD_FORCE_INLINE
virtual int getNumVertices() const
virtual void getPlane(btVector3 &planeNormal, btVector3 &planeSupport, int i) const
virtual int getNumEdges() const
btBox2dShape(const btVector3 &boxHalfExtents)
a btBox2dShape is a flat 2D box in the X-Y plane (Z extents are zero)
virtual void setLocalScaling(const btVector3 &scaling)
virtual void setMargin(btScalar collisionMargin)
const btVector3 * getVertices() const
virtual int getNumPreferredPenetrationDirections() const
int getVertexCount() const
const btVector3 & getHalfExtentsWithoutMargin() const
virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3 *vectors, btVector3 *supportVerticesOut, int numVectors) const
const btVector3 & getCentroid() const
virtual const char * getName() const
virtual bool isInside(const btVector3 &pt, btScalar tolerance) const
btVector3 localGetSupportingVertexWithoutMargin(const btVector3 &vec) const
virtual void getEdge(int i, btVector3 &pa, btVector3 &pb) const
BT_DECLARE_ALIGNED_ALLOCATOR()
virtual void getPlaneEquation(btVector4 &plane, int i) const
btVector3 getHalfExtentsWithMargin() const
virtual int getNumPlanes() const
virtual void getVertex(int i, btVector3 &vtx) const
virtual btVector3 localGetSupportingVertex(const btVector3 &vec) const
virtual void getPreferredPenetrationDirection(int index, btVector3 &penetrationVector) const
const btVector3 * getNormals() const
virtual void setMargin(btScalar margin)
btVector3 m_implicitShapeDimensions
void setSafeMargin(btScalar minDimension, btScalar defaultMarginMultiplier=0.1f)
virtual void setLocalScaling(const btVector3 &scaling)
virtual btScalar getMargin() const
btPolyhedralConvexShape()
btVector3 can be used to represent 3D points and vectors.
const btScalar & getZ() const
Return the z value.
const btScalar & z() const
Return the z value.
void setValue(const btScalar &_x, const btScalar &_y, const btScalar &_z)
const btScalar & getY() const
Return the y value.
const btScalar & x() const
Return the x value.
const btScalar & getX() const
Return the x value.
const btScalar & y() const
Return the y value.
void setValue(const btScalar &_x, const btScalar &_y, const btScalar &_z, const btScalar &_w)
Set x,y,z and zero w.