Class TSQDir

java.lang.Object
  extended by TSQDir
All Implemented Interfaces:
java.io.Serializable

 class TSQDir
extends java.lang.Object
implements java.io.Serializable

.

======================================================================
 Klasse TSQDir -- Definition eines 'Quaternion'
 Quaterions werden benutzt um eine Richtung zu spezifizieren, die
   mit Hilfe einer Rotation aus einer Basisrichtung (=Nord) entsteht.
   Diese Rotation wird durch das Quaternion beschrieben.
 ##TSQDir (Eyecatcher)
======================================================================
 


Field Summary
protected static java.lang.String IdStr
           
private  double Vx
           
private  double Vy
           
private  double Vz
           
private  double W
           
 
Constructor Summary
protected TSQDir()
          .
protected TSQDir(double vx, double vy, double vz, double w)
          .
protected TSQDir(TSQDir cD)
          .
 
Method Summary
protected  double chkVals()
          .
protected  java.lang.String getDir(boolean comma)
          .
protected  java.lang.String getDir(int prec)
          .
protected  double getTerm(int t)
          .
protected  java.lang.String inv()
          .
protected  java.lang.String mul(TSQDir q)
          .
protected  java.lang.String raise(double w)
          .
protected  java.lang.String toStr()
          .
protected  java.lang.String turn(double w)
          .
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IdStr

protected static final java.lang.String IdStr
See Also:
Constant Field Values

Vx

private double Vx

Vy

private double Vy

Vz

private double Vz

W

private double W
Constructor Detail

TSQDir

protected TSQDir()
.
=====================================================================
 Constructor: (1) Create default-entry
=====================================================================
  


TSQDir

protected TSQDir(double vx,
                 double vy,
                 double vz,
                 double w)
.
=====================================================================
 Constructor: (2) Create standard-entry
=====================================================================
  


TSQDir

protected TSQDir(TSQDir cD)
.
=====================================================================
 Constructor: (3) Crerate copy-entry from template
=====================================================================
  

Method Detail

chkVals

protected final double chkVals()
.
=====================================================================
 Methode "chkVals"
 Integritaet der gespeicherten Werte testen
 Soll: x*x + y*y + z*z + w*w = 1 (Normalform)
 ##chkVals.TSQDir (Eyecatcher)
=====================================================================
  


getDir

protected final java.lang.String getDir(int prec)
.
=====================================================================
 Methode "getDir"
 Information-Hiding: Richtungswerte in Zeichenkettenform liefern
 Achtung: Es gibt keine Aufbereitungsoptionen, da Richtungswerte
          IMMER VOLLSTAENDIG aufbereitet werden muessen (Quaternion)
 Achtung: Ergebnis enthaelt ein fuehrendes Leerzeichen
 ##getDir.TSQDir (Eyecatcher)
=====================================================================
  


getDir

protected final java.lang.String getDir(boolean comma)
.
=====================================================================
 Methode "getDir" (2.Version)
 Information-Hiding: Richtungswerte in Zeichenkettenform liefern
 Aufbereitung erfolgt ohne Rundungsmoeglichkeit
 ##getDir.TSQDir (Eyecatcher)
=====================================================================
  


getTerm

protected final double getTerm(int t)
.
=====================================================================
 Method "getTerm"
 Returns a Term which is computed from 'QDirection'-values
 QDirection = (Vx Vy Vz W)
 ##getTerm.TSQDir (Eyecatcher)
=====================================================================
  


inv

protected final java.lang.String inv()
.
=====================================================================
 Methode "inv"
 'Quaterion'-Werte invertieren fuer 'inverse Rotation'
 Wert beschreibt nun 'antiparallele' Richtung
 Methode liefert Fehlermeldung oder 'null'
 Achtung: Werte werden auf positiv justiert falls moeglich
 ##inv.TSQDir (Eyecatcher)
=====================================================================
  


mul

protected final java.lang.String mul(TSQDir q)
.
=====================================================================
 Methode "mul"
 Positionswerte mit Quaterion multiplizieren und ggf. Fehler melden
 Matrixmultiplikation: q1' = q1.q2 ist q1' = q1.mul(q2)
 Objekt q2 (x2 y2 z2 w2) wird als Argument beim Aufruf mitgegeben
 x' = x1*w2 + z1*y2 + w1*x2 - y1*z2
 y' = x1*z2 + y1*w2 + w1*y2 - z1*x2
 z' = y1*x2 + z1*w2 + w1*z2 - x1*y2
 w' = w1*w2 - x1*x2 - y1*y2 - z1*z2
 Methode kombiniert damit zwei aufeinanderfolgende Rotationen zu
   einer einzigen.
 ##mul.TSQDir (Eyecatcher)
=====================================================================
  


raise

protected final java.lang.String raise(double w)
.
=====================================================================
 Methode "raise"
 'Quaterion'-Werte senkrecht (zu aktuellem Objekt) rotieren
 Realisierung durch Multiplikation mit Quaternion 'senkrecht'
   q=New-Quaterion(Vector (1,0,0),Winkel w) = (sin(w/2) 0 0 cos(w/2))
 Methode liefert Fehlermeldung oder 'null'
 ##raise.TSQDir (Eyecatcher)
=====================================================================
  


turn

protected final java.lang.String turn(double w)
.
=====================================================================
 Methode "turn"
 'Quaterion'-Werte waagerecht (zu aktuellem Objekt) rotieren
 Realisierung durch Multiplikation mit Quaternion 'waagrecht'
   q=New-Quaterion(Vector (0,1,0),Winkel w) = (0 sin(w/2) 0 cos(w/2))
 Methode liefert Fehlermeldung oder 'null'
 ##turn.TSQDir (Eyecatcher)
=====================================================================
  


toStr

protected final java.lang.String toStr()
.
=====================================================================
 Method "toStr"
 Build a string-representation of all values of this class
 ##toStr.TSQDir (Eyecatcher)
=====================================================================