All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class fundamentals.mouseVector

java.lang.Object
   |
   +----fundamentals.mouseVector

public class mouseVector
extends Object

Variable Index

 o MouseTolerance
The number of pixels determining the maximal allowed distance between a mouse position and an object, under which they can be considered close.
 o x
The first coordinate
 o y
The second coordinate

Constructor Index

 o mouseVector(EuVector, mouseInfo)
 o mouseVector(int, int)

Method Index

 o close(mouseVector)
Determines whether another vector is 'close enough'
 o distanceIs(mouseVector, int)
Determines whether another vector is 'close enough' to having a specific distance from the present one
 o parallel(EuVector)
Determines whether another vector is 'close enough' to being parallel
 o subtract(mouseVector)
Subtracts another mouseVector from the present one

Variables

 o MouseTolerance
 public static final int MouseTolerance
The number of pixels determining the maximal allowed distance between a mouse position and an object, under which they can be considered close.

 o x
 public int x
The first coordinate

 o y
 public int y
The second coordinate

Constructors

 o mouseVector
 public mouseVector(int x,
                    int y)
Parameters:
x - the first coordinate
y - the second coordinate
 o mouseVector
 public mouseVector(EuVector v,
                    mouseInfo info)
Parameters:
v - a mathematical representation of the vector
info - the information needed to transform it into a canvas vector

Methods

 o close
 public boolean close(mouseVector other)
Determines whether another vector is 'close enough'

Parameters:
other - the mouseVector being compared to the present one
Returns:
true if they are close
 o parallel
 public boolean parallel(EuVector other)
Determines whether another vector is 'close enough' to being parallel

Parameters:
other - the mouseVector being compared to the present one
Returns:
true if they are parallel
 o distanceIs
 public boolean distanceIs(mouseVector other,
                           int d)
Determines whether another vector is 'close enough' to having a specific distance from the present one

Parameters:
other - the mouseVector being compared to the present one
d - the distance
Returns:
true if the distance is as specified
 o subtract
 public void subtract(mouseVector v)
Subtracts another mouseVector from the present one

Parameters:
v - the subtracted vector

All Packages  Class Hierarchy  This Package  Previous  Next  Index