Class JointVariables

java.lang.Object
  |
  +--JointVariables

public class JointVariables
extends java.lang.Object
implements java.lang.Cloneable

A class to hold the set of Joint objects for the Robot. Although traditional robotics literature uses the term 'joint variables' to describe the position of specific joint, this class uses the same term because in a round about way it does the same thing: specifying the position of the Robot's degrees of freedom.

See Also:
SimulationEngine, Robot, Joint, Degree

Constructor Summary
JointVariables()
          Class constructor, initializes the variables.
 
Method Summary
 void addJoint(Joint joint)
          Add a joint to the set of joint variables.
 java.lang.Object clone()
          Implements clone(), returning an Object copy of the JointVariables.
 int countJoints()
          Returns the number of Joints in the JointVariables object.
 Degree getDegree(java.lang.String name)
          Returns the named Degree.
 Joint getJoint(int index)
          Returns the requested joint.
 Joint getJoint(java.lang.String name)
          Returns the Joint containing the named Degree.
 java.util.Enumeration getJoints()
          Returns all the Joint objects as an Enumeration object.
 java.util.Hashtable getNameTable()
          Returns the current Hashtable associating names with IndexPair objects.
 void home()
          Returns the Robot to its home position, as specified by the configuration parameters used to create the robot.
 boolean IsInRange()
          Determines if the set of joint angles is within the joint space.
 void setNameTable(java.util.Hashtable names)
          Sets the Hashtable associating names with an IndexPair object, allowing a specific Degree to be fetched by name.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JointVariables

public JointVariables()
Class constructor, initializes the variables.
Method Detail

addJoint

public void addJoint(Joint joint)
Add a joint to the set of joint variables.
Parameters:
joint - the Joint to be added to the JointVariables object.

getJoint

public Joint getJoint(int index)
Returns the requested joint.
Parameters:
index - the index of the requested joint.
Returns:
the requested Joint.

getJoint

public Joint getJoint(java.lang.String name)
Returns the Joint containing the named Degree.
Parameters:
name - the name of the Joint to return.
Returns:
the Joint containing the named Degree.

getDegree

public Degree getDegree(java.lang.String name)
Returns the named Degree.
Parameters:
name - the name of the requested Degree.
Returns:
the requested Degree.

getJoints

public java.util.Enumeration getJoints()
Returns all the Joint objects as an Enumeration object.
Returns:
the Enumeration of Joint objects.

countJoints

public int countJoints()
Returns the number of Joints in the JointVariables object.
Returns:
the number of Joints in the object.

setNameTable

public void setNameTable(java.util.Hashtable names)
Sets the Hashtable associating names with an IndexPair object, allowing a specific Degree to be fetched by name.
Parameters:
names - the Hashtable of names.

getNameTable

public java.util.Hashtable getNameTable()
Returns the current Hashtable associating names with IndexPair objects.
Returns:
the current name Hashtable being used.

IsInRange

public boolean IsInRange()
Determines if the set of joint angles is within the joint space.
Returns:
indicates true if the JointVariables object is inside joint space.

home

public void home()
Returns the Robot to its home position, as specified by the configuration parameters used to create the robot.

clone

public java.lang.Object clone()
Implements clone(), returning an Object copy of the JointVariables.
Returns:
the Object copy of this object.
Overrides:
clone in class java.lang.Object