Bullet Collision Detection & Physics Library
|
Go to the documentation of this file.
18 #ifndef BT_SPATIAL_ALGEBRA_H
19 #define BT_SPATIAL_ALGEBRA_H
147 template <
typename SpatialVectorType>
148 void cross(
const SpatialVectorType &b, SpatialVectorType &out)
const
153 template <
typename SpatialVectorType>
154 SpatialVectorType
cross(
const SpatialVectorType &b)
const
156 SpatialVectorType out;
240 template <
typename SpatialVectorType>
242 SpatialVectorType &outVec,
247 outVec.m_topVec =
m_rotMat * inVec.m_topVec;
250 else if (outOp ==
Add)
252 outVec.m_topVec +=
m_rotMat * inVec.m_topVec;
257 outVec.m_topVec -=
m_rotMat * inVec.m_topVec;
262 template <
typename SpatialVectorType>
264 SpatialVectorType &outVec,
269 outVec.m_topVec =
m_rotMat * inVec.m_topVec;
270 outVec.m_bottomVec =
m_rotMat * inVec.m_bottomVec;
272 else if (outOp ==
Add)
274 outVec.m_topVec +=
m_rotMat * inVec.m_topVec;
275 outVec.m_bottomVec +=
m_rotMat * inVec.m_bottomVec;
279 outVec.m_topVec -=
m_rotMat * inVec.m_topVec;
280 outVec.m_bottomVec -=
m_rotMat * inVec.m_bottomVec;
284 template <
typename SpatialVectorType>
286 SpatialVectorType &outVec,
294 else if (outOp ==
Add)
306 template <
typename SpatialVectorType>
308 SpatialVectorType &outVec,
316 else if (outOp ==
Add)
342 else if (outOp ==
Add)
356 template <
typename SpatialVectorType>
357 SpatialVectorType
operator*(
const SpatialVectorType &vec)
359 SpatialVectorType out;
365 template <
typename SpatialVectorType>
376 template <
typename SpatialVectorType>
389 #endif //BT_SPATIAL_ALGEBRA_H
btSymmetricSpatialDyad(const btMatrix3x3 &topLeftMat, const btMatrix3x3 &topRightMat, const btMatrix3x3 &bottomLeftMat)
btSpatialMotionVector operator-() const
void addMatrix(const btMatrix3x3 &topLeftMat, const btMatrix3x3 &topRightMat, const btMatrix3x3 &bottomLeftMat)
btSpatialForceVector operator*(const btScalar &s) const
void addValue(const btScalar &ax, const btScalar &ay, const btScalar &az, const btScalar &lx, const btScalar &ly, const btScalar &lz)
These spatial algebra classes are used for btMultiBody, see BulletDynamics/Featherstone.
void addVector(const btVector3 &angular, const btVector3 &linear)
btSpatialMotionVector operator+(const btSpatialMotionVector &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...
void setValue(const btScalar &ax, const btScalar &ay, const btScalar &az, const btScalar &lx, const btScalar &ly, const btScalar &lz)
void setValue(const btScalar &ax, const btScalar &ay, const btScalar &az, const btScalar &lx, const btScalar &ly, const btScalar &lz)
btVector3 cross(const btVector3 &v) const
Return the cross product between this and another vector.
btSpatialForceVector operator+(const btSpatialForceVector &vec) const
const btVector3 & getLinear() const
void setVector(const btVector3 &angular, const btVector3 &linear)
void addLinear(const btVector3 &linear)
btScalar dot(const btVector3 &v) const
Return the dot product.
btSpatialForceVector operator-() const
const btVector3 & getLinear() const
void setLinear(const btVector3 &linear)
btSpatialForceVector(const btScalar &ax, const btScalar &ay, const btScalar &az, const btScalar &lx, const btScalar &ly, const btScalar &lz)
btSpatialForceVector operator*(const btSpatialMotionVector &vec)
btMatrix3x3 outerProduct(const btVector3 &v0, const btVector3 &v1)
btSymmetricSpatialDyad & operator-=(const btSymmetricSpatialDyad &mat)
btSpatialMotionVector operator*(const btScalar &s) const
The btMatrix3x3 class implements a 3x3 rotation matrix, to perform linear algebra in combination with...
btMatrix3x3 transpose() const
Return the transpose of the matrix.
btVector3 can be used to represent 3D points and vectors.
void addVector(const btVector3 &angular, const btVector3 &linear)
btSpatialForceVector & operator-=(const btSpatialForceVector &vec)
btSpatialForceVector & operator+=(const btSpatialForceVector &vec)
btMatrix3x3 m_bottomLeftMat
btMatrix3x3 m_topRightMat
void symmetricSpatialOuterProduct(const SpatialVectorType &a, const SpatialVectorType &b, btSymmetricSpatialDyad &out)
void cross(const SpatialVectorType &b, SpatialVectorType &out) const
void setAngular(const btVector3 &angular)
void addLinear(const btVector3 &linear)
btSpatialMotionVector(const btVector3 &angular, const btVector3 &linear)
void addAngular(const btVector3 &angular)
void addAngular(const btVector3 &angular)
void addValue(const btScalar &ax, const btScalar &ay, const btScalar &az, const btScalar &lx, const btScalar &ly, const btScalar &lz)
void setIdentity()
Set the matrix to the identity.
const btVector3 & getAngular() const
btSpatialForceVector operator-(const btSpatialForceVector &vec) const
void setVector(const btVector3 &angular, const btVector3 &linear)
void setAngular(const btVector3 &angular)
void setLinear(const btVector3 &linear)
btSpatialMotionVector & operator+=(const btSpatialMotionVector &vec)
btSpatialMotionVector operator-(const btSpatialMotionVector &vec) const
void setMatrix(const btMatrix3x3 &topLeftMat, const btMatrix3x3 &topRightMat, const btMatrix3x3 &bottomLeftMat)
btSpatialMotionVector & operator*=(const btScalar &s)
btSpatialMotionVector & operator-=(const btSpatialMotionVector &vec)
btScalar dot(const btSpatialForceVector &b) const
btSpatialForceVector(const btVector3 &angular, const btVector3 &linear)
SpatialVectorType cross(const SpatialVectorType &b) const
const btVector3 & getAngular() const