#include <Joint.h>
Inheritance diagram for Joint:
Public Member Functions | |
Joint () | |
virtual std::string | getKind () const |
virtual void | addToLists (std::vector< Sensorport * > &sensorportList, std::vector< Actuatorport * > &actuatorportList, std::vector< Actuator * > &actuatorList) |
virtual void | addToDescriptions (std::vector< ObjectDescription > &objectDescriptionTree, int depth) |
virtual void | setValue (double value, int port) |
virtual void | computeValue (double &value, int portId) |
virtual void | act (bool initial) |
virtual SimObject * | clone () const |
void | setMaxSpeed (double value) |
void | setMaxValue (double value) |
void | setMinValue (double value) |
void | setInitialValue (double value) |
void | setJointType (JointType jointType) |
void | setAxisType (AxisType axisType) |
virtual double | getMaxValue (int portId) const |
virtual double | getMinValue (int portId) const |
Protected Attributes | |
JointType | jointType |
AxisType | axisType |
double | maxValue |
double | minValue |
double | maxSpeed |
double | currentValue |
double | destValue |
Definition at line 38 of file Joint.h.
Joint::Joint | ( | ) |
void Joint::act | ( | bool | initial | ) | [virtual] |
Let the actuator do what it is supposed to do
initial | Is this the initial step? |
Implements Actuator.
Definition at line 67 of file Joint.cpp.
References axisType, SimObject::childNodes, currentValue, destValue, jointType, Vector3d::normalize(), SimObject::position, Vector3d::rotate(), SimObject::rotation, rotationJoint, Matrix3d::setRotationAroundAxis(), Vector3d::v, xAxis, yAxis, and zAxis.
void Joint::addToDescriptions | ( | std::vector< ObjectDescription > & | objectDescriptionTree, | |
int | depth | |||
) | [virtual] |
Adds descriptions of the object and its children to a list
objectDescriptionTree | The list of descriptions | |
The | depth of the object in the object tree |
Reimplemented from SimObject.
Definition at line 37 of file Joint.cpp.
References SimObject::addToDescriptions(), ObjectDescription::depth, SimObject::fullName, ObjectDescription::fullName, ObjectDescription::name, OBJECT_TYPE_ACTUATORPORT, OBJECT_TYPE_SENSORPORT, and ObjectDescription::type.
void Joint::addToLists | ( | std::vector< Sensorport * > & | sensorportList, | |
std::vector< Actuatorport * > & | actuatorportList, | |||
std::vector< Actuator * > & | actuatorList | |||
) | [virtual] |
Adds the object to some internal lists
sensorportList | A list of all sensor ports in the scene | |
actuatorportList | A list of all actuator ports in the scene | |
actuatorList | A list of all actuators in the scene |
Reimplemented from SimObject.
Definition at line 25 of file Joint.cpp.
References doubleSensor, maxValue, and minValue.
SimObject * Joint::clone | ( | ) | const [virtual] |
Clones the object and its child nodes
Reimplemented from SimObject.
Definition at line 125 of file Joint.cpp.
References SimObject::addChildNode(), axisType, SimObject::childNodes, destValue, SimObject::fullName, Joint(), jointType, maxSpeed, maxValue, minValue, SimObject::name, SimObject::position, SimObject::rotation, SimObject::setFullName(), SimObject::setName(), and SimObject::setPosition().
void Joint::computeValue | ( | double & | value, | |
int | portId | |||
) | [virtual] |
Computes the position of the joint
value | The value | |
portId | The id of the sensorport |
Reimplemented from Sensor.
Definition at line 120 of file Joint.cpp.
References currentValue, and M_PI.
virtual std::string Joint::getKind | ( | ) | const [inline, virtual] |
virtual double Joint::getMaxValue | ( | int | portId | ) | const [inline, virtual] |
virtual double Joint::getMinValue | ( | int | portId | ) | const [inline, virtual] |
void Joint::setAxisType | ( | AxisType | axisType | ) |
Sets the axis type
axisType | The axis type |
Definition at line 205 of file Joint.cpp.
Referenced by SAX2Handler::parseJointAttributes().
void Joint::setInitialValue | ( | double | value | ) |
Sets the initial value
value | The initial value |
Definition at line 176 of file Joint.cpp.
References destValue, jointType, M_PI, and rotationJoint.
Referenced by SAX2Handler::parseJointAttributes().
void Joint::setJointType | ( | JointType | jointType | ) |
Sets the joint type
jointType | The joint type |
Definition at line 185 of file Joint.cpp.
References M_PI, maxSpeed, maxValue, minValue, and rotationJoint.
Referenced by SAX2Handler::parseJointAttributes().
void Joint::setMaxSpeed | ( | double | value | ) |
Sets the maximum speed
value | The maximum speed |
Definition at line 149 of file Joint.cpp.
References jointType, M_PI, maxSpeed, and rotationJoint.
Referenced by SAX2Handler::parseJointAttributes().
void Joint::setMaxValue | ( | double | value | ) |
Sets the maximum value
value | The maximum value |
Definition at line 158 of file Joint.cpp.
References maxValue.
Referenced by SAX2Handler::parseJointAttributes().
void Joint::setMinValue | ( | double | value | ) |
Sets the minimum value
value | The minimum value |
Definition at line 167 of file Joint.cpp.
References minValue.
Referenced by SAX2Handler::parseJointAttributes().
void Joint::setValue | ( | double | value, | |
int | port | |||
) | [virtual] |
AxisType Joint::axisType [protected] |
double Joint::currentValue [protected] |
The current value of the joint
Definition at line 52 of file Joint.h.
Referenced by act(), computeValue(), and Joint().
double Joint::destValue [protected] |
The current destination value
Definition at line 54 of file Joint.h.
Referenced by act(), clone(), Joint(), setInitialValue(), and setValue().
JointType Joint::jointType [protected] |
The type of the joint
Definition at line 42 of file Joint.h.
Referenced by act(), clone(), Joint(), setInitialValue(), setMaxSpeed(), and setValue().
double Joint::maxSpeed [protected] |
The speed of the joint
Definition at line 50 of file Joint.h.
Referenced by clone(), Joint(), setJointType(), and setMaxSpeed().
double Joint::maxValue [protected] |
The maximum value
Definition at line 46 of file Joint.h.
Referenced by addToLists(), clone(), getMaxValue(), Joint(), setJointType(), and setMaxValue().
double Joint::minValue [protected] |
The minimum value
Definition at line 48 of file Joint.h.
Referenced by addToLists(), clone(), getMinValue(), Joint(), setJointType(), and setMinValue().