Blender V2.61 - r43446
Public Member Functions | Static Public Member Functions

btTransform Class Reference

The btTransform class supports rigid transforms with only translation and rotation and no scaling/shear. It can be used in combination with btVector3, btQuaternion and btMatrix3x3 linear algebra classes. More...

#include <btTransform.h>

List of all members.

Public Member Functions

 btTransform ()
 No initialization constructor.
SIMD_FORCE_INLINE btTransform (const btQuaternion &q, const btVector3 &c=btVector3(btScalar(0), btScalar(0), btScalar(0)))
 Constructor from btQuaternion (optional btVector3 )
SIMD_FORCE_INLINE btTransform (const btMatrix3x3 &b, const btVector3 &c=btVector3(btScalar(0), btScalar(0), btScalar(0)))
 Constructor from btMatrix3x3 (optional btVector3)
SIMD_FORCE_INLINE btTransform (const btTransform &other)
 Copy constructor.
SIMD_FORCE_INLINE btTransformoperator= (const btTransform &other)
 Assignment Operator.
SIMD_FORCE_INLINE void mult (const btTransform &t1, const btTransform &t2)
 Set the current transform as the value of the product of two transforms.
SIMD_FORCE_INLINE btVector3 operator() (const btVector3 &x) const
 Return the transform of the vector.
SIMD_FORCE_INLINE btVector3 operator* (const btVector3 &x) const
 Return the transform of the vector.
SIMD_FORCE_INLINE btQuaternion operator* (const btQuaternion &q) const
 Return the transform of the btQuaternion.
SIMD_FORCE_INLINE btMatrix3x3getBasis ()
 Return the basis matrix for the rotation.
SIMD_FORCE_INLINE const
btMatrix3x3
getBasis () const
 Return the basis matrix for the rotation.
SIMD_FORCE_INLINE btVector3 & getOrigin ()
 Return the origin vector translation.
SIMD_FORCE_INLINE const btVector3 & getOrigin () const
 Return the origin vector translation.
btQuaternion getRotation () const
 Return a quaternion representing the rotation.
void setFromOpenGLMatrix (const btScalar *m)
 Set from an array.
void getOpenGLMatrix (btScalar *m) const
 Fill an array representation.
SIMD_FORCE_INLINE void setOrigin (const btVector3 &origin)
 Set the translational element.
SIMD_FORCE_INLINE btVector3 invXform (const btVector3 &inVec) const
SIMD_FORCE_INLINE void setBasis (const btMatrix3x3 &basis)
 Set the rotational element by btMatrix3x3.
SIMD_FORCE_INLINE void setRotation (const btQuaternion &q)
 Set the rotational element by btQuaternion.
void setIdentity ()
 Set this transformation to the identity.
btTransformoperator*= (const btTransform &t)
 Multiply this Transform by another(this = this * another)
btTransform inverse () const
 Return the inverse of this transform.
btTransform inverseTimes (const btTransform &t) const
 Return the inverse of this transform times the other transform.
btTransform operator* (const btTransform &t) const
 Return the product of this transform and the other.
void serialize (struct btTransformData &dataOut) const
void serializeFloat (struct btTransformFloatData &dataOut) const
void deSerialize (const struct btTransformData &dataIn)
void deSerializeDouble (const struct btTransformDoubleData &dataIn)
void deSerializeFloat (const struct btTransformFloatData &dataIn)

Static Public Member Functions

static const btTransformgetIdentity ()
 Return an identity transform.

Detailed Description

The btTransform class supports rigid transforms with only translation and rotation and no scaling/shear. It can be used in combination with btVector3, btQuaternion and btMatrix3x3 linear algebra classes.

Definition at line 34 of file btTransform.h.


Constructor & Destructor Documentation

btTransform::btTransform ( ) [inline]

No initialization constructor.

Definition at line 44 of file btTransform.h.

Referenced by inverse(), inverseTimes(), and operator*().

SIMD_FORCE_INLINE btTransform::btTransform ( const btQuaternion q,
const btVector3 &  c = btVector3(btScalar(0), btScalar(0), btScalar(0)) 
) [inline, explicit]

Constructor from btQuaternion (optional btVector3 )

Parameters:
qRotation from quaternion
cTranslation from Vector (default 0,0,0)

Definition at line 48 of file btTransform.h.

SIMD_FORCE_INLINE btTransform::btTransform ( const btMatrix3x3 b,
const btVector3 &  c = btVector3(btScalar(0), btScalar(0), btScalar(0)) 
) [inline, explicit]

Constructor from btMatrix3x3 (optional btVector3)

Parameters:
bRotation from Matrix
cTranslation from Vector default (0,0,0)

Definition at line 57 of file btTransform.h.

SIMD_FORCE_INLINE btTransform::btTransform ( const btTransform other) [inline]

Copy constructor.

Definition at line 63 of file btTransform.h.


Member Function Documentation

SIMD_FORCE_INLINE void btTransform::deSerialize ( const struct btTransformData &  dataIn)

Definition at line 282 of file btTransform.h.

References btMatrix3x3::deSerialize().

SIMD_FORCE_INLINE void btTransform::deSerializeDouble ( const struct btTransformDoubleData dataIn)
SIMD_FORCE_INLINE void btTransform::deSerializeFloat ( const struct btTransformFloatData dataIn)
SIMD_FORCE_INLINE const btMatrix3x3& btTransform::getBasis ( ) const [inline]

Return the basis matrix for the rotation.

Definition at line 116 of file btTransform.h.

SIMD_FORCE_INLINE btMatrix3x3& btTransform::getBasis ( ) [inline]

Return the basis matrix for the rotation.

Definition at line 114 of file btTransform.h.

Referenced by btSoftBody::appendAngularJoint(), CcdPhysicsController::ApplyForce(), CcdPhysicsController::ApplyTorque(), GIM_AABB::appy_transform(), ATTRIBUTE_ALIGNED16(), b2CollidePolygons(), btAdjustInternalEdgeContacts(), btCompareTransformsEqual(), btHinge2Constraint::btHinge2Constraint(), btTransformAabb(), btUniversalConstraint::btUniversalConstraint(), btGeneric6DofConstraint::buildAngularJacobian(), btGeneric6DofConstraint::buildJacobian(), btConeTwistConstraint::buildJacobian(), btGeneric6DofConstraint::buildLinearJacobian(), GIM_BOX_BOX_TRANSFORM_CACHE::calc_from_full_invert(), GIM_BOX_BOX_TRANSFORM_CACHE::calc_from_homogenic(), btConeTwistConstraint::calcAngleInfo(), btConeTwistConstraint::calcAngleInfo2(), btMinkowskiPenetrationDepthSolver::calcPenDepth(), btSubsimplexConvexCast::calcTimeOfImpact(), btGeneric6DofConstraint::calculateAngleInfo(), btTransformUtil::calculateDiffAxisAngle(), btGeneric6DofConstraint::calculateLinearInfo(), btConvexTriangleMeshShape::calculatePrincipalAxisTransform(), btSliderConstraint::calculateTransforms(), capsuleCapsuleDistance(), btSoftBody::checkContact(), btConvexPlaneCollisionAlgorithm::collideSingleContact(), CcdPhysicsEnvironment::createConstraint(), btRaycastVehicle::debugDraw(), btDiscreteDynamicsWorld::debugDrawConstraint(), btIDebugDraw::drawCapsule(), btIDebugDraw::drawCone(), btIDebugDraw::drawCylinder(), btIDebugDraw::drawSphere(), btIDebugDraw::drawTransform(), EdgeSeparation(), FindIncidentEdge(), FindMaxSeparation(), GIM_TRIANGLE::get_triangle_transform(), btHeightfieldTerrainShape::getAabb(), btTriangleMeshShape::getAabb(), btCapsuleShape::getAabb(), btConvexInternalShape::getAabbSlow(), btUniformScalingShape::getAabbSlow(), btBoxBoxDetector::getClosestPoints(), SphereTriangleDetector::getClosestPoints(), btGjkPairDetector::getClosestPointsNonVirtual(), btRaycastVehicle::getForwardVector(), btConeTwistConstraint::getInfo2NonVirtual(), btSliderConstraint::getInfo2NonVirtual(), CcdPhysicsController::GetTransformFromMotionState(), DefaultMotionState::getWorldOrientation(), BlenderBulletMotionState::getWorldTransform(), gim_inertia_add_transformed(), gjkepa2_impl::Initialize(), btKinematicCharacterController::jump(), btMinkowskiSumShape::localGetSupportingVertexWithoutMargin(), btCollisionWorld::objectQuerySingle(), operator==(), CcdPhysicsEnvironment::processFhSprings(), btCollisionWorld::rayTestSingle(), CcdPhysicsController::RelativeRotate(), CcdPhysicsController::RelativeTranslate(), resolveSingleBilateral(), CcdPhysicsController::SetAngularVelocity(), btGeneric6DofSpringConstraint::setAxis(), btGeneric6DofConstraint::setAxis(), btUniversalConstraint::setAxis(), btGeneric6DofConstraint::setLinearLimits(), CcdPhysicsController::SetLinearVelocity(), DefaultMotionState::setWorldOrientation(), btSoftColliders::ClusterBase::SolveContact(), SupportVertexCallback::SupportVertexCallback(), CcdPhysicsController::SynchronizeMotionStates(), btSliderConstraint::testAngLimits(), btSoftBody::transform(), btSoftBody::updateClusters(), btRaycastVehicle::updateFriction(), btRaycastVehicle::updateVehicle(), and btRaycastVehicle::updateWheelTransformsWS().

static const btTransform& btTransform::getIdentity ( ) [inline, static]
void btTransform::getOpenGLMatrix ( btScalar m) const [inline]

Fill an array representation.

Parameters:
mA pointer to a 15 element array (12 rotation(row major padded on the right by 1), and 3 translation

Definition at line 141 of file btTransform.h.

References btMatrix3x3::getOpenGLSubMatrix().

SIMD_FORCE_INLINE const btVector3& btTransform::getOrigin ( ) const [inline]

Return the origin vector translation.

Definition at line 121 of file btTransform.h.

SIMD_FORCE_INLINE btVector3& btTransform::getOrigin ( ) [inline]

Return the origin vector translation.

Definition at line 119 of file btTransform.h.

Referenced by ATTRIBUTE_ALIGNED16(), btCompareTransformsEqual(), btSingleSweepCallback::btSingleSweepCallback(), btTransformAabb(), btConeTwistConstraint::buildJacobian(), GIM_BOX_BOX_TRANSFORM_CACHE::calc_from_full_invert(), GIM_BOX_BOX_TRANSFORM_CACHE::calc_from_homogenic(), btGeneric6DofConstraint::calcAnchorPos(), btGjkEpaPenetrationDepthSolver::calcPenDepth(), btMinkowskiPenetrationDepthSolver::calcPenDepth(), btContinuousConvexCollision::calcTimeOfImpact(), btSubsimplexConvexCast::calcTimeOfImpact(), btGjkConvexCast::calcTimeOfImpact(), btGeneric6DofConstraint::calculateLinearInfo(), btConvexConcaveCollisionAlgorithm::calculateTimeOfImpact(), btSoftBodyConcaveCollisionAlgorithm::calculateTimeOfImpact(), btSliderConstraint::calculateTransforms(), btTransformUtil::calculateVelocity(), capsuleCapsuleDistance(), btCollisionWorld::convexSweepTest(), btRaycastVehicle::debugDraw(), btDiscreteDynamicsWorld::debugDrawConstraint(), btSoftBody::defaultCollisionHandler(), btSoftColliders::CollideSDF_RS::DoNode(), btIDebugDraw::drawCapsule(), btIDebugDraw::drawCone(), btIDebugDraw::drawCylinder(), btIDebugDraw::drawSphere(), btIDebugDraw::drawTransform(), btGeneric6DofConstraint::get_limit_motor_info2(), btHeightfieldTerrainShape::getAabb(), btEmptyShape::getAabb(), btCapsuleShape::getAabb(), btHinge2Constraint::getAnchor(), btUniversalConstraint::getAnchor(), btHinge2Constraint::getAnchor2(), btUniversalConstraint::getAnchor2(), btSliderConstraint::getAncorInB(), btBoxBoxDetector::getClosestPoints(), SphereTriangleDetector::getClosestPoints(), btGjkPairDetector::getClosestPointsNonVirtual(), btConeTwistConstraint::getInfo2NonVirtual(), btSliderConstraint::getInfo2NonVirtual(), CcdPhysicsController::getPosition(), WrapperVehicle::GetWheelPosition(), DefaultMotionState::getWorldPosition(), gim_inertia_add_transformed(), btConvexSeparatingDistanceUtil::initSeparatingDistance(), btTransformUtil::integrateTransform(), btDiscreteDynamicsWorld::integrateTransforms(), inverseTimes(), btCollisionWorld::objectQuerySingle(), operator==(), btSoftRigidDynamicsWorld::rayTestSingle(), btCollisionWorld::rayTestSingle(), CcdPhysicsController::RelativeTranslate(), CcdPhysicsController::setPosition(), CcdPhysicsController::setWorldOrientation(), BlenderBulletMotionState::setWorldTransform(), btConeTwistConstraint::solveConstraintObsolete(), btSoftColliders::ClusterBase::SolveContact(), CcdPhysicsController::SynchronizeMotionStates(), WrapperVehicle::SyncWheels(), and btConvexSeparatingDistanceUtil::updateSeparatingDistance().

btQuaternion btTransform::getRotation ( ) const [inline]
btTransform btTransform::inverse ( ) const [inline]
SIMD_FORCE_INLINE btTransform btTransform::inverseTimes ( const btTransform t) const

Return the inverse of this transform times the other transform.

Parameters:
tThe other transform return this.inverse() * the other

Definition at line 232 of file btTransform.h.

References btTransform(), getOrigin(), and btMatrix3x3::transposeTimes().

Referenced by btContinuousConvexCollision::calcTimeOfImpact(), SphereTriangleDetector::getClosestPoints(), gjkepa2_impl::Initialize(), and btCollisionWorld::rayTestSingle().

SIMD_FORCE_INLINE btVector3 btTransform::invXform ( const btVector3 &  inVec) const
SIMD_FORCE_INLINE void btTransform::mult ( const btTransform t1,
const btTransform t2 
) [inline]

Set the current transform as the value of the product of two transforms.

Parameters:
t1Transform 1
t2Transform 2 This = Transform1 * Transform2

Definition at line 81 of file btTransform.h.

SIMD_FORCE_INLINE btVector3 btTransform::operator() ( const btVector3 &  x) const [inline]

Return the transform of the vector.

Definition at line 94 of file btTransform.h.

References dot().

SIMD_FORCE_INLINE btVector3 btTransform::operator* ( const btVector3 &  x) const [inline]

Return the transform of the vector.

Definition at line 102 of file btTransform.h.

SIMD_FORCE_INLINE btQuaternion btTransform::operator* ( const btQuaternion q) const [inline]

Return the transform of the btQuaternion.

Definition at line 108 of file btTransform.h.

References getRotation().

SIMD_FORCE_INLINE btTransform btTransform::operator* ( const btTransform t) const

Return the product of this transform and the other.

Definition at line 240 of file btTransform.h.

References btTransform().

btTransform& btTransform::operator*= ( const btTransform t) [inline]

Multiply this Transform by another(this = this * another)

Parameters:
tThe other transform

Definition at line 182 of file btTransform.h.

SIMD_FORCE_INLINE btTransform& btTransform::operator= ( const btTransform other) [inline]

Assignment Operator.

Definition at line 69 of file btTransform.h.

SIMD_FORCE_INLINE void btTransform::serialize ( struct btTransformData &  dataOut) const

Definition at line 269 of file btTransform.h.

References btMatrix3x3::serialize().

SIMD_FORCE_INLINE void btTransform::serializeFloat ( struct btTransformFloatData dataOut) const
SIMD_FORCE_INLINE void btTransform::setBasis ( const btMatrix3x3 basis) [inline]
void btTransform::setFromOpenGLMatrix ( const btScalar m) [inline]

Set from an array.

Parameters:
mA pointer to a 15 element array (12 rotation(row major padded on the right by 1), and 3 translation

Definition at line 133 of file btTransform.h.

References btMatrix3x3::setFromOpenGLSubMatrix().

Referenced by plSetOpenGLMatrix().

void btTransform::setIdentity ( ) [inline]

Set this transformation to the identity.

Definition at line 174 of file btTransform.h.

References btMatrix3x3::setIdentity().

Referenced by btHinge2Constraint::btHinge2Constraint(), btMinkowskiSumShape::btMinkowskiSumShape(), btRigidBody::btRigidBodyConstructionInfo::btRigidBodyConstructionInfo(), btSingleRayCallback::btSingleRayCallback(), btSoftSingleRayCallback::btSoftSingleRayCallback(), btUniversalConstraint::btUniversalConstraint(), btContinuousConvexCollision::calcTimeOfImpact(), btGjkConvexCast::calcTimeOfImpact(), btConeShape::calculateLocalInertia(), btCapsuleShape::calculateLocalInertia(), btPolyhedralConvexShape::calculateLocalInertia(), btSoftBodyConcaveCollisionAlgorithm::calculateTimeOfImpact(), btConvexConcaveCollisionAlgorithm::calculateTimeOfImpact(), CcdShapeConstructionInfo::CcdShapeConstructionInfo(), btCollisionWorld::convexSweepTest(), CcdPhysicsEnvironment::CreateConeController(), CcdPhysicsEnvironment::CreateSphereController(), btDiscreteDynamicsWorld::debugDrawConstraint(), btCollisionWorld::debugDrawObject(), DefaultMotionState::DefaultMotionState(), btSparseSdf< 3 >::DistanceToShape(), btIDebugDraw::drawSphere(), btGImpactCompoundShape::CompoundPrimitiveManager::get_primitive_box(), btCollisionShape::getBoundingSphere(), btSoftBody::initDefaults(), btSoftBody::initializeClusters(), btTriangleMeshShape::localGetSupportingVertex(), plAddChildShape(), plCreateRigidBody(), plNearestPoints(), btSoftBody::rotate(), btGeneric6DofSpringConstraint::setAxis(), btGeneric6DofConstraint::setAxis(), btUniversalConstraint::setAxis(), btSoftBodyTriangleCallback::setTimeStepAndCounters(), btConeTwistConstraint::solveConstraintObsolete(), btKinematicCharacterController::stepDown(), btKinematicCharacterController::stepForwardAndStrafe(), btKinematicCharacterController::stepUp(), btSoftBody::translate(), and btKinematicCharacterController::warp().

SIMD_FORCE_INLINE void btTransform::setOrigin ( const btVector3 &  origin) [inline]

Set the translational element.

Parameters:
originThe vector to set the translation to

Definition at line 152 of file btTransform.h.

Referenced by btHinge2Constraint::btHinge2Constraint(), btSingleRayCallback::btSingleRayCallback(), btSoftSingleRayCallback::btSoftSingleRayCallback(), btUniversalConstraint::btUniversalConstraint(), btMinkowskiPenetrationDepthSolver::calcPenDepth(), btConvexTriangleMeshShape::calculatePrincipalAxisTransform(), CcdPhysicsEnvironment::createConstraint(), CcdPhysicsEnvironment::CreateSphereController(), btDiscreteDynamicsWorld::debugDrawConstraint(), btCollisionWorld::debugDrawObject(), btIDebugDraw::drawSphere(), CcdPhysicsController::forceWorldTransform(), GIM_TRIANGLE::get_triangle_transform(), CcdPhysicsController::GetTransformFromMotionState(), BlenderBulletMotionState::getWorldTransform(), btSoftBody::initializeClusters(), btTransformUtil::integrateTransform(), plAddChildShape(), btKinematicCharacterController::playerStep(), plSetPosition(), btKinematicCharacterController::recoverFromPenetration(), CcdPhysicsController::RelativeTranslate(), btUniversalConstraint::setAxis(), CcdPhysicsController::setPosition(), btSoftBodyTriangleCallback::setTimeStepAndCounters(), CcdPhysicsController::setWorldOrientation(), DefaultMotionState::setWorldPosition(), btKinematicCharacterController::stepDown(), btKinematicCharacterController::stepForwardAndStrafe(), btKinematicCharacterController::stepUp(), btSoftBody::translate(), btSoftBody::updateClusters(), btRaycastVehicle::updateWheelTransform(), and btKinematicCharacterController::warp().

SIMD_FORCE_INLINE void btTransform::setRotation ( const btQuaternion q) [inline]

The documentation for this class was generated from the following file: