|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.scenegraph.SceneGraph
org.xith3d.base.Xith3DEnvironment
public class Xith3DEnvironment
This class offers the common objects needed for Xith3D rendering.
Link it with an instance of RenderLoop ("renderLoop.addRenderEngine(RenderEngine)")
to let the scene be rendered in a separate thread.
RenderLoop| Field Summary | |
|---|---|
boolean |
canvasAliveCheckSuppressed
|
| Fields inherited from class org.xith3d.scenegraph.SceneGraph |
|---|
CHECK_FOR_ILLEGAL_MODIFICATION, huds, modListener |
| Constructor Summary | |
|---|---|
Xith3DEnvironment()
Creates a new Xith3DEnvironment with eyePosition defaulted to (0, 0, 5),
viewFocus defaulted to (0, 0, 0), and vecUp defaulted to (0, 1,
0). |
|
Xith3DEnvironment(float eyePositionX,
float eyePositionY,
float eyePositionZ,
float viewFocusX,
float viewFocusY,
float viewFocusZ,
float vecUpX,
float vecUpY,
float vecUpZ)
Creates a new Xith3DEnvironment. |
|
Xith3DEnvironment(float eyePositionX,
float eyePositionY,
float eyePositionZ,
float viewFocusX,
float viewFocusY,
float viewFocusZ,
float vecUpX,
float vecUpY,
float vecUpZ,
RenderLoop renderLoop)
Creates a new Xith3DEnvironment. |
|
Xith3DEnvironment(RenderLoop renderLoop)
Creates a new Xith3DEnvironment with eyePosition defaulted to (0, 0, 5),
viewFocus defaulted to (0, 0, 0), and vecUp defaulted to (0, 1,
0). |
|
Xith3DEnvironment(org.openmali.vecmath2.Tuple3f eyePosition,
org.openmali.vecmath2.Tuple3f viewFocus,
org.openmali.vecmath2.Tuple3f vecUp)
Creates a new Xith3DEnvironment. |
|
Xith3DEnvironment(org.openmali.vecmath2.Tuple3f eyePosition,
org.openmali.vecmath2.Tuple3f viewFocus,
org.openmali.vecmath2.Tuple3f vecUp,
RenderLoop renderLoop)
Creates a new Xith3DEnvironment. |
|
| Method Summary | |
|---|---|
Canvas3D |
addCanvas(Canvas3D canvas)
Adds a Canvas3D to the list of canveses. |
Canvas3D |
addCanvas(Canvas3D canvas,
View view)
Adds a Canvas3D to the list of canveses. |
Canvas3DWrapper |
addCanvas(Canvas3DWrapper canvasWrapper)
Adds a Canvas3D to the list of canveses. |
Canvas3DWrapper |
addCanvas(Canvas3DWrapper canvasWrapper,
View view)
Adds a Canvas3D to the list of canveses. |
void |
checkRenderPreferences()
Checks the render preferences. |
static Xith3DEnvironment |
createHeadless()
Creates a new headless (without a View) Xith3DEnvironment. |
static Xith3DEnvironment |
createHeadless(RenderLoop renderLoop)
Creates a new headless (without a View) Xith3DEnvironment. |
void |
destroy()
Destroy all resources. |
Canvas3D |
getCanvas()
|
Canvas3D |
getCanvas(int index)
|
OperationScheduler |
getOperationScheduler()
Returns the OperationScheduler. |
PhysicsEngine |
getPhysicsEngine()
Returns the PhysicsEngine, which is automatically updated by the RenderLoop. |
PickScheduler |
getPickScheduler()
Returns this environment's PickScheduler. |
RenderLoop |
getRenderLoop()
Returns the RenderLoop. |
EnvScreenshotEngine |
getScreenshotEngine()
Returns this environment's ScreenshotEngine. |
SoundDriver |
getSoundDriver()
Deprecated. use SoundProcessor.getInstance() instead to get the sound driver. |
boolean |
isCanvasAlive(Canvas3D canvas)
Checkes if a Canvas3D is currently to be rendered. |
boolean |
isCanvasAlive(Canvas3DWrapper canvasWrapper)
Checkes if a Canvas3DPanel is currently to be rendered. |
void |
removeAllCanvas3Ds()
Removes all Canvas3Ds from the View |
void |
removeCanvas(Canvas3D canvas)
Removes a Canvas3D from the list of canveses. |
void |
removeCanvas(Canvas3DWrapper canvasWrapper)
Removes a Canvas3D from the list of canveses. |
void |
render()
Renders all Canvas3Ds. |
void |
render(long nanoGameTime,
long nanoFrameTime)
Renders all Canvas3Ds. |
void |
reviveCanvas(Canvas3D canvas)
(Re-)activates a Canvas3D to be rendered by the RenderLoop |
void |
reviveCanvas(Canvas3DWrapper canvasWrapper)
(Re-)activates a Canvas3D to be rendered by the RenderLoop |
void |
setCanvasRenderPassMap(java.util.HashMap<Canvas3D,java.util.List<RenderPass>> canvasRenderPassMap)
Sets a map, that defines a list of RenderPasses to be rendered to each mapped
canvas. |
void |
setPhysicsEngine(PhysicsEngine physEngine)
Sets the PhysicsEngine, which is automatically updated by the RenderLoop. |
void |
setPickScheduler(PickScheduler picker)
Sets this environment's PickScheduler. |
void |
setRenderLoop(RenderLoop renderLoop)
Sets the RenderLoop. |
void |
setScreenshotEngine(EnvScreenshotEngine engine)
Sets this environment's ScreenshotEngine. |
void |
setSoundDriver(SoundDriver soundDriver)
Deprecated. use SoundProcessor.getInstance() instead to set the sound driver. |
void |
suspendCanvas(Canvas3D canvas)
Suspends a Canvas3D do not be rendered for the moment. |
void |
suspendCanvas(Canvas3DWrapper canvasWrapper)
Suspends a Canvas3D do not be rendered for the moment. |
void |
updateInputSystem(long gameTime,
UpdatingThread.TimingMode timingMode)
Updates the InputSystem. |
void |
updatePhysicsEngine(long gameTime,
long frameTime,
UpdatingThread.TimingMode timingMode)
Updates the PhysicsEngine. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.xith3d.scenegraph.RenderableSceneGraph |
|---|
addBranchGraph, addHUD, addParallelBranch, addParallelBranch, addPerspectiveBranch, addPerspectiveBranch, addRenderPass, addRenderPassFirst, addScenegraphModificationListener, addView, getBranchGroup, getRenderer, getView, getView, removeAllBranchGraphs, removeBranchGraph, removeHUD, removeRenderPass, removeScenegraphModificationListener |
| Field Detail |
|---|
public boolean canvasAliveCheckSuppressed
| Constructor Detail |
|---|
public Xith3DEnvironment(float eyePositionX,
float eyePositionY,
float eyePositionZ,
float viewFocusX,
float viewFocusY,
float viewFocusZ,
float vecUpX,
float vecUpY,
float vecUpZ,
RenderLoop renderLoop)
eyePositionX - the center of the eyeeyePositionY - the center of the eyeeyePositionZ - the center of the eyeviewFocusX - the point the view looks atviewFocusY - the point the view looks atviewFocusZ - the point the view looks atvecUpX - the vector pointing upvecUpY - the vector pointing upvecUpZ - the vector pointing uprenderLoop - the RenderLoop instance to link this environment with
public Xith3DEnvironment(float eyePositionX,
float eyePositionY,
float eyePositionZ,
float viewFocusX,
float viewFocusY,
float viewFocusZ,
float vecUpX,
float vecUpY,
float vecUpZ)
eyePositionX - the center of the eyeeyePositionY - the center of the eyeeyePositionZ - the center of the eyeviewFocusX - the point the view looks atviewFocusY - the point the view looks atviewFocusZ - the point the view looks atvecUpX - the vector pointing upvecUpY - the vector pointing upvecUpZ - the vector pointing up
public Xith3DEnvironment(org.openmali.vecmath2.Tuple3f eyePosition,
org.openmali.vecmath2.Tuple3f viewFocus,
org.openmali.vecmath2.Tuple3f vecUp,
RenderLoop renderLoop)
eyePosition - the environment's view's location (or null for no View creation)viewFocus - the environment's view's center (where to look at) (or null for no View creation)vecUp - the environment's view's normal which is pointing up (or null for no View creation)renderLoop - the RenderLoop instance to link this environment with
public Xith3DEnvironment(org.openmali.vecmath2.Tuple3f eyePosition,
org.openmali.vecmath2.Tuple3f viewFocus,
org.openmali.vecmath2.Tuple3f vecUp)
eyePosition - the environment's view's location (or null for no View creation)viewFocus - the environment's view's center (where to look at) (or null for no View creation)vecUp - the environment's view's normal which is pointing up (or null for no View creation)public Xith3DEnvironment(RenderLoop renderLoop)
eyePosition defaulted to (0, 0, 5),
viewFocus defaulted to (0, 0, 0), and vecUp defaulted to (0, 1,
0).
renderLoop - the RenderLoop instance to link this environment withpublic Xith3DEnvironment()
eyePosition defaulted to (0, 0, 5),
viewFocus defaulted to (0, 0, 0), and vecUp defaulted to (0, 1,
0).
| Method Detail |
|---|
public void setRenderLoop(RenderLoop renderLoop)
RenderLoop.
renderLoop - the RenderLoop to setpublic final RenderLoop getRenderLoop()
RenderLoop.
RenderLoop to returnpublic final OperationScheduler getOperationScheduler()
OperationScheduler.
OperationSchedulerpublic void setScreenshotEngine(EnvScreenshotEngine engine)
ScreenshotEngine.
engine - the ScreenshotEngine to setpublic EnvScreenshotEngine getScreenshotEngine()
ScreenshotEngine.
ScreenshotEnginepublic void setPickScheduler(PickScheduler picker)
PickScheduler.
picker - the PickScheduler to setpublic PickScheduler getPickScheduler()
PickScheduler.
PickSchedulerpublic void setPhysicsEngine(PhysicsEngine physEngine)
PhysicsEngine, which is automatically updated by the RenderLoop.
physEngine - the PhysicsEngine to setpublic PhysicsEngine getPhysicsEngine()
PhysicsEngine, which is automatically updated by the RenderLoop.
PhysicsEngine
public final void updatePhysicsEngine(long gameTime,
long frameTime,
UpdatingThread.TimingMode timingMode)
PhysicsEngine.
gameTime - frameTime - timingMode -
public final void updateInputSystem(long gameTime,
UpdatingThread.TimingMode timingMode)
InputSystem.
gameTime - timingMode - @Deprecated public void setSoundDriver(SoundDriver soundDriver)
SoundProcessor.getInstance() instead to set the sound driver.
@Deprecated public SoundDriver getSoundDriver()
SoundProcessor.getInstance() instead to get the sound driver.
public Canvas3D addCanvas(Canvas3D canvas,
View view)
addCanvas in interface CanvasBagcanvas - the Canvas3D to be addedview - the view to add the Canvas3D to
public Canvas3D addCanvas(Canvas3D canvas)
addCanvas in interface CanvasBagcanvas - the Canvas3D to be added
public Canvas3DWrapper addCanvas(Canvas3DWrapper canvasWrapper,
View view)
addCanvas in interface CanvasBagcanvasWrapper - the Canvas3D to be addedview - the view to add the Canvas3D to
public Canvas3DWrapper addCanvas(Canvas3DWrapper canvasWrapper)
addCanvas in interface CanvasBagcanvasWrapper - the Canvas3D to be added
public void removeCanvas(Canvas3D canvas)
removeCanvas in interface CanvasBagcanvas - the Canvas3D to be removedpublic void removeCanvas(Canvas3DWrapper canvasWrapper)
removeCanvas in interface CanvasBagcanvasWrapper - the Canvas3D to be removedpublic void removeAllCanvas3Ds()
removeAllCanvas3Ds in interface CanvasBagpublic Canvas3D getCanvas()
getCanvas in interface CanvasBagpublic Canvas3D getCanvas(int index)
getCanvas in interface CanvasBagindex - the desired Canvas3D's index
public void suspendCanvas(Canvas3D canvas)
suspendCanvas in interface CanvasBagcanvas - the arguable Canvas3Dpublic void suspendCanvas(Canvas3DWrapper canvasWrapper)
suspendCanvas in interface CanvasBagcanvasWrapper - the arguable Canvas3D containing Canvas3DWrapperpublic void reviveCanvas(Canvas3D canvas)
reviveCanvas in interface CanvasBagcanvas - the arguable Canvas3Dpublic void reviveCanvas(Canvas3DWrapper canvasWrapper)
reviveCanvas in interface CanvasBagcanvasWrapper - the arguable Canvas3D containing Canvas3DWrapperpublic boolean isCanvasAlive(Canvas3D canvas)
isCanvasAlive in interface CanvasBagcanvas - the arguable Canvas3D
public boolean isCanvasAlive(Canvas3DWrapper canvasWrapper)
isCanvasAlive in interface CanvasBagcanvasWrapper - the arguable Canvas3DWrapper
public void setCanvasRenderPassMap(java.util.HashMap<Canvas3D,java.util.List<RenderPass>> canvasRenderPassMap)
RenderPasses to be rendered to each mapped
canvas. The default value is null, which means, that all RenderPasses
are rendered to each canvas.
canvasRenderPassMap - public void checkRenderPreferences()
public void render(long nanoGameTime,
long nanoFrameTime)
Canvas3Ds.
nanoGameTime - nanoFrameTime - public void render()
Canvas3Ds. This method is usually called by the RenderLoop thread.
It simply invokes render( System.nanoTime(), -1L ).
public void destroy()
public static final Xith3DEnvironment createHeadless(RenderLoop renderLoop)
View) Xith3DEnvironment.
renderLoop - the RenderLoop instance to link this environment withpublic static final Xith3DEnvironment createHeadless()
View) Xith3DEnvironment.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||