|
Eclipse Draw2d 3.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.draw2d.geometry.Ray
Vector instead, which offers double precision instead
of integer precision.
public final class Ray
Represents a 2-dimensional directional Vector, or Ray.
Vector is commonly imported, so the name Ray was chosen.
| Field Summary | |
|---|---|
int |
x
Deprecated. the X value |
int |
y
Deprecated. the Y value |
| Constructor Summary | |
|---|---|
Ray()
Deprecated. Constructs a Ray <0, 0> with no direction and magnitude. |
|
Ray(int x,
int y)
Deprecated. Constructs a Ray pointed in the specified direction. |
|
Ray(Point p)
Deprecated. Constructs a Ray pointed in the direction specified by a Point. |
|
Ray(Point start,
Point end)
Deprecated. Constructs a Ray representing the direction and magnitude between to provided Points. |
|
Ray(Ray start,
Ray end)
Deprecated. Constructs a Ray representing the difference between two provided Rays. |
|
| Method Summary | |
|---|---|
int |
assimilarity(Ray r)
Deprecated. Calculates the magnitude of the cross product of this Ray with another. |
int |
dotProduct(Ray r)
Deprecated. Calculates the dot product of this Ray with another. |
boolean |
equals(Object obj)
Deprecated. |
Ray |
getAdded(Ray r)
Deprecated. Creates a new Ray which is the sum of this Ray with another. |
Ray |
getAveraged(Ray r)
Deprecated. Creates a new Ray which represents the average of this Ray with another. |
Ray |
getScaled(int s)
Deprecated. Creates a new Ray which represents this Ray scaled by the amount provided. |
int |
hashCode()
Deprecated. |
boolean |
isHorizontal()
Deprecated. Returns true if this Ray has a non-zero horizontal comonent. |
double |
length()
Deprecated. Returns the length of this Ray. |
int |
similarity(Ray r)
Deprecated. Calculates the similarity of this Ray with another. |
String |
toString()
Deprecated. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public int x
public int y
| Constructor Detail |
|---|
public Ray()
public Ray(int x,
int y)
x - X value.y - Y value.public Ray(Point p)
p - the Point
public Ray(Point start,
Point end)
start - Strarting Pointend - End Point
public Ray(Ray start,
Ray end)
start - The start Rayend - The end Ray| Method Detail |
|---|
public int assimilarity(Ray r)
r - Ray being compared
similarity(Ray)public int dotProduct(Ray r)
r - the Ray used to perform the dot product
public boolean equals(Object obj)
equals in class ObjectObject.equals(Object)public Ray getAdded(Ray r)
r - Ray to be added with this Ray
public Ray getAveraged(Ray r)
r - Ray to calculate the average.
public Ray getScaled(int s)
s - Value providing the amount to scale.
public int hashCode()
hashCode in class ObjectObject.hashCode()public boolean isHorizontal()
public double length()
public int similarity(Ray r)
r - Ray being tested for similarity
assimilarity(Ray)public String toString()
toString in class Object
|
Eclipse Draw2d 3.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||