Klamp't  0.9.0
Public Member Functions | Public Attributes | List of all members
Klampt::ODEJoint Struct Reference

A joint between two objects. More...

#include <ODESimulator.h>

Public Member Functions

void MakeFixed ()
 Initializes a fixed joint at the objects' current poses.
 
void MakeHinge (const Vector3 &pt, const Vector3 &axis)
 Initializes a hinge joint at the objects' current poses, with world-space axis passing through pt with direction axis.
 
void MakeSlider (const Vector3 &dir)
 Initializes a slider joint at the objects' current poses, with world-space axis dir.
 
void Destroy ()
 Deallocates this joint. It can be re-allocated using MakeX.
 
Real GetPosition ()
 Returns the current position of this joint.
 
Real GetVelocity ()
 Returns the current velocity of this joint.
 
void SetLimits (Real min, Real max)
 Sets the joint limits.
 
void SetBounce (Real coeff)
 Sets the bounce parameter.
 
void SetFriction (Real coeff)
 Sets dry friction on this joint.
 
void SetFixedVelocity (Real vel, Real fmax)
 Sets a fixed velocity motor with target velocity vel max force fmax.
 
void AddForce (Real f)
 Adds a force on this joint to be applied for the next time step.
 
void GetConstraintForces (Vector3 &f1, Vector3 &t1, Vector3 &f2, Vector3 &t2)
 Retrieves the solved constraint forces/torques from the prior time step. These are all in world coordinates.
 

Public Attributes

int type
 
ODEObjectID o1
 
ODEObjectID o2
 
ODESimulatorsim
 
dJointID joint
 
dJointFeedback feedback
 

Detailed Description

A joint between two objects.

Should be set up by the simulation using AddJoint. o2 may be left uninitialized.


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