|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectTSPos
class TSPos
.
====================================================================== Klasse TSPos -- Definition eines Positionsvektors Die Klasse beschreibt einen Positionsvector relativ zu (0,0,0) ##TSPos (Eyecatcher) ======================================================================
Field Summary | |
---|---|
protected static java.lang.String |
IdStr
|
private double |
Px
|
private double |
Py
|
private double |
Pz
|
Constructor Summary | |
---|---|
protected |
TSPos()
. |
protected |
TSPos(double px,
double py,
double pz)
. |
protected |
TSPos(TSPos cP)
. |
Method Summary | |
---|---|
protected int |
addPosX(double d)
. |
protected int |
addPosY(double d)
. |
protected int |
addPosZ(double d)
. |
protected int |
clipPos()
. |
protected double |
cmpAbs(TSPos cP,
int dx,
int dz)
. |
protected java.lang.String |
getPos(boolean comma)
. |
protected java.lang.String |
getPos(int prec,
int opt)
. |
protected double |
getPosX()
. |
protected double |
getPosY()
. |
protected double |
getPosZ()
. |
protected void |
modPos(boolean m,
TSPos cP)
. |
protected java.lang.String |
mul(TSQDir q)
. |
protected java.lang.String |
shftPos(TSPos cP)
. |
protected java.lang.String |
toEnd(TSQDir q,
double rl,
double w)
. |
protected java.lang.String |
toStr()
. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String IdStr
private double Px
private double Py
private double Pz
Constructor Detail |
---|
protected TSPos()
===================================================================== Constructor: (1) Create default-entry =====================================================================
protected TSPos(double px, double py, double pz)
===================================================================== Constructor: (2) Create standard-entry =====================================================================
protected TSPos(TSPos cP)
===================================================================== Constructor: (3) Create copy-entry from template =====================================================================
Method Detail |
---|
protected final int addPosX(double d)
===================================================================== Methode "addPosX" Positionswert X korrigieren und Quadrantenfehler ermitteln (Objekt verschieben) ##addPosX.TSPos (Eyecatcher) =====================================================================
protected final int addPosY(double d)
===================================================================== Methode "addPosY" Positionswert Y (Hoehe) korrigieren (Objekt verschieben) ##addPosY.TSPos (Eyecatcher) =====================================================================
protected final int addPosZ(double d)
===================================================================== Methode "addPosZ" Positionswert Z korrigieren und Quadrantenfehler ermitteln (Objekt verschieben) ##addPosZ.TSPos (Eyecatcher) =====================================================================
protected final int clipPos()
===================================================================== Methode "clipPos" Positionswerte auf gueltige Werte (-1024..+1024) aendern Y-Komponete (Hoehe) wird nicht veraendert ##clipPos.TSPos (Eyecatcher) =====================================================================
protected final double cmpAbs(TSPos cP, int dx, int dz)
===================================================================== Methode "cmpAbs" Compute distance between two position-values. This method returns the distance of two koordinates, which is computed due to Pythargoras. ##cmpAbs.TSPos (Eyecatcher) =====================================================================
protected final java.lang.String getPos(int prec, int opt)
===================================================================== Methode "getPos" Information-Hiding: Positionswerte in Zeichenkettenform liefern Aufbereitungsoptionen nach dem Primzahlverfahren: 2 - Px-Wert NICHT beruecksichtigen 3 - Py-Wert NICHT beruecksichtigen (Hoehenwert) 5 - Pz-Wert NICHT beruecksichtigen Achtung: Ergebnis enthaelt ein fuehrendes Leerzeichen ##getPos.TSPos (Eyecatcher) =====================================================================
protected final java.lang.String getPos(boolean comma)
===================================================================== Methode "getPos" (2.Version) Information-Hiding: Positionswerte in Zeichenkettenform liefern Aufbereitung erfolgt ohne Rundungsmoeglichkeit ##getPos.TSPos (Eyecatcher) =====================================================================
protected final double getPosX()
===================================================================== Methode "getPosX" Get X-value of a position-definition (information-Hiding) This method is used to successfully create a 'TSCoo'-object ##getPosX.TSPos (Eyecatcher) =====================================================================
protected final double getPosY()
===================================================================== Methode "getPosY" Information-Hiding: Positionswert Y (Hoehe) liefern ##getPosY.TSPos (Eyecatcher) =====================================================================
protected final double getPosZ()
===================================================================== Methode "getPosZ" Get Z-value of a position-definition (information-Hiding) This method is used to successfully create a 'TSCoo'-object ##getPosZ.TSPos (Eyecatcher) =====================================================================
protected void modPos(boolean m, TSPos cP)
===================================================================== Methode "modPos" 'add' or 'sub' difference-vector to/from current position This realizes a 'shift-operation' ##modPos.TSPos (Eyecatcher) =====================================================================
protected final java.lang.String mul(TSQDir q)
===================================================================== Methode "mul" Positionswerte mit Quaterion multiplizieren und ggf. Fehler melden --> Vector (=aktuelles Positionsobjekt) gemaess Quaterion rotieren Also compare to 'Object-Rotator'-manual (Rotating a 3D-vector) Px' = (Qx*Qx - Qy*Qy - Qz*Qz + Qw*Qw)*Px + 2*(Qx*Qy + Qz*Qw)*Py + 2*(Qx*Qz - Qy*Qw)*Pz Py' = 2*(Qx*Qy - Qz*Qw)*Px + (Qy*Qy - Qx*Qx - Qz*Qz + Qw*Qw)*Py + 2*(Qx*Qw - Qy*Qz)*Pz Pz' = 2*(Qx*Qz + Qy*Qw)*Px + 2*(Qy*Qz - Qx*Qw)*Py + (Qz*Qz - Qx*Qx - Qy*Qy + Qw*Qw)*Pz ##mul.TSPos (Eyecatcher) =====================================================================
protected final java.lang.String shftPos(TSPos cP)
===================================================================== Methode "shftPos" Shift Position of object 'half way' in direction of second object ##shftPos.TSPos (Eyecatcher) =====================================================================
protected final java.lang.String toEnd(TSQDir q, double rl, double w)
===================================================================== Method "toEnd" Current vector points to beginning of section -- compute End-Position 'rl' may be negative if position has to be subtracted (left curve) Also compare to 'Object-Rotator'-manual (Rotating a 3D-vector) specially: rotating vector (0,0,1) -> (x3,y3,z3) w==0.0 (rl is 'length'): Px = Px + rl * 2*(Qx*Qz - Qy*Qw) Py = Py + rl * 2*(Qx*Qw + Qy*Qz) Pz = Pz + rl * (Qz*Qz + Qw*Qw - Qx*Qx - Qy*Qy) w!=0.0 (rl is 'radius'): Px = Px + rl*sin(w) * 2*(Qx*Qz - Qy*Qw) - rl*(1-cos(w)) * (Qx*Qx - Qy*Qy - Qz*Qz + Qw*Qw) Py = Py + rl*sin(w) * 2*(Qx*Qw + Qy*Qz) - rl*(1-cos(w)) * 2*(Qx*Qy - Qz*Qw) Pz = Pz + rl*sin(w) * (Qz*Qz + Qw*Qw - Qx*Qx - Qy*Qy) - rl*(1-cos(w)) * 2*(Qx*Qz + Qy*Qw) ##toEnd.TSPos (Eyecatcher) =====================================================================
protected java.lang.String toStr()
===================================================================== Method "toStr" Build a string-representation of all values of this class ##toStr.TSPos (Eyecatcher) =====================================================================
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |