gameserver
Class Matrix
java.lang.Object
|
+--gameserver.Matrix
- public class Matrix
- extends java.lang.Object
Constructor Summary |
Matrix(int width,
int height)
|
Method Summary |
int |
fetchValue(double x,
double y)
|
int |
getHeight()
|
Matrix |
getRotatedMatrix(double angle)
Einfacher erster Ansatz: **
für jeden Punkt der Zielmatrix wird der entsprechende **
Punkt der Ausgangsmatrix bestimmt. |
int |
getWidth()
|
void |
set(int x,
int y,
int value)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Matrix
public Matrix(int width,
int height)
set
public void set(int x,
int y,
int value)
getWidth
public int getWidth()
getHeight
public int getHeight()
getRotatedMatrix
public Matrix getRotatedMatrix(double angle)
- Einfacher erster Ansatz: **
für jeden Punkt der Zielmatrix wird der entsprechende **
Punkt der Ausgangsmatrix bestimmt. Hat den Vorteil, **
dass jeder Punkt definiert ist, aber auch den Nachteil, **
dass vorhandene Punkte der Quellmatrix evtl. nicht er- **
scheinen. **
fetchValue
public int fetchValue(double x,
double y)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object