|
||||||||||
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, 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, clone, copyAngles, copyUvector, distance, distance, dump, editCoo, equals, eulerMatrix, getLat, getLon, localMatrix, localMatrix, localMatrix, moveMatrix, normalize, normalize, parse, parsing, rotate_1, rotate, rotateVector_1, rotateVector, set, set, set, set, setDecimals, setUvec, sub, sub |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, 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 faceMethod 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 Coo
coo
- coordinates of a pointpublic 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 facepublic java.lang.StringBuffer edit(java.lang.StringBuffer buf, int ndec)
edit
in class Coo
buf
- 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 |