16#ifndef BT_CYLINDER_MINKOWSKI_H
17#define BT_CYLINDER_MINKOWSKI_H
36 btVector3 halfExtents = getHalfExtentsWithoutMargin();
37 btVector3 margin(getMargin(), getMargin(), getMargin());
38 halfExtents += margin;
44 return m_implicitShapeDimensions;
55 virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(
const btVector3* vectors,
btVector3* supportVerticesOut,
int numVectors)
const;
60 btVector3 oldMargin(getMargin(), getMargin(), getMargin());
61 btVector3 implicitShapeDimensionsWithMargin = m_implicitShapeDimensions + oldMargin;
64 btVector3 newMargin(getMargin(), getMargin(), getMargin());
65 m_implicitShapeDimensions = implicitShapeDimensionsWithMargin - newMargin;
71 supVertex = localGetSupportingVertexWithoutMargin(vec);
81 supVertex += getMargin() * vecnorm;
97 aniDir[getUpAxis()] = 1;
103 return getHalfExtentsWithMargin().getX();
108 btVector3 oldMargin(getMargin(), getMargin(), getMargin());
109 btVector3 implicitShapeDimensionsWithMargin = m_implicitShapeDimensions + oldMargin;
110 btVector3 unScaledImplicitShapeDimensionsWithMargin = implicitShapeDimensionsWithMargin / m_localScaling;
114 m_implicitShapeDimensions = (unScaledImplicitShapeDimensionsWithMargin * m_localScaling) - oldMargin;
123 virtual int calculateSerializeBufferSize()
const;
126 virtual const char* serialize(
void* dataBuffer,
btSerializer* serializer)
const;
203 return "btCylinderShapeData";
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
The btConvexInternalShape is an internal base class, shared by most convex shape implementations.
virtual void setMargin(btScalar margin)
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
virtual void setLocalScaling(const btVector3 &scaling)
btCylinderShapeX(const btVector3 &halfExtents)
virtual btScalar getRadius() const
virtual const char * getName() const
virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3 &vec) const
BT_DECLARE_ALIGNED_ALLOCATOR()
virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3 *vectors, btVector3 *supportVerticesOut, int numVectors) const
virtual btScalar getRadius() const
virtual const char * getName() const
BT_DECLARE_ALIGNED_ALLOCATOR()
virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3 *vectors, btVector3 *supportVerticesOut, int numVectors) const
virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3 &vec) const
btCylinderShapeZ(const btVector3 &halfExtents)
The btCylinderShape class implements a cylinder shape primitive, centered around the origin....
BT_DECLARE_ALIGNED_ALLOCATOR()
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
virtual btVector3 getAnisotropicRollingFrictionDirection() const
the getAnisotropicRollingFrictionDirection can be used in combination with setAnisotropicFriction See...
virtual btScalar getRadius() const
const btVector3 & getHalfExtentsWithoutMargin() const
virtual void setMargin(btScalar collisionMargin)
virtual int calculateSerializeBufferSize() const
virtual const char * getName() const
virtual btVector3 localGetSupportingVertex(const btVector3 &vec) const
btVector3 getHalfExtentsWithMargin() const
virtual void setLocalScaling(const btVector3 &scaling)
btVector3 can be used to represent 3D points and vectors.
void setValue(const btScalar &_x, const btScalar &_y, const btScalar &_z)
btScalar length2() const
Return the length of the vector squared.
const btScalar & getY() const
Return the y value.
btVector3 & normalize()
Normalize this vector x^2 + y^2 + z^2 = 1.
const btScalar & getX() const
Return the x value.
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
btConvexInternalShapeData m_convexInternalShapeData