Java Reference
In-Depth Information
Appendix G
Navigation and Collision
Detection for Web-Based
3D Experiment
G.1 ImportInG lIbrarIes
import javax.vecmath.*;
import java.awt.event.*;
import java.awt.AWTEvent;
import java.util.Enumeration;
import javax.swing.event.*;
import javax.swing.*;
G.2 defInInG class for navIGatIon and collIsIon
public class NavigatorBehavior extends Behavior implements MouseListener,
MouseMotionListener, ActionListener, ItemListener, ChangeListener
private TransformGroup viewTrans;
private TransformGroup bodyTrans;
private TransformGroup outsideTrans;
private Matrix3f comMat = new Matrix3f();
private Shape3D bodyshape;
private int direction;
private WakeupCriterion eventsCondition[] = new WakeupCriterion[3];
Search WWH ::

Custom Search