Cyclone Cyclone: cyclone::Joint Class Reference

cyclone::Joint Class Reference

Joints link together two rigid bodies and make sure they do not separate. More...

#include <joints.h>

Inheritance diagram for cyclone::Joint:

Inheritance graph
[legend]
Collaboration diagram for cyclone::Joint:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void set (RigidBody *a, const Vector3 &a_pos, RigidBody *b, const Vector3 &b_pos, real error)
 Configures the joint in one go.
unsigned addContact (Contact *contact, unsigned limit) const
 Generates the contacts required to restore the joint if it has been violated.

Public Attributes

RigidBodybody [2]
 Holds the two rigid bodies that are connected by this joint.
Vector3 position [2]
 Holds the relative location of the connection for each body, given in local coordinates.
real error
 Holds the maximum displacement at the joint before the joint is considered to be violated.

Detailed Description

Joints link together two rigid bodies and make sure they do not separate.

In a general phyiscs engine there may be many different types of joint, that reduce the number of relative degrees of freedom between two objects. This joint is a common position joint: each object has a location (given in body-coordinates) that will be kept at the same point in the simulation.


Member Function Documentation

unsigned cyclone::Joint::addContact Contact contact,
unsigned  limit
const [virtual]
 

Generates the contacts required to restore the joint if it has been violated.

Implements cyclone::ContactGenerator.

void cyclone::Joint::set RigidBody a,
const Vector3 a_pos,
RigidBody b,
const Vector3 b_pos,
real  error
 

Configures the joint in one go.


Member Data Documentation

RigidBody* cyclone::Joint::body[2]
 

Holds the two rigid bodies that are connected by this joint.

real cyclone::Joint::error
 

Holds the maximum displacement at the joint before the joint is considered to be violated.

This is normally a small, epsilon value. It can be larger, however, in which case the joint will behave as if an inelastic cable joined the bodies at their joint locations.

Vector3 cyclone::Joint::position[2]
 

Holds the relative location of the connection for each body, given in local coordinates.


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