|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object simbad.sim.World
Represents a 3d world - this class use intensively JAVA3D. It creates the scenegraph and the view platform. The building process uses a EnvironmentDescription object containing colors , objects and attributes given by the user. This class is thighly coupled with Simulator Class. Remember to call System.setProperty("j3d.implicitAntialiasing", "true") at the very beginning of your program in order to enable antialiasing.
Field Summary | |
static int |
VIEW_ABOVE_AGENT
|
static int |
VIEW_ABOVE_AGENT_NEAR
|
static int |
VIEW_AGENT_SIDE
|
static int |
VIEW_BEHIND_AGENT
|
static int |
VIEW_FROM_EAST
|
static int |
VIEW_FROM_TOP
|
Constructor Summary | |
World(EnvironmentDescription ed)
Construct a World from a given EnvironmentDescription. |
Method Summary | |
void |
addObjectToPickableSceneBranch(simbad.sim.BaseObject obj3d)
Adds a 3D object to the world. |
void |
attach(simbad.sim.BaseObject obj3d)
attach a 3d object to the scenegraph. |
void |
changeViewPoint(int type,
SimpleAgent agent)
Change the user view Point . |
void |
detach(simbad.sim.BaseObject obj3d)
Detach a previously attached object from the scenegraph. |
void |
dispose()
Destroy the java3d graph |
javax.media.j3d.Canvas3D |
getCanvas3D()
|
void |
renderOnce()
Do one rendering on main canvas 3D . |
void |
startRendering()
Restart rendering on main canvas 3D . |
void |
stopRendering()
Stop rendering on main canvas 3D . |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int VIEW_FROM_TOP
public static final int VIEW_FROM_EAST
public static final int VIEW_BEHIND_AGENT
public static final int VIEW_ABOVE_AGENT
public static final int VIEW_ABOVE_AGENT_NEAR
public static final int VIEW_AGENT_SIDE
Constructor Detail |
public World(EnvironmentDescription ed)
Method Detail |
public void addObjectToPickableSceneBranch(simbad.sim.BaseObject obj3d)
public void detach(simbad.sim.BaseObject obj3d)
public void attach(simbad.sim.BaseObject obj3d)
public void changeViewPoint(int type, SimpleAgent agent)
type
- can be VIEW_FROM_TOP,VIEW_FROM_EAST,VIEW_BEHIND_AGENTagent
- : specify the agent if VIEW_BEHIND_AGENT
The VIEW_BEHIND_AGENT case has to be called regularly because of the agent
displacement.public void stopRendering()
public void startRendering()
public void renderOnce()
public void dispose()
public javax.media.j3d.Canvas3D getCanvas3D()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |