megamek.client.ui.AWT.boardview3d
Class PlayerViewTransform

java.lang.Object
  extended by megamek.client.ui.AWT.boardview3d.ViewTransform
      extended by megamek.client.ui.AWT.boardview3d.PlayerViewTransform

 class PlayerViewTransform
extends ViewTransform

FIXME: This is WAY too complicated, as none of the core behaviors quite match what I want. Each one has its own little quirk. It should be easier to simply write a custom behavior, but this code grew step by step -- and works correctly.


Field Summary
(package private) static Quat4d rotfix
           
 
Fields inherited from class megamek.client.ui.AWT.boardview3d.ViewTransform
controllers, MAX_TRANSFORMS, universe
 
Constructor Summary
PlayerViewTransform()
           
 
Method Summary
 void centerOnHex(Coords c, IHex hex)
           
(package private)  java.lang.String getName()
           
(package private)  Node makeViewRelative(Node obj, double centerDistance)
           
(package private)  void reset()
           
protected  void setup()
          Create transformation chain and mouse behaviors for a "human player" perspective
 void transformChanged(int type, Transform3D trans)
           
(package private)  void zoom(int steps)
           
 
Methods inherited from class megamek.client.ui.AWT.boardview3d.ViewTransform
create, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rotfix

static final Quat4d rotfix
Constructor Detail

PlayerViewTransform

PlayerViewTransform()
Method Detail

getName

java.lang.String getName()
Specified by:
getName in class ViewTransform

centerOnHex

public void centerOnHex(Coords c,
                        IHex hex)
Specified by:
centerOnHex in class ViewTransform

reset

void reset()
Specified by:
reset in class ViewTransform

setup

protected void setup()
Create transformation chain and mouse behaviors for a "human player" perspective

Specified by:
setup in class ViewTransform

zoom

void zoom(int steps)
Specified by:
zoom in class ViewTransform

makeViewRelative

Node makeViewRelative(Node obj,
                      double centerDistance)
Specified by:
makeViewRelative in class ViewTransform

transformChanged

public void transformChanged(int type,
                             Transform3D trans)