All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class primitives.machines.Inversor1

java.lang.Object
   |
   +----primitives.machines.Machine
           |
           +----primitives.machines.Inversor1

public class Inversor1
extends Machine
implements FunctionalLinkage
A class encapsulating an Inversor Linkage:ouput=conjugate(1/input)

See Also:
FunctionalLinkage

Variable Index

 o a
The length of the bars connecting the anchor & the supporting joints
 o activeJoint
The acitive joint is the joint the mouse pointer is over.
 o b
The length of the bars connecting the supporting joints and the input/output joints
 o def
 o inputs
Store the location of the input joint
 o inputStr
 o jointStr1
 o origin
The location on the canvas of the relative orign
 o output
Stores a copy of the output joint location
 o outputStr
 o parameters
stores a copy of a and b
 o radius
The radius of inversion
 o temp
Used by mouseMoved method

Constructor Index

 o Inversor1(Rectangle)

Method Index

 o forceInputJoints(Coordinate[])
 o getActiveJoint()
 o getActiveStr(int)
 o getInputJoints()
 o getOutputJoints()
 o getParameters()
 o mouseDragged(MouseEvent)
 o mouseMoved(MouseEvent)
 o redraw(Graphics)
Implementation of the MachineListener interface.
 o setActiveJoint(int)
 o setInputJoints(Coordinate[])
 o setParameters(double[])

Variables

 o a
 double a
The length of the bars connecting the anchor & the supporting joints

 o b
 double b
The length of the bars connecting the supporting joints and the input/output joints

 o radius
 double radius
The radius of inversion

 o output
 Coordinate output[]
Stores a copy of the output joint location

 o inputs
 Coordinate inputs[]
Store the location of the input joint

 o parameters
 double parameters[]
stores a copy of a and b

See Also:
a, b
 o origin
 Point origin
The location on the canvas of the relative orign

 o activeJoint
 int activeJoint
The acitive joint is the joint the mouse pointer is over.

See Also:
mouseMoved
 o temp
 private Coordinate temp
Used by mouseMoved method

 o def
 static final String def
 o inputStr
 static final String inputStr
 o outputStr
 static final String outputStr
 o jointStr1
 static final String jointStr1

Constructors

 o Inversor1
 public Inversor1(Rectangle d)

Methods

 o setParameters
 public void setParameters(double parameters[]) throws MachineException
Parameters:
parameters - contains the new values for a and b.
Throws: MachineException
if a>radius.
See Also:
setParameters
 o getParameters
 public double[] getParameters()
Returns:
a and b.
See Also:
getParameters
 o forceInputJoints
 public Coordinate[] forceInputJoints(Coordinate inputs[])
See Also:
forceInputJoints
 o setInputJoints
 public Coordinate[] setInputJoints(Coordinate input[]) throws MachineException
Throws: MachineException
if the new location for the input joint is not valid.
See Also:
setInputJoints
 o getInputJoints
 public Coordinate[] getInputJoints()
See Also:
getInputJoints
 o getOutputJoints
 public Coordinate[] getOutputJoints()
See Also:
getInputJoints
 o redraw
 public void redraw(Graphics g)
Implementation of the MachineListener interface.

Overrides:
redraw in class Machine
 o mouseMoved
 public int mouseMoved(MouseEvent m)
See Also:
mouseMoved
 o mouseDragged
 public void mouseDragged(MouseEvent m) throws MachineException
Throws: MachineException
if the new location for the active joint is not valid.
See Also:
mouseDragged
 o getActiveStr
 public String getActiveStr(int activeJoint)
See Also:
getActiveStr
 o getActiveJoint
 public int getActiveJoint()
See Also:
getActiveJoint
 o setActiveJoint
 public void setActiveJoint(int activeJoint)
See Also:
setActiveJoint

All Packages  Class Hierarchy  This Package  Previous  Next  Index