overview wiki api reference download
 All Classes Functions Variables Typedefs Enumerations Enumerator
Public Member Functions | Protected Member Functions
gameplay::PhysicsGenericConstraint Class Reference

#include <PhysicsGenericConstraint.h>

Inheritance diagram for gameplay::PhysicsGenericConstraint:
gameplay::PhysicsConstraint gameplay::PhysicsFixedConstraint gameplay::PhysicsSpringConstraint

List of all members.

Public Member Functions

const QuaterniongetRotationOffsetA () const
const QuaterniongetRotationOffsetB () const
const Vector3getTranslationOffsetA () const
const Vector3getTranslationOffsetB () const
void setAngularLowerLimit (const Vector3 &limits)
void setAngularUpperLimit (const Vector3 &limits)
void setLinearLowerLimit (const Vector3 &limits)
void setLinearUpperLimit (const Vector3 &limits)
void setRotationOffsetA (const Quaternion &rotationOffset)
void setRotationOffsetB (const Quaternion &rotationOffset)
void setTranslationOffsetA (const Vector3 &translationOffset)
void setTranslationOffsetB (const Vector3 &translationOffset)

Protected Member Functions

 PhysicsGenericConstraint ()
 PhysicsGenericConstraint (PhysicsRigidBody *a, PhysicsRigidBody *b)
 PhysicsGenericConstraint (PhysicsRigidBody *a, const Quaternion &rotationOffsetA, const Vector3 &translationOffsetA, PhysicsRigidBody *b, const Quaternion &rotationOffsetB, const Vector3 &translationOffsetB)
virtual ~PhysicsGenericConstraint ()

Detailed Description

Defines a completely generic constraint between two rigid bodies (or one rigid body and the world) where the limits for all six degrees of freedom can be set individually.

See also:
http://gameplay3d.github.io/GamePlay/docs/file-formats.html#wiki-Constraints

Constructor & Destructor Documentation

Constructor.

Note: This should only used by subclasses that do not want the _constraint member variable to be initialized.

Creates a generic constraint so that the rigid body (or bodies) is (are) constrained to its (their) current world position(s).

Parameters:
aThe first (possibly only) rigid body to constrain. If this is the only rigid body specified the constraint applies between it and the global physics world object.
bThe second rigid body to constrain (optional).
gameplay::PhysicsGenericConstraint::PhysicsGenericConstraint ( PhysicsRigidBody a,
const Quaternion rotationOffsetA,
const Vector3 translationOffsetA,
PhysicsRigidBody b,
const Quaternion rotationOffsetB,
const Vector3 translationOffsetB 
) [protected]

Creates a generic constraint.

Parameters:
aThe first (possibly only) rigid body to constrain. If this is the only rigid body specified the constraint applies between it and the global physics world object.
rotationOffsetAThe rotation offset for the first rigid body (in its local space) with respect to the constraint joint.
translationOffsetAThe translation offset for the first rigid body (in its local space) with respect to the constraint joint.
bThe second rigid body to constrain (optional).
rotationOffsetBThe rotation offset for the second rigid body (in its local space) with respect to the constraint joint (optional).
translationOffsetBThe translation offset for the second rigid body (in its local space) with respect to the constraint joint (optional).

Destructor.


Member Function Documentation

Gets the rotation offset for the first rigid body in the constraint.

Returns:
The rotation offset.

Gets the rotation offset for the second rigid body in the constraint.

Returns:
The rotation offset.

Gets the translation offset for the first rigid body in the constraint.

Returns:
The translation offset.

Gets the translation offset for the second rigid body in the constraint.

Returns:
The translation offset.

Sets the lower angular limits (as Euler angle limits) along the constraint's local X, Y, and Z axes using the values in the given vector.

Parameters:
limitsThe lower angular limits (as Euler angle limits) along the local X, Y, and Z axes.

Reimplemented in gameplay::PhysicsFixedConstraint.

Sets the upper angular limits (as Euler angle limits) along the constraint's local X, Y, and Z axes using the values in the given vector.

Parameters:
limitsThe upper angular limits (as Euler angle limits) along the local X, Y, and Z axes.

Reimplemented in gameplay::PhysicsFixedConstraint.

Sets the lower linear limits along the constraint's local X, Y, and Z axes using the values in the given vector.

Parameters:
limitsThe lower linear limits along the local X, Y, and Z axes.

Reimplemented in gameplay::PhysicsFixedConstraint.

Sets the upper linear limits along the constraint's local X, Y, and Z axes using the values in the given vector.

Parameters:
limitsThe upper linear limits along the local X, Y, and Z axes.

Reimplemented in gameplay::PhysicsFixedConstraint.

void gameplay::PhysicsGenericConstraint::setRotationOffsetA ( const Quaternion rotationOffset) [inline]

Sets the rotation offset for the first rigid body in the constraint.

Parameters:
rotationOffsetThe rotation offset.
void gameplay::PhysicsGenericConstraint::setRotationOffsetB ( const Quaternion rotationOffset) [inline]

Sets the rotation offset for the second rigid body in the constraint.

Parameters:
rotationOffsetThe rotation offset.
void gameplay::PhysicsGenericConstraint::setTranslationOffsetA ( const Vector3 translationOffset) [inline]

Sets the translation offset for the first rigid body in the constraint.

Parameters:
translationOffsetThe translation offset.
void gameplay::PhysicsGenericConstraint::setTranslationOffsetB ( const Vector3 translationOffset) [inline]

Sets the translation offset for the second rigid body in the constraint.

Parameters:
translationOffsetThe translation offset.
 All Classes Functions Variables Typedefs Enumerations Enumerator