Sweet Home 3D 3.4

com.eteks.sweethome3d.j3d
Class PhotoRenderer

java.lang.Object
  extended by com.eteks.sweethome3d.j3d.PhotoRenderer

public class PhotoRenderer
extends java.lang.Object

A renderer able to create a photo realistic image of a home.

Author:
Emmanuel Puybaret, Frédéric Mantegazza (Sun location algorithm)

Nested Class Summary
static class PhotoRenderer.Quality
           
static class PhotoRenderer.SphereLightWithNoRepresentation
          A SunFlow sphere light with no representation.
 
Constructor Summary
PhotoRenderer(Home home, Object3DFactory object3DFactory, PhotoRenderer.Quality quality)
          Creates an instance ready to render the scene matching the given home.
PhotoRenderer(Home home, PhotoRenderer.Quality quality)
          Creates an instance ready to render the scene matching the given home.
 
Method Summary
 void render(java.awt.image.BufferedImage image, Camera camera, java.awt.image.ImageObserver observer)
          Renders home in image at the given camera location and image size.
 void stop()
          Stops the rendering process.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PhotoRenderer

public PhotoRenderer(Home home,
                     PhotoRenderer.Quality quality)
              throws java.io.IOException
Creates an instance ready to render the scene matching the given home.

Throws:
java.io.IOException - if texture image files required in the scene couldn't be created.

PhotoRenderer

public PhotoRenderer(Home home,
                     Object3DFactory object3DFactory,
                     PhotoRenderer.Quality quality)
              throws java.io.IOException
Creates an instance ready to render the scene matching the given home.

Parameters:
home - the home to render
object3DFactory - a factory able to create 3D objects from home items. The createObject3D of this factory is expected to return an instance of Node in current implementation.
Throws:
java.io.IOException - if texture image files required in the scene couldn't be created.
Method Detail

render

public void render(java.awt.image.BufferedImage image,
                   Camera camera,
                   java.awt.image.ImageObserver observer)
Renders home in image at the given camera location and image size. The rendered objects of the home are the ones given in constructor, meaning any change made in home since the instantiation of this renderer won't be updated.


stop

public void stop()
Stops the rendering process.


Sweet Home 3D 3.4

? Copyrights 2006-2011 eTeks - All rights reserved
Distributed under GNU General Public License