Flight Club


flightclub.framework3d
Class Obj3dManager

java.lang.Object
  |
  +--flightclub.framework3d.Obj3dManager

public class Obj3dManager
extends java.lang.Object

This class manages a list of 3d objects - the model.


Field Summary
protected  ModelViewer modelViewer
           
 
Method Summary
 void addObj(Obj3d o)
           
 Obj3d obj(int i)
           
 void removeAll()
           
 void removeObj(Obj3d o)
           
 int size()
           
 void sortObjects()
          Sorts so that the furthest away obj is first in the list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

modelViewer

protected ModelViewer modelViewer
Method Detail

addObj

public void addObj(Obj3d o)

removeObj

public void removeObj(Obj3d o)

removeAll

public void removeAll()

obj

public Obj3d obj(int i)

size

public int size()

sortObjects

public void sortObjects()
Sorts so that the furthest away obj is first in the list. We use the depth bounding box x_min -> x_max and take its mid point to be THE depth of the object. This is ok for local objects. ***TODO*** advanced zorder to handle terrain, roads etc. will be implemented in subclass.


Dan Burton <danb@dircon.co.uk> | latest update: 20 Sep 2002;