All Packages  Class Hierarchy  This Package  Previous  Next  Index
  Class primitives.machines.TwoArmsMachine
java.lang.Object
   |
   +----primitives.machines.Machine
           |
           +----primitives.machines.NarmsMachine
                   |
                   +----primitives.machines.TwoArmsMachine
  -  public class TwoArmsMachine
  
-  extends NarmsMachine
  
Class used to control the motion of a 2-arms machine.
 Used by the TwoArmsSpaceDemo applet.
    -  See Also:
    
 -  TwoArmsSpaceDemo
 
  
  -  
	angles
   -  The limit angles of motion [should be private]
 
  
  -  
	TwoArmsMachine(Dimension, double, int)
   -  initializes the machines and checks the limit angles of its motion.
 
  
  -  
	finalize()
   -  
  
 -  
	redraw(Graphics)
   -   draws the machine using a specified graphic context.
  
 -  
	rotateJoint(int, double)
   -   rotates the central joint relative to a given periferial joint.
 
  
angles
 public double angles[]
  -  The limit angles of motion [should be private]
 
  
TwoArmsMachine
 public TwoArmsMachine(Dimension d,
                       double ratio,
                       int i)
  -  initializes the machines and checks the limit angles of its motion.
  
    -  Parameters:
    
 -  d - the size of the rectangle the machine should be drawn in.
    
-  ratio - see Machine
    
-  i - the arm to rotate 0 or 1.
  
   
 
 
  
rotateJoint
 public void rotateJoint(int i,
                         double dalpha) throws MachineException
  -  rotates the central joint relative to a given periferial joint.
  
    -  Parameters:
    
 -  i - the relative joint to use.
    
-  dalpha - the amount in radians to rotate.
    
  -  Throws: MachineException
    
 -  if the rotation is nt pysically possible.
    
 -  See Also:
    
 -  rotateJoint
  
 
 
 
redraw
 public void redraw(Graphics g)
  -  draws the machine using a specified graphic context.
  
    -  Parameters:
    
 -  g - the graphic context to draw to.
    
 -  Overrides:
    
 -  redraw in class NarmsMachine
    
 -  See Also:
    
 -  MachineListener
  
 
 
 
finalize
 public void finalize() throws Throwable
  
    -  Throws: Throwable
    
 -  .
    
 -  Overrides:
    
 -  finalize in class NarmsMachine
  
 
 
All Packages  Class Hierarchy  This Package  Previous  Next  Index