All Packages Class Hierarchy This Package Previous Next Index
Class primitives.machines.Translator1
java.lang.Object
|
+----primitives.machines.Machine
|
+----primitives.machines.Translator1
- public class Translator1
- extends Machine
- implements FunctionalLinkage
A class encapsulating the Translator Linkage
- See Also:
- Adder
-
activeJoint
-
-
anchorStr
-
-
def
-
-
heights
- Stores the 2 heights of the parallograms.
-
inputs
- Used to store a copy of the input location
-
inputStr
-
-
jointStr
-
-
origin
- The relative origin, initialized to the location of the first anchor
-
output
- Used to store a copy of the output joint location.
-
outputStr
-
-
parameters
-
-
temp
-
-
translator
- The vector of translation
-
Translator1(Point, Coordinate)
-
-
forceInputJoints(Coordinate[])
-
-
getActiveJoint()
-
-
getActiveStr(int)
-
-
getInputJoints()
-
-
getOutputJoints()
-
-
getParameters()
-
-
mouseDragged(MouseEvent)
-
-
mouseMoved(MouseEvent)
-
-
redraw(Graphics)
- Draws the translator linkage
-
setActiveJoint(int)
-
-
setInputJoints(Coordinate[])
-
-
setParameters(double[])
-
translator
Coordinate translator
- The vector of translation
output
Coordinate output[]
- Used to store a copy of the output joint location.
inputs
Coordinate inputs[]
- Used to store a copy of the input location
heights
double heights[]
- Stores the 2 heights of the parallograms.
origin
Point origin
- The relative origin, initialized to the location of the first anchor
parameters
double parameters[]
activeJoint
int activeJoint
temp
Coordinate temp
jointStr
static final String jointStr
inputStr
static final String inputStr
anchorStr
static final String anchorStr
outputStr
static final String outputStr
def
static final String def
Translator1
public Translator1(Point startPoint,
Coordinate translator)
- Parameters:
- startPoint - the location of the first anchor.
- translator - the translaton vetor in polar coordinates
forceInputJoints
public Coordinate[] forceInputJoints(Coordinate inputs[])
- Parameters:
- inputs - the first member of the array is used to force the location of
the input joint.
- Returns:
- a 1 size array containing the location of the output joint.
- See Also:
- FunctionalLinkage
setInputJoints
public Coordinate[] setInputJoints(Coordinate inputJoints[]) throws MachineException
- Parameters:
- inputJoints - the location of the input joint is set to the first member of this array
- Throws: MachineException
- if the new locations for the input joint is not valid.
- See Also:
- FunctionalLinkage
getOutputJoints
public Coordinate[] getOutputJoints()
- See Also:
- FunctionalLinkage
getInputJoints
public Coordinate[] getInputJoints()
- See Also:
- FunctionalLinkage
redraw
public void redraw(Graphics g)
- Draws the translator linkage
- Parameters:
- g - the graphic context to draw to
- Overrides:
- redraw in class Machine
getParameters
public double[] getParameters()
- Returns:
- the 2 heights of the parallograms, the modul and argument of the translator vector.
- See Also:
- FunctionalLinkage
setParameters
public void setParameters(double parameters[]) throws MachineException
- Parameters:
- parameters - see getParameters for the list of parameters
- Throws: MachineException
- if the modul of the vector or one of the heights of the
parallograms is less then 10 pixels.
- See Also:
- FunctionalLinkage
mouseMoved
public int mouseMoved(MouseEvent m)
- See Also:
- FunctionalLinkage
mouseDragged
public void mouseDragged(MouseEvent m) throws MachineException
- Throws: MachineException
- if the new location of the active joint
is not valid
- See Also:
- FunctionalLinkage
getActiveStr
public String getActiveStr(int activeJoint)
- See Also:
- FunctionalLinkage
getActiveJoint
public int getActiveJoint()
- See Also:
- FunctionalLinkage
setActiveJoint
public void setActiveJoint(int activeJoint)
- See Also:
- FunctionalLinkage
All Packages Class Hierarchy This Package Previous Next Index