vtk
Class vtkRenderer

java.lang.Object
  extended byvtk.vtkObjectBase
      extended byvtk.vtkObject
          extended byvtk.vtkViewport
              extended byvtk.vtkRenderer
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
vtkOpenGLRenderer

public class vtkRenderer
extends vtkViewport
implements java.io.Serializable

vtkRenderer - abstract specification for renderers. vtkRenderer provides an abstract specification for renderers. A renderer is an object that controls the rendering process for objects. Rendering is the process of converting geometry, a specification for lights, and a camera view into an image. vtkRenderer also performs coordinate transformation between world coordinates, view coordinates (the computer graphics rendering coordinate system), and display coordinates (the actual screen coordinates on the display device). Certain advanced rendering features such as two-sided lighting can also be controlled. JavaBean wrapper for vtkRenderer object.

Author:
vtk2jbean Automatic JavaBean wrapper for VTK.
See Also:
vtkRenderWindow, vtkActor, vtkCamera, vtkLight, Serialized Form

Field Summary
protected  java.beans.PropertyChangeSupport changes
           
 
Fields inherited from class vtk.vtkObjectBase
vtkId
 
Constructor Summary
  vtkRenderer()
           
protected vtkRenderer(int dmy)
           
 
Method Summary
 void addActor(vtkProp id0)
          Add/Remove different types of props to the renderer.
 void addCuller(vtkCuller id0)
          Add an culler to the list of cullers.
 void addLight(vtkLight id0)
          Add a light to the list of lights.
 void addVolume(vtkProp id0)
          Add/Remove different types of props to the renderer.
 void automaticLightCreationOff()
          Turn on/off a flag which disables the automatic light creation capability.
 void automaticLightCreationOn()
          Turn on/off a flag which disables the automatic light creation capability.
 void backingStoreOff()
          Turn on/off using backing store.
 void backingStoreOn()
          Turn on/off using backing store.
 void clear()
          Clear the image to the background color.
 double[] computeVisiblePropBounds()
          Wrapper-friendly version of ComputeVisiblePropBounds
 void computeVisiblePropBounds(double[] id0)
          Compute the bounding box of all the visible props Used in ResetCamera() and ResetCameraClippingRange()
 void createLight()
          Create and add a light to renderer.
 void deviceRender()
          Create an image.
 vtkCamera getActiveCamera()
          Get the current camera.
 vtkActorCollection getActors()
          Return any actors in this renderer.
 double getAllocatedRenderTime()
          Set/Get the amount of time this renderer is allowed to spend rendering its scene.
 double[] getAmbient()
          Set the intensity of ambient lighting.
 int getAutomaticLightCreation()
          Turn on/off a flag which disables the automatic light creation capability.
 int getBackingStore()
          Turn on/off using backing store.
 java.lang.String getClassName()
          Return the class name as a string.
 vtkCullerCollection getCullers()
          Return the collection of cullers.
 int getInteractive()
          Turn on/off interactive status.
 double getLastRenderTimeInSeconds()
          Get the time required, in seconds, for the last Render call.
 int getLayer()
          Set/Get the layer that this renderer belongs to.
 int getLightFollowCamera()
          Turn on/off the automatic repositioning of lights as the camera moves.
 vtkLightCollection getLights()
          Return the collection of lights.
 int getMTime()
          Return the MTime of the renderer also considering its ivars.
 double getNearClippingPlaneTolerance()
          Specify tolerance for near clipping plane distance to the camera as a percentage of the far clipping plane distance.
 int getNumberOfPropsRendered()
          Should be used internally only during a render Get the number of props that were rendered using a RenderOpaqueGeometry or RenderTranslucentGeometry call.
 vtkRenderWindow getRenderWindow()
          Specify the rendering window in which to draw.
 vtkRenderer getThisRenderer()
           
 double getTimeFactor()
          Get the ratio between allocated time and actual render time.
 int getTwoSidedLighting()
          Turn on/off two-sided lighting of surfaces.
 vtkVolumeCollection getVolumes()
          Return the collection of volumes.
 vtkWindow getVTKWindow()
          Specify the rendering window in which to draw.
 double getZ(int id0, int id1)
          Given a pixel location, return the Z value
 void interactiveOff()
          Turn on/off interactive status.
 void interactiveOn()
          Turn on/off interactive status.
 int isA(java.lang.String id0)
          Return 1 if this class is the same type of (or a subclass of) the named class.
 void lightFollowCameraOff()
          Turn on/off the automatic repositioning of lights as the camera moves.
 void lightFollowCameraOn()
          Turn on/off the automatic repositioning of lights as the camera moves.
 vtkCamera makeCamera()
          Create a new Camera sutible for use with this type of Renderer.
 vtkLight makeLight()
          Create a new Light sutible for use with this type of Renderer.
 vtkAssemblyPath pickProp(double id0, double id1)
          Return the prop (via a vtkAssemblyPath) that has the highest z value at the given x, y position in the viewport.
 void removeActor(vtkProp id0)
          Add/Remove different types of props to the renderer.
 void removeCuller(vtkCuller id0)
          Remove an actor from the list of cullers.
 void removeLight(vtkLight id0)
          Remove a light from the list of lights.
 void removeVolume(vtkProp id0)
          Add/Remove different types of props to the renderer.
 void render()
          Create an image.
 void resetCamera()
          Automatically set up the camera based on the visible actors.
 void resetCamera(double[] id0)
          Automatically set up the camera based on a specified bounding box (xmin,xmax, ymin,ymax, zmin,zmax).
 void resetCamera(double id0, double id1, double id2, double id3, double id4, double id5)
          Alternative version of ResetCamera(bounds[6]);
 void resetCameraClippingRange()
          Reset the camera clipping range based on the bounds of the visible actors.
 void resetCameraClippingRange(double[] id0)
          Reset the camera clipping range based on a bounding box.
 void resetCameraClippingRange(double id0, double id1, double id2, double id3, double id4, double id5)
          Reset the camera clipping range based on a bounding box.
 void setActiveCamera(vtkCamera id0)
          Specify the camera to use for this renderer.
 void setAllocatedRenderTime(double id0)
          Set/Get the amount of time this renderer is allowed to spend rendering its scene.
 void setAmbient(double[] id0)
          Set the intensity of ambient lighting.
 void setAmbient(double id0, double id1, double id2)
          Set the intensity of ambient lighting.
 void setAutomaticLightCreation(int id0)
          Turn on/off a flag which disables the automatic light creation capability.
 void setBackingStore(int id0)
          Turn on/off using backing store.
 void setInteractive(int id0)
          Turn on/off interactive status.
 void setLayer(int id0)
          Set/Get the layer that this renderer belongs to.
 void setLightFollowCamera(int id0)
          Turn on/off the automatic repositioning of lights as the camera moves.
 void setNearClippingPlaneTolerance(double id0)
          Specify tolerance for near clipping plane distance to the camera as a percentage of the far clipping plane distance.
 void setRenderWindow(vtkRenderWindow id0)
          Specify the rendering window in which to draw.
 void setTwoSidedLighting(int id0)
          Turn on/off two-sided lighting of surfaces.
 int transparent()
          Returns a boolean indicating if this renderer is transparent.
 void twoSidedLightingOff()
          Turn on/off two-sided lighting of surfaces.
 void twoSidedLightingOn()
          Turn on/off two-sided lighting of surfaces.
 int updateLightsGeometryToFollowCamera()
          Ask the lights in the scene that are not in world space (for instance, Headlights or CameraLights that are attached to the camera) to update their geometry to match the active camera.
 void viewToWorld()
          Convert view point coordinates to world coordinates.
 int visibleActorCount()
          Returns the number of visible actors.
 int visibleVolumeCount()
          Returns the number of visible volumes.
protected  void VTKCastInit()
           
 void VTKInit()
           
 void worldToView()
          Convert world point coordinates to view coordinates.
 
Methods inherited from class vtk.vtkViewport
addActor2D, addProp, computeAspect, displayToView, displayToWorld, getActors2D, getAspect, getBackground, getCenter, getDisplayPoint, getIsPicking, getOrigin, getPickedZ, getPickX, getPickY, getPixelAspect, getProps, getSize, getThisViewport, getViewPoint, getViewport, getWorldPoint, hasProp, isInViewport, pickPropFrom, removeActor2D, removeAllProps, removeProp, setAspect, setAspect, setBackground, setBackground, setDisplayPoint, setDisplayPoint, setPixelAspect, setPixelAspect, setViewPoint, setViewPoint, setViewport, setViewport, setWorldPoint, setWorldPoint, viewToDisplay, worldToDisplay
 
Methods inherited from class vtk.vtkObject
AddObserver, breakOnError, debugOff, debugOn, getDebug, getGlobalWarningDisplay, getThisObject, globalWarningDisplayOff, globalWarningDisplayOn, hasObserver, hasObserver, invokeEvent, invokeEvent, modified, Print, PrintRevisions, register, removeObserver, removeObservers, removeObservers, setDebug, setGlobalWarningDisplay, unRegister
 
Methods inherited from class vtk.vtkObjectBase
addPropertyChangeListener, finalize, getReferenceCount, getThisObjectBase, isTypeOf, removePropertyChangeListener, setReferenceCount, VTKDelete
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

changes

protected java.beans.PropertyChangeSupport changes
Constructor Detail

vtkRenderer

public vtkRenderer()

vtkRenderer

protected vtkRenderer(int dmy)
Method Detail

getThisRenderer

public vtkRenderer getThisRenderer()

getClassName

public java.lang.String getClassName()
Description copied from class: vtkObjectBase
Return the class name as a string. This method is defined in all subclasses of vtkObjectBase with the vtkTypeRevisionMacro found in vtkSetGet.h.

Overrides:
getClassName in class vtkViewport

isA

public int isA(java.lang.String id0)
Description copied from class: vtkObjectBase
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.

Overrides:
isA in class vtkViewport

addActor

public void addActor(vtkProp id0)
Add/Remove different types of props to the renderer. These methods are all synonyms to AddProp and RemoveProp. They are here for convenience and backwards compatibility.


addVolume

public void addVolume(vtkProp id0)
Add/Remove different types of props to the renderer. These methods are all synonyms to AddProp and RemoveProp. They are here for convenience and backwards compatibility.


removeActor

public void removeActor(vtkProp id0)
Add/Remove different types of props to the renderer. These methods are all synonyms to AddProp and RemoveProp. They are here for convenience and backwards compatibility.


removeVolume

public void removeVolume(vtkProp id0)
Add/Remove different types of props to the renderer. These methods are all synonyms to AddProp and RemoveProp. They are here for convenience and backwards compatibility.


addLight

public void addLight(vtkLight id0)
Add a light to the list of lights.


removeLight

public void removeLight(vtkLight id0)
Remove a light from the list of lights.


getLights

public vtkLightCollection getLights()
Return the collection of lights.


createLight

public void createLight()
Create and add a light to renderer.


makeLight

public vtkLight makeLight()
Create a new Light sutible for use with this type of Renderer. For example, a vtkMesaRenderer should create a vtkMesaLight in this function. The default is to just call vtkLight::New.


getTwoSidedLighting

public int getTwoSidedLighting()
Turn on/off two-sided lighting of surfaces. If two-sided lighting is off, then only the side of the surface facing the light(s) will be lit, and the other side dark. If two-sided lighting on, both sides of the surface will be lit.


setTwoSidedLighting

public void setTwoSidedLighting(int id0)
Turn on/off two-sided lighting of surfaces. If two-sided lighting is off, then only the side of the surface facing the light(s) will be lit, and the other side dark. If two-sided lighting on, both sides of the surface will be lit.


twoSidedLightingOn

public void twoSidedLightingOn()
Turn on/off two-sided lighting of surfaces. If two-sided lighting is off, then only the side of the surface facing the light(s) will be lit, and the other side dark. If two-sided lighting on, both sides of the surface will be lit.


twoSidedLightingOff

public void twoSidedLightingOff()
Turn on/off two-sided lighting of surfaces. If two-sided lighting is off, then only the side of the surface facing the light(s) will be lit, and the other side dark. If two-sided lighting on, both sides of the surface will be lit.


setLightFollowCamera

public void setLightFollowCamera(int id0)
Turn on/off the automatic repositioning of lights as the camera moves. If LightFollowCamera is on, lights that are designated as Headlights or CameraLights will be adjusted to move with this renderer's camera. If LightFollowCamera is off, the lights will not be adjusted. (Note: In previous versions of vtk, this light-tracking functionality was part of the interactors, not the renderer. For backwards compatibility, the older, more limited interactor behavior is enabled by default. To disable this mode, turn the interactor's LightFollowCamera flag OFF, and leave the renderer's LightFollowCamera flag ON.)


getLightFollowCamera

public int getLightFollowCamera()
Turn on/off the automatic repositioning of lights as the camera moves. If LightFollowCamera is on, lights that are designated as Headlights or CameraLights will be adjusted to move with this renderer's camera. If LightFollowCamera is off, the lights will not be adjusted. (Note: In previous versions of vtk, this light-tracking functionality was part of the interactors, not the renderer. For backwards compatibility, the older, more limited interactor behavior is enabled by default. To disable this mode, turn the interactor's LightFollowCamera flag OFF, and leave the renderer's LightFollowCamera flag ON.)


lightFollowCameraOn

public void lightFollowCameraOn()
Turn on/off the automatic repositioning of lights as the camera moves. If LightFollowCamera is on, lights that are designated as Headlights or CameraLights will be adjusted to move with this renderer's camera. If LightFollowCamera is off, the lights will not be adjusted. (Note: In previous versions of vtk, this light-tracking functionality was part of the interactors, not the renderer. For backwards compatibility, the older, more limited interactor behavior is enabled by default. To disable this mode, turn the interactor's LightFollowCamera flag OFF, and leave the renderer's LightFollowCamera flag ON.)


lightFollowCameraOff

public void lightFollowCameraOff()
Turn on/off the automatic repositioning of lights as the camera moves. If LightFollowCamera is on, lights that are designated as Headlights or CameraLights will be adjusted to move with this renderer's camera. If LightFollowCamera is off, the lights will not be adjusted. (Note: In previous versions of vtk, this light-tracking functionality was part of the interactors, not the renderer. For backwards compatibility, the older, more limited interactor behavior is enabled by default. To disable this mode, turn the interactor's LightFollowCamera flag OFF, and leave the renderer's LightFollowCamera flag ON.)


getAutomaticLightCreation

public int getAutomaticLightCreation()
Turn on/off a flag which disables the automatic light creation capability. Normally in VTK if no lights are associated with the renderer, then a light is automatically created. However, in special circumstances this feature is undesirable, so the following boolean is provided to disable automatic light creation. (Turn AutomaticLightCreation off if you do not want lights to be created.)


setAutomaticLightCreation

public void setAutomaticLightCreation(int id0)
Turn on/off a flag which disables the automatic light creation capability. Normally in VTK if no lights are associated with the renderer, then a light is automatically created. However, in special circumstances this feature is undesirable, so the following boolean is provided to disable automatic light creation. (Turn AutomaticLightCreation off if you do not want lights to be created.)


automaticLightCreationOn

public void automaticLightCreationOn()
Turn on/off a flag which disables the automatic light creation capability. Normally in VTK if no lights are associated with the renderer, then a light is automatically created. However, in special circumstances this feature is undesirable, so the following boolean is provided to disable automatic light creation. (Turn AutomaticLightCreation off if you do not want lights to be created.)


automaticLightCreationOff

public void automaticLightCreationOff()
Turn on/off a flag which disables the automatic light creation capability. Normally in VTK if no lights are associated with the renderer, then a light is automatically created. However, in special circumstances this feature is undesirable, so the following boolean is provided to disable automatic light creation. (Turn AutomaticLightCreation off if you do not want lights to be created.)


updateLightsGeometryToFollowCamera

public int updateLightsGeometryToFollowCamera()
Ask the lights in the scene that are not in world space (for instance, Headlights or CameraLights that are attached to the camera) to update their geometry to match the active camera.


getVolumes

public vtkVolumeCollection getVolumes()
Return the collection of volumes.


getActors

public vtkActorCollection getActors()
Return any actors in this renderer.


setActiveCamera

public void setActiveCamera(vtkCamera id0)
Specify the camera to use for this renderer.


getActiveCamera

public vtkCamera getActiveCamera()
Get the current camera.


makeCamera

public vtkCamera makeCamera()
Create a new Camera sutible for use with this type of Renderer. For example, a vtkMesaRenderer should create a vtkMesaCamera in this function. The default is to just call vtkCamera::New.


addCuller

public void addCuller(vtkCuller id0)
Add an culler to the list of cullers.


removeCuller

public void removeCuller(vtkCuller id0)
Remove an actor from the list of cullers.


getCullers

public vtkCullerCollection getCullers()
Return the collection of cullers.


setAmbient

public void setAmbient(double id0,
                       double id1,
                       double id2)
Set the intensity of ambient lighting.


setAmbient

public void setAmbient(double[] id0)
Set the intensity of ambient lighting.


getAmbient

public double[] getAmbient()
Set the intensity of ambient lighting.


setAllocatedRenderTime

public void setAllocatedRenderTime(double id0)
Set/Get the amount of time this renderer is allowed to spend rendering its scene. This is used by vtkLODActor's.


getAllocatedRenderTime

public double getAllocatedRenderTime()
Set/Get the amount of time this renderer is allowed to spend rendering its scene. This is used by vtkLODActor's.


getTimeFactor

public double getTimeFactor()
Get the ratio between allocated time and actual render time. TimeFactor has been taken out of the render process. It is still computed in case someone finds it useful. It may be taken away in the future.


render

public void render()
Create an image. This is a superclass method which will in turn call the DeviceRender method of Subclasses of vtkRenderer


deviceRender

public void deviceRender()
Create an image. Subclasses of vtkRenderer must implement this method.


clear

public void clear()
Clear the image to the background color.


visibleActorCount

public int visibleActorCount()
Returns the number of visible actors.


visibleVolumeCount

public int visibleVolumeCount()
Returns the number of visible volumes.


computeVisiblePropBounds

public void computeVisiblePropBounds(double[] id0)
Compute the bounding box of all the visible props Used in ResetCamera() and ResetCameraClippingRange()


computeVisiblePropBounds

public double[] computeVisiblePropBounds()
Wrapper-friendly version of ComputeVisiblePropBounds


resetCameraClippingRange

public void resetCameraClippingRange()
Reset the camera clipping range based on the bounds of the visible actors. This ensures that no props are cut off


resetCameraClippingRange

public void resetCameraClippingRange(double[] id0)
Reset the camera clipping range based on a bounding box. This method is called from ResetCameraClippingRange()


resetCameraClippingRange

public void resetCameraClippingRange(double id0,
                                     double id1,
                                     double id2,
                                     double id3,
                                     double id4,
                                     double id5)
Reset the camera clipping range based on a bounding box. This method is called from ResetCameraClippingRange()


setNearClippingPlaneTolerance

public void setNearClippingPlaneTolerance(double id0)
Specify tolerance for near clipping plane distance to the camera as a percentage of the far clipping plane distance.


getNearClippingPlaneTolerance

public double getNearClippingPlaneTolerance()
Specify tolerance for near clipping plane distance to the camera as a percentage of the far clipping plane distance.


resetCamera

public void resetCamera()
Automatically set up the camera based on the visible actors. The camera will reposition itself to view the center point of the actors, and move along its initial view plane normal (i.e., vector defined from camera position to focal point) so that all of the actors can be seen.


resetCamera

public void resetCamera(double[] id0)
Automatically set up the camera based on a specified bounding box (xmin,xmax, ymin,ymax, zmin,zmax). Camera will reposition itself so that its focal point is the center of the bounding box, and adjust its distance and position to preserve its initial view plane normal (i.e., vector defined from camera position to focal point). Note: is the view plane is parallel to the view up axis, the view up axis will be reset to one of the three coordinate axes.


resetCamera

public void resetCamera(double id0,
                        double id1,
                        double id2,
                        double id3,
                        double id4,
                        double id5)
Alternative version of ResetCamera(bounds[6]);


setRenderWindow

public void setRenderWindow(vtkRenderWindow id0)
Specify the rendering window in which to draw. This is automatically set when the renderer is created by MakeRenderer. The user probably shouldn't ever need to call this method.


getRenderWindow

public vtkRenderWindow getRenderWindow()
Specify the rendering window in which to draw. This is automatically set when the renderer is created by MakeRenderer. The user probably shouldn't ever need to call this method.


getVTKWindow

public vtkWindow getVTKWindow()
Specify the rendering window in which to draw. This is automatically set when the renderer is created by MakeRenderer. The user probably shouldn't ever need to call this method.

Overrides:
getVTKWindow in class vtkViewport

setBackingStore

public void setBackingStore(int id0)
Turn on/off using backing store. This may cause the re-rendering time to be slightly slower when the view changes. But it is much faster when the image has not changed, such as during an expose event.


getBackingStore

public int getBackingStore()
Turn on/off using backing store. This may cause the re-rendering time to be slightly slower when the view changes. But it is much faster when the image has not changed, such as during an expose event.


backingStoreOn

public void backingStoreOn()
Turn on/off using backing store. This may cause the re-rendering time to be slightly slower when the view changes. But it is much faster when the image has not changed, such as during an expose event.


backingStoreOff

public void backingStoreOff()
Turn on/off using backing store. This may cause the re-rendering time to be slightly slower when the view changes. But it is much faster when the image has not changed, such as during an expose event.


setInteractive

public void setInteractive(int id0)
Turn on/off interactive status. An interactive renderer is one that can receive events from an interactor. Should only be set if there are multiple renderers in the same section of the viewport.


getInteractive

public int getInteractive()
Turn on/off interactive status. An interactive renderer is one that can receive events from an interactor. Should only be set if there are multiple renderers in the same section of the viewport.


interactiveOn

public void interactiveOn()
Turn on/off interactive status. An interactive renderer is one that can receive events from an interactor. Should only be set if there are multiple renderers in the same section of the viewport.


interactiveOff

public void interactiveOff()
Turn on/off interactive status. An interactive renderer is one that can receive events from an interactor. Should only be set if there are multiple renderers in the same section of the viewport.


setLayer

public void setLayer(int id0)
Set/Get the layer that this renderer belongs to. This is only used if there are layered renderers.


getLayer

public int getLayer()
Set/Get the layer that this renderer belongs to. This is only used if there are layered renderers.


transparent

public int transparent()
Returns a boolean indicating if this renderer is transparent. It is transparent if it is not in the deepest layer of its render window.


worldToView

public void worldToView()
Convert world point coordinates to view coordinates.

Overrides:
worldToView in class vtkViewport

viewToWorld

public void viewToWorld()
Convert view point coordinates to world coordinates.

Overrides:
viewToWorld in class vtkViewport

getZ

public double getZ(int id0,
                   int id1)
Given a pixel location, return the Z value


getMTime

public int getMTime()
Return the MTime of the renderer also considering its ivars.

Overrides:
getMTime in class vtkObject

getLastRenderTimeInSeconds

public double getLastRenderTimeInSeconds()
Get the time required, in seconds, for the last Render call.


getNumberOfPropsRendered

public int getNumberOfPropsRendered()
Should be used internally only during a render Get the number of props that were rendered using a RenderOpaqueGeometry or RenderTranslucentGeometry call. This is used to know if something is in the frame buffer.


pickProp

public vtkAssemblyPath pickProp(double id0,
                                double id1)
Return the prop (via a vtkAssemblyPath) that has the highest z value at the given x, y position in the viewport. Basically, the top most prop that renders the pixel at selectionX, selectionY will be returned. If nothing was picked then NULL is returned. This method selects from the renderers Prop list.

Overrides:
pickProp in class vtkViewport

VTKInit

public void VTKInit()
Overrides:
VTKInit in class vtkObject

VTKCastInit

protected void VTKCastInit()
Overrides:
VTKCastInit in class vtkViewport


Copyright © 2004 Sydney ViSLAB. All Rights Reserved.