|
Sweet Home 3D 3.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.eteks.sweethome3d.j3d.Component3DManager
public class Component3DManager
Manager of Canvas3D
instantiations and Java 3D error listeners.
Note: this class is compatible with Java 3D 1.3 at runtime but requires Java 3D 1.5 to compile.
Nested Class Summary | |
---|---|
static interface |
Component3DManager.RenderingErrorObserver
An observer that receives error notifications in Java 3D. |
static interface |
Component3DManager.RenderingObserver
An observer that receives notifications during the different steps of the loop rendering a canvas 3D. |
Method Summary | |
---|---|
static Component3DManager |
getInstance()
Returns an instance of this singleton. |
Canvas3D |
getOffScreenCanvas3D(int width,
int height)
Returns a new off screen canva3D at the given size. |
java.awt.image.BufferedImage |
getOffScreenImage(View view,
int width,
int height)
Returns an image at the given size of the 3D view . |
Canvas3D |
getOnscreenCanvas3D()
Returns a new on screen canva3D instance. |
Canvas3D |
getOnscreenCanvas3D(Component3DManager.RenderingObserver renderingObserver)
Returns a new on screen canva3D instance which rendering will be observed
with the given rendering observer. |
Canvas3D |
getOnscreenCanvas3D(java.awt.GraphicsConfiguration deviceConfiguration,
Component3DManager.RenderingObserver renderingObserver)
Returns a new on screen canva3D instance which rendering will be observed
with the given rendering observer. |
Component3DManager.RenderingErrorObserver |
getRenderingErrorObserver()
Returns the current rendering error listener bound to VirtualUniverse . |
boolean |
isOffScreenImageSupported()
Returns true if offscreen is supported in Java 3D on user system. |
void |
setRenderingErrorObserver(Component3DManager.RenderingErrorObserver observer)
Sets the current rendering error listener bound to VirtualUniverse . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Component3DManager getInstance()
public void setRenderingErrorObserver(Component3DManager.RenderingErrorObserver observer)
VirtualUniverse
.
public Component3DManager.RenderingErrorObserver getRenderingErrorObserver()
VirtualUniverse
.
public boolean isOffScreenImageSupported()
true
if offscreen is supported in Java 3D on user system.
Will always return false
if com.eteks.sweethome3d.j3d.checkOffScreenSupport
system is equal to false
. By default, com.eteks.sweethome3d.j3d.checkOffScreenSupport
is equal to true
.
public Canvas3D getOnscreenCanvas3D()
canva3D
instance. The returned canvas 3D will be associated
with the graphics configuration of the default screen device.
IllegalRenderingStateException
- if the canvas 3D couldn't be created.public Canvas3D getOnscreenCanvas3D(Component3DManager.RenderingObserver renderingObserver)
canva3D
instance which rendering will be observed
with the given rendering observer. The returned canvas 3D will be associated with the
graphics configuration of the default screen device.
renderingObserver
- an observer of the 3D rendering process of the returned canvas.
Caution: The methods of the observer will be called in 3D rendering loop thread.
IllegalRenderingStateException
- if the canvas 3D couldn't be created.public Canvas3D getOnscreenCanvas3D(java.awt.GraphicsConfiguration deviceConfiguration, Component3DManager.RenderingObserver renderingObserver)
canva3D
instance which rendering will be observed
with the given rendering observer.
renderingObserver
- an observer of the 3D rendering process of the returned canvas.
Caution: The methods of the observer will be called in 3D rendering loop thread.
IllegalRenderingStateException
- if the canvas 3D couldn't be created.public Canvas3D getOffScreenCanvas3D(int width, int height)
canva3D
at the given size.
IllegalRenderingStateException
- if the canvas 3D couldn't be created.
To avoid this exception, call isOffScreenImageSupported()
first.public java.awt.image.BufferedImage getOffScreenImage(View view, int width, int height)
view
.
This image is created with an off screen canvas.
IllegalRenderingStateException
- if the image couldn't be created.
|
Sweet Home 3D 3.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
![]() |
? Copyrights 2006-2011 eTeks - All rights reserved
Distributed under GNU General Public License |