#include <kt_joint.hxx>


Public Types | |
| enum | KT_rotate_e { ROTATE_SPHERICAL = 0, ROTATE_REVOLUTE, ROTATE_NONE } |
| Enumerator for the rotation types. More... | |
| enum | KT_translate_e { TRANSLATE_NONE = 0, TRANSLATE_I, TRANSLATE_J, TRANSLATE_K, TRANSLATE_ANY } |
| Enumerator for the translation types. More... | |
Public Member Functions | |
| double | get_angle () const |
| For a revolute joint returns the angle between the constrained EDGEs. | |
| double | get_distance () const |
| const KT_geometry_locator * | get_locator_1 () const |
| const KT_geometry_locator * | get_locator_2 () const |
| KT_manipulator * | get_manipulator () |
| const wchar_t * | get_name () const |
| KT_joint::KT_rotate_e | get_rotate_type () const |
| const SPAinterval & | get_translate_interval () const |
| KT_joint::KT_translate_e | get_translate_type () const |
| virtual char * | get_type () const |
| virtual logical | initialize () |
| Initialize the joint. | |
| KT_joint (const wchar_t *p_name, KT_manipulator *p_manipulator, KT_geometry_locator *p_locator_1, KT_geometry_locator *p_locator_2, const KT_rotate_e rotate_type, const SPAinterval rotate_interval, const KT_translate_e translate_type, const SPAinterval translate_interval) | |
| Initializes the member variables from the input data. | |
| virtual logical | log_step (const int timestep, KT_scene_log_text *p_log) |
| Adds the joint information to the log for a step. | |
| virtual logical | make_cosmetics () |
| Make any cosmetic data. | |
| virtual void | reset () |
| Set joint angles and distances back to their initial positions. | |
| virtual void | update () |
| Update the joint information from the modified link positions. | |
Protected Attributes | |
| double | m_angle |
| Angle between the "i" directions of the two locators. | |
| double | m_distance |
| Distance between "common" vertices of the two locators. | |
| KT_geometry_locator * | m_locator_1 |
| First locator referenced in the joint. | |
| KT_geometry_locator * | m_locator_2 |
| Second locator referenced in the joint. | |
| KT_manipulator * | m_manipulator |
| Owning manipulator. | |
| SPAinterval | m_rotate_interval |
| Range of rotational motion allowed at the joint. | |
| KT_rotate_e | m_rotate_type |
| Type of rotational motion allowed at the joint. | |
| SPAinterval | m_translate_interval |
| Range of translational motion allowed at the joint. | |
| KT_translate_e | m_translate_type |
| Type of translational motion allowed at the joint. | |
This object describes a joint between two links in terms of the movement that is allowed between the links.
It acts as a base class for the addition of solving functionality. It is left up to applications to use the joint description as input to a solver.
Additionaly this base class provides a log of the joint angles or distances each step of a simulation. To customise the logging sub-class the object and override the log_step method.
Two sorts of joint movement are allowed, rotational and translational, the values of the member variales m_rotate_type and m_translate_type are used to control what sort of constraints which are created for in constraint manager workspace.
Enumerator for the rotation types.
Enumerator for the translation types.
| TRANSLATE_NONE |
Fixed in space, the common VERTEX of each locator is constrained to be coincident. |
| TRANSLATE_I |
Allow translation along i direction. The VERTEX of the second locator is constrained to lie on the "i". |
| TRANSLATE_J |
Allow translation along j direction. The VERTEX of the second locator is constrained to lie on the "j" EDGE of the first locator. |
| TRANSLATE_K |
Allow translation along k direction. The VERTEX of the second locator is constrained to lie on the "k" EDGE of the first locator. |
| TRANSLATE_ANY | Allow translation in any direction. |
| KT_joint::KT_joint | ( | const wchar_t * | p_name, | |
| KT_manipulator * | p_manipulator, | |||
| KT_geometry_locator * | p_locator_1, | |||
| KT_geometry_locator * | p_locator_2, | |||
| const KT_rotate_e | rotate_type, | |||
| const SPAinterval | rotate_interval, | |||
| const KT_translate_e | translate_type, | |||
| const SPAinterval | translate_interval | |||
| ) |
Initializes the member variables from the input data.
KT_joint::initialize is called.| name | Name of the element in the scene. | |
| p_locator_1 | First locator that is constrained by the joint. | |
| p_locator_2 | Second locator that is constrained by the joint. | |
| rotate_type | The type of rotation that is allowed at the joint | |
| rotate_interval | The range of the rotation that is allowed. | |
| rotate_type | The type of translation that is allowed at the joint | |
| translate_interval | The range of the translation that is allowed. |
| double KT_joint::get_angle | ( | ) | const |
For a revolute joint returns the angle between the constrained EDGEs.
| double KT_joint::get_distance | ( | ) | const |
| const KT_geometry_locator* KT_joint::get_locator_1 | ( | ) | const [inline] |
| const KT_geometry_locator* KT_joint::get_locator_2 | ( | ) | const [inline] |
| KT_manipulator* KT_joint::get_manipulator | ( | ) | [inline] |
| const wchar_t* KT_list_entry::get_name | ( | ) | const [inline, inherited] |
| KT_joint::KT_rotate_e KT_joint::get_rotate_type | ( | ) | const [inline] |
| const SPAinterval& KT_joint::get_translate_interval | ( | ) | const [inline] |
| KT_joint::KT_translate_e KT_joint::get_translate_type | ( | ) | const [inline] |
| virtual char* KT_joint::get_type | ( | ) | const [inline, virtual] |
Implements KT_list_entry.
Reimplemented in KT_GGCM_joint.
| virtual logical KT_joint::initialize | ( | ) | [virtual] |
Initialize the joint.
| virtual logical KT_joint::log_step | ( | const int | timestep, | |
| KT_scene_log_text * | p_log | |||
| ) | [virtual] |
Adds the joint information to the log for a step.
| timestep | The current timestep in the simulation. | |
| p_log | Text item to log text into. |
| virtual logical KT_joint::make_cosmetics | ( | ) | [virtual] |
Make any cosmetic data.
| virtual void KT_joint::reset | ( | ) | [virtual] |
Set joint angles and distances back to their initial positions.
| virtual void KT_joint::update | ( | ) | [virtual] |
Update the joint information from the modified link positions.
double KT_joint::m_angle [protected] |
Angle between the "i" directions of the two locators.
double KT_joint::m_distance [protected] |
Distance between "common" vertices of the two locators.
KT_geometry_locator* KT_joint::m_locator_1 [protected] |
First locator referenced in the joint.
KT_geometry_locator* KT_joint::m_locator_2 [protected] |
Second locator referenced in the joint.
KT_manipulator* KT_joint::m_manipulator [protected] |
Owning manipulator.
SPAinterval KT_joint::m_rotate_interval [protected] |
Range of rotational motion allowed at the joint.
KT_rotate_e KT_joint::m_rotate_type [protected] |
Type of rotational motion allowed at the joint.
SPAinterval KT_joint::m_translate_interval [protected] |
Range of translational motion allowed at the joint.
KT_translate_e KT_joint::m_translate_type [protected] |
Type of translational motion allowed at the joint.