All Packages Class Hierarchy This Package Previous Next Index
Class primitives.machines.ScalarMultiplier1
java.lang.Object
|
+----primitives.machines.Machine
|
+----primitives.machines.ScalarMultiplier1
- public class ScalarMultiplier1
- extends Machine
- implements FunctionalLinkage
A class encapsulating a Pantograph linkage.
- See Also:
- FunctionalLinkage, Adder, TranslatorApplet
-
activeJoint
-
-
d
-
-
def
-
-
fixed
- Determines if this object should have 2 input joints or one anchor pinned at relative(0,0)
-
input1
-
-
input2
-
-
inputs
-
-
inputStr
-
-
joint5Str1
-
-
joint5Str2
-
-
lamda
-
The scalar multiplication parameter
-
origin
- The relative origin
-
output
-
-
outputs
-
-
outputStr
-
-
parameters
-
-
sBar
-
-
scalar
- The parameter used by the machine for computing its state.
-
setStr
-
-
tBar
-
-
temp
-
-
ScalarMultiplier1(Rectangle, double, boolean)
-
-
forceInputJoints(Coordinate[])
-
-
getActiveJoint()
-
-
getActiveStr(int)
-
-
getAnnolus()
-
-
getInputJoints()
-
-
getOutputJoints()
-
-
getParameters()
-
-
mouseDragged(MouseEvent)
- Process a a change according to the activeJoint (a joint the mouse pointer is over).
-
mouseMoved(MouseEvent)
-
-
redraw(Graphics)
- Drawing the pantoghraph
-
setActiveJoint(int)
-
-
setInputJoints(Coordinate[])
-
-
setParameters(double[])
-
-
setScalar(double)
- Used to translate between the parameter used by the object (allways >1)
and the scalar used to compute the output joint location.
scalar
double scalar
- The parameter used by the machine for computing its state.
scalar is allways >1
- See Also:
- lamda
lamda
double lamda
- The scalar multiplication parameter
tBar
double tBar
sBar
double sBar
output
int output
input1
int input1
input2
int input2
fixed
boolean fixed
- Determines if this object should have 2 input joints or one anchor pinned at relative(0,0)
d
Rectangle d
origin
Point origin
- The relative origin
outputs
Coordinate outputs[]
inputs
Coordinate inputs[]
parameters
double parameters[]
activeJoint
int activeJoint
temp
Coordinate temp
outputStr
static final String outputStr
inputStr
static final String inputStr
setStr
static final String setStr
joint5Str1
static final String joint5Str1
joint5Str2
static final String joint5Str2
def
static final String def
ScalarMultiplier1
public ScalarMultiplier1(Rectangle d,
double scalar,
boolean fixed)
- Parameters:
- d - the relative rectangle the Pantograh should be drawn in. The origin is set to
the middle of this rectangle.
- scalar - the parameter of multiplication.
- fixed - Determines if this object should have 2 input joints or one anchor pinned at relative(0,0).
setScalar
void setScalar(double scalar)
- Used to translate between the parameter used by the object (allways >1)
and the scalar used to compute the output joint location.
the translation is done by setting different input joints.
- Parameters:
- scalar - the new scalar to set to.
- See Also:
- scalar
forceInputJoints
public Coordinate[] forceInputJoints(Coordinate inputs[])
- Parameters:
- inputs - an array of 2 Coordinate objects. If the Pantograph is fixed
the first location is overlooked.
- Returns:
- a one size array containing the location of the output joint.
- See Also:
- FunctionalLinkage
setInputJoints
public Coordinate[] setInputJoints(Coordinate inputJoints[]) throws MachineException
- Parameters:
- inputJoints - an array of 2 Coordinate objects. If the Pantograph is fixed
the first location is overlooked.
- Throws: MachineException
- if the new input location is not valid.
- See Also:
- FunctionalLinkage
getInputJoints
public Coordinate[] getInputJoints()
- See Also:
- FunctionalLinkage
getOutputJoints
public Coordinate[] getOutputJoints()
- See Also:
- FunctionalLinkage
redraw
public void redraw(Graphics g)
- Drawing the pantoghraph
- Parameters:
- g - the graphic context to draw to.
- Overrides:
- redraw in class Machine
getParameters
public double[] getParameters()
- See Also:
- lamda, scalar
setParameters
public void setParameters(double parameters[]) throws MachineException
- Parameters:
- parameters - the first member of this array should specify the new scalar
- Throws: MachineException
- if the new current location of the input joints
is not valid with the new paraeters.
- See Also:
- FunctionalLinkage
mouseMoved
public int mouseMoved(MouseEvent m)
- See Also:
- FunctionalLinkage
mouseDragged
public void mouseDragged(MouseEvent m) throws MachineException
- Process a a change according to the activeJoint (a joint the mouse pointer is over).
- Throws: MachineException
- .
- See Also:
- FunctionalLinkage
getAnnolus
double[] getAnnolus()
- Returns:
- the annolus of input domain
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