16 #ifndef BT_CYLINDER_MINKOWSKI_H
17 #define BT_CYLINDER_MINKOWSKI_H
38 btVector3 halfExtents = getHalfExtentsWithoutMargin();
39 btVector3 margin(getMargin(),getMargin(),getMargin());
40 halfExtents += margin;
46 return m_implicitShapeDimensions;
57 virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(
const btVector3* vectors,
btVector3* supportVerticesOut,
int numVectors)
const;
62 btVector3 oldMargin(getMargin(),getMargin(),getMargin());
63 btVector3 implicitShapeDimensionsWithMargin = m_implicitShapeDimensions+oldMargin;
66 btVector3 newMargin(getMargin(),getMargin(),getMargin());
67 m_implicitShapeDimensions = implicitShapeDimensionsWithMargin - newMargin;
75 supVertex = localGetSupportingVertexWithoutMargin(vec);
85 supVertex+= getMargin() * vecnorm;
103 aniDir[getUpAxis()]=1;
109 return getHalfExtentsWithMargin().getX();
114 btVector3 oldMargin(getMargin(),getMargin(),getMargin());
115 btVector3 implicitShapeDimensionsWithMargin = m_implicitShapeDimensions+oldMargin;
116 btVector3 unScaledImplicitShapeDimensionsWithMargin = implicitShapeDimensionsWithMargin / m_localScaling;
120 m_implicitShapeDimensions = (unScaledImplicitShapeDimensionsWithMargin * m_localScaling) - oldMargin;
207 return "btCylinderShapeData";
212 #endif //BT_CYLINDER_MINKOWSKI_H
btCylinderShapeZ(const btVector3 &halfExtents)
btVector3 getHalfExtentsWithMargin() const
virtual const char * getName() const
virtual void setMargin(btScalar collisionMargin)
void setValue(const btScalar &_x, const btScalar &_y, const btScalar &_z)
virtual btScalar getRadius() const
virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3 &vec) const
The btConvexInternalShape is an internal base class, shared by most convex shape implementations.
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
virtual int calculateSerializeBufferSize() const
#define SIMD_FORCE_INLINE
virtual int calculateSerializeBufferSize() const
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64 ...
const btVector3 & getHalfExtentsWithoutMargin() const
btVector3 & normalize()
Normalize this vector x^2 + y^2 + z^2 = 1.
virtual btScalar getRadius() const
virtual void setMargin(btScalar margin)
BT_DECLARE_ALIGNED_ALLOCATOR()
virtual btScalar getRadius() const
virtual void setLocalScaling(const btVector3 &scaling)
virtual btVector3 localGetSupportingVertex(const btVector3 &vec) const
const btScalar & getY() const
Return the y value.
const btScalar & getX() const
Return the x value.
btVector3 can be used to represent 3D points and vectors.
#define ATTRIBUTE_ALIGNED16(a)
btCylinderShapeX(const btVector3 &halfExtents)
BT_DECLARE_ALIGNED_ALLOCATOR()
virtual btVector3 getAnisotropicRollingFrictionDirection() const
the getAnisotropicRollingFrictionDirection can be used in combination with setAnisotropicFriction See...
virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3 *vectors, btVector3 *supportVerticesOut, int numVectors) const
#define BT_DECLARE_ALIGNED_ALLOCATOR()
The btCylinderShape class implements a cylinder shape primitive, centered around the origin...
virtual const char * getName() const
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)
virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3 *vectors, btVector3 *supportVerticesOut, int numVectors) const
virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3 &vec) const
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
btConvexInternalShapeData m_convexInternalShapeData
virtual const char * getName() const
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64 ...
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...