|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.grelf.grip.VectorFloat
public class VectorFloat
Objects of this class describe the vector connecting two detected objects (Blobs). The description is in polar coordinates: radius r (pixels) and angle theta (radians). These two values are held as floating point numbers so equality can only be determined within certain tolerances. The tolerances are set fairly wide because for astrophotography the aim is to be able to compare vectors between images taken on a tripod, so the stars will have moved slightly because of the Earth's rotation. The separation will hardly change, particularly if an inverse gnomonic projection (see class Gnomonic) has been done on each image first, but the angle change may be significant. Note: This class deliberately has a natural ordering that is inconsistent with equals.
Field Summary | |
---|---|
float |
r
Radius, in pixels. |
float |
theta
Angle anticlockwise from 0x, in radians. |
Constructor Summary | |
---|---|
VectorFloat(float aRadiusPixels,
float anAngleRadians)
Construct from polar coordinates. |
|
VectorFloat(PointFloat pt1,
PointFloat pt2)
Construct from two points (each in Cartesian coordinates). |
Method Summary | |
---|---|
int |
compareTo(VectorFloat other)
For sorting only on angle, theta. |
boolean |
equals(java.lang.Object other)
Test for equality within the radius and angle tolerances. |
static float |
getAngleTolerance()
Angle tolerance for comparisons, in radians. |
float |
getDx()
Get the x component of this vector (convert from polar to Cartesian coordinates). |
float |
getDy()
Get the y component of this vector (convert from polar to Cartesian coordinates). |
static float |
getRadiusTolerance()
Radius tolerance for comparisons, in pixels. |
int |
hashCode()
|
static void |
resetDefaultTolerances()
|
static void |
setAngleTolerance(float value)
|
static void |
setRadiusTolerance(float value)
|
java.lang.String |
toString()
Get a String representation of the VectorFloat |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public float r
public float theta
Constructor Detail |
---|
public VectorFloat(float aRadiusPixels, float anAngleRadians)
public VectorFloat(PointFloat pt1, PointFloat pt2)
Method Detail |
---|
public float getDx()
public float getDy()
public static float getRadiusTolerance()
public static void setRadiusTolerance(float value)
public static float getAngleTolerance()
public static void setAngleTolerance(float value)
public static void resetDefaultTolerances()
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int compareTo(VectorFloat other)
compareTo
in interface java.lang.Comparable<VectorFloat>
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |