|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcds.astro.Coo
cds.astro.Coocube
public class Coocube
The routines provided in this module define a "coordinate" as
a face number (between 1 and 6), and two (X,Y) values
in the range [-1,1[ representing the projection of a direction onto
a cube. The face numbers, and the axis orientations, are:
1 = +z X=+y Y=-x (North Pole)
2 = +y X=-z Y=-x (azimuth +90)
3 = +x X=+y Y=+z (azimuth 0)
4 = -x X=-z Y=-y (azimuth 180)
5 = -y X=+x Y=+z (azimuth -90)
6 = -z X=+x Y=-y (South Pole)
+---------+
| ^ |
| |x |
|<---+ |
| 1 |
+---------+---------+---------+---------+
| ^ | ^ | | |
| | | | | | |
| 5+--->| 3 +--->| 2+--->| 4+--->|
| x | x | x| | x| |
| | | v | v |
+---------+---------+---------+---------+
| ^ |
| |x |
|<---+ |
| 6 |
+---------+
These coordinates can be used to address accurately a point with
2 floating-point numbers associated to a 3-bit face number
| Field Summary | |
|---|---|
byte |
face
The face number in range 1 to 6 -- zero for undefined. |
double |
X
The position on the face, a number between -1 and 1. |
double |
Y
The position on the face, a number between -1 and 1. |
| Fields inherited from class cds.astro.Coo |
|---|
decimals, ed, lat, lon, Umatrix3, x, y, z |
| Constructor Summary | |
|---|---|
Coocube()
Define the default undefined Coocube |
|
Coocube(Coo coo)
Define the Coocube from a Coordinate |
|
Coocube(int face,
double X,
double Y)
Define the Coocube from its components |
|
| Method Summary | |
|---|---|
java.lang.StringBuffer |
edit(java.lang.StringBuffer buf,
int ndec)
Edit the Coocube value as f:±X±Y |
static int |
face(double[] u)
Compute the face number from the unit vector |
void |
set(Coo coo)
Compute the Coocube coordinates |
void |
set(double[] u)
Compute the Coocube coordinates from the Direction Cosines |
void |
set(int face,
double X,
double Y)
Compute the Coocube from its (XY) components |
static int |
setUvec(int face,
double X,
double Y,
double[] u)
Transformation (face + Projections) --> unit vector |
static int |
setXY(double[] u,
double[] XY)
Compute the (face, X, Y) |
java.lang.String |
toString()
Default Edition of the Coocube values |
| Methods inherited from class cds.astro.Coo |
|---|
add, add, angle, clone, copyAngles, copyUvector, dist2, dist2, dist2, distance, distance, distc, dotprod, dotprod, dotprod, dump, editCoo, equals, eulerMatrix, getLat, getLon, hashCode, localMatrix, localMatrix, localMatrix, moveMatrix, norm2, normalize, normalize, parse, parsing, perpendicular, posAngle, rotate_1, rotate, rotateVector_1, rotateVector, set, set, set, set, setDecimals, setUvec, sub, sub, toString, toString, toString, vecprod, vecprod, vecprod |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public byte face
public double X
public double Y
| Constructor Detail |
|---|
public Coocube()
public Coocube(Coo coo)
public Coocube(int face,
double X,
double Y)
face - the face number between 1 and 6
face is set to 0 in case of error.X - x position on the faceY - y position on the face| Method Detail |
|---|
public static final int face(double[] u)
u - unit vector (vector of 3 direction cosines)
public static final int setXY(double[] u,
double[] XY)
u - the Direction CosinesXY - the (X,Y) components
public static final int setUvec(int face,
double X,
double Y,
double[] u)
face - the face number (1 to 6)X - X value of the projection on the face nY - Y value of the projection on the face nu - the unit vector (modified)
public final void set(double[] u)
u - the Direction Cosinespublic final void set(Coo coo)
set in class Coocoo - coordinates of a point
public final void set(int face,
double X,
double Y)
face - the face number between 1 and 6
face is set to 0 in case of error.X - x position on the faceY - y position on the face
public java.lang.StringBuffer edit(java.lang.StringBuffer buf,
int ndec)
edit in class Coobuf - buffer for the editionndec - number of decimals for edition
(a value of 6 corresponds to an accuracy of 0.3arcsec)
public java.lang.String toString()
toString in class Coo
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||