VTK
Public Member Functions | Protected Attributes | List of all members
vtkRenderState Class Reference

Context in which a vtkRenderPass will render. More...

#include <vtkRenderState.h>

Collaboration diagram for vtkRenderState:
[legend]

Public Member Functions

 vtkRenderState (vtkRenderer *renderer)
 
 ~vtkRenderState ()
 
bool IsValid () const
 
vtkRendererGetRenderer () const
 
vtkFrameBufferObjectGetFrameBuffer () const
 
void SetFrameBuffer (vtkFrameBufferObject *fbo)
 
void GetWindowSize (int size[2]) const
 
vtkProp ** GetPropArray () const
 
int GetPropArrayCount () const
 
vtkInformationGetRequiredKeys () const
 
void SetRequiredKeys (vtkInformation *keys)
 
 vtkRenderState (vtkRenderer *renderer)
 
 ~vtkRenderState ()
 
bool IsValid () const
 
vtkRendererGetRenderer () const
 
vtkFrameBufferObjectGetFrameBuffer () const
 
void SetFrameBuffer (vtkFrameBufferObject *fbo)
 
void GetWindowSize (int size[2]) const
 
vtkProp ** GetPropArray () const
 
int GetPropArrayCount () const
 
vtkInformationGetRequiredKeys () const
 
void SetRequiredKeys (vtkInformation *keys)
 
void SetPropArrayAndCount (vtkProp **propArray, int propArrayCount)
 
void SetPropArrayAndCount (vtkProp **propArray, int propArrayCount)
 

Protected Attributes

vtkRendererRenderer
 
vtkFrameBufferObjectFrameBuffer
 
vtkInformationRequiredKeys
 
vtkProp ** PropArray
 
int PropArrayCount
 

Detailed Description

Context in which a vtkRenderPass will render.

vtkRenderState is a ligthweight effective class which gather information used by a vtkRenderPass to perform its execution.

Attention
Get methods are const to enforce that a renderpass cannot modify the RenderPass object. It works in conjunction with vtkRenderPass::Render where the argument vtkRenderState is const.
See also
vtkRenderPass vtkRenderer vtkFrameBufferObject vtkProp

Definition at line 39 of file vtkRenderState.h.

Constructor & Destructor Documentation

vtkRenderState::vtkRenderState ( vtkRenderer renderer)

Constructor. All values are initialized to 0 or NULL.

Precondition
renderer_exists: renderer!=0
Postcondition
renderer_is_set: GetRenderer()==renderer.
valid_state: IsValid()
vtkRenderState::~vtkRenderState ( )

Destructor. As a vtkRenderState does not own any of its variables, the destructor does nothing.

vtkRenderState::vtkRenderState ( vtkRenderer renderer)

Constructor. All values are initialized to 0 or NULL.

Precondition
renderer_exists: renderer!=0
Postcondition
renderer_is_set: GetRenderer()==renderer.
valid_state: IsValid()
vtkRenderState::~vtkRenderState ( )

Destructor. As a vtkRenderState does not own any of its variables, the destructor does nothing.

Member Function Documentation

bool vtkRenderState::IsValid ( ) const

Tells if the RenderState is a valid one (Renderer is not null).

vtkRenderer* vtkRenderState::GetRenderer ( ) const

Return the Renderer. This is the renderer in which the render pass is performed. It gives access to the RenderWindow, to the props.

Postcondition
result_exists: result!=0
vtkFrameBufferObject* vtkRenderState::GetFrameBuffer ( ) const

Return the FrameBuffer. This is the framebuffer in use. NULL means it is the FrameBuffer provided by the RenderWindow (it can actually be an FBO in case the RenderWindow is in off screen mode).

void vtkRenderState::SetFrameBuffer ( vtkFrameBufferObject fbo)

Set the FrameBuffer. See GetFrameBuffer().

Postcondition
is_set: GetFrameBuffer()==fbo
void vtkRenderState::GetWindowSize ( int  size[2]) const

Get the window size of the state.

vtkProp** vtkRenderState::GetPropArray ( ) const

Return the array of filtered props. See SetPropArrayAndCount().

int vtkRenderState::GetPropArrayCount ( ) const

Return the size of the array of filtered props. See SetPropArrayAndCount().

Postcondition
positive_result: result>=0
void vtkRenderState::SetPropArrayAndCount ( vtkProp **  propArray,
int  propArrayCount 
)

Set the array of of filtered props and its size. It is a subset of props to render. A renderpass might ignore this filtered list and access to all the props of the vtkRenderer object directly. For example, a render pass may filter props that are visible and not culled by the frustum, but a sub render pass building a shadow map may need all the visible props.

Precondition
positive_size: propArrayCount>=0
valid_null_array: propArray!=0 || propArrayCount==0
Postcondition
is_set: GetPropArray()==propArray && GetPropArrayCount()==propArrayCount
vtkInformation* vtkRenderState::GetRequiredKeys ( ) const

Return the required property keys for the props. It tells that the current render pass it supposed to render only props that have all the RequiredKeys in their property keys.

void vtkRenderState::SetRequiredKeys ( vtkInformation keys)

Set the required property keys for the props. See GetRequiredKeys().

Postcondition
is_set: GetRequiredKeys()==keys
bool vtkRenderState::IsValid ( ) const

Tells if the RenderState is a valid one (Renderer is not null).

vtkRenderer* vtkRenderState::GetRenderer ( ) const

Return the Renderer. This is the renderer in which the render pass is performed. It gives access to the RenderWindow, to the props.

Postcondition
result_exists: result!=0
vtkFrameBufferObject* vtkRenderState::GetFrameBuffer ( ) const

Return the FrameBuffer. This is the framebuffer in use. NULL means it is the FrameBuffer provided by the RenderWindow (it can actually be an FBO in case the RenderWindow is in off screen mode).

void vtkRenderState::SetFrameBuffer ( vtkFrameBufferObject fbo)

Set the FrameBuffer. See GetFrameBuffer().

Postcondition
is_set: GetFrameBuffer()==fbo
void vtkRenderState::GetWindowSize ( int  size[2]) const

Get the window size of the state.

vtkProp** vtkRenderState::GetPropArray ( ) const

Return the array of filtered props. See SetPropArrayAndCount().

int vtkRenderState::GetPropArrayCount ( ) const

Return the size of the array of filtered props. See SetPropArrayAndCount().

Postcondition
positive_result: result>=0
void vtkRenderState::SetPropArrayAndCount ( vtkProp **  propArray,
int  propArrayCount 
)

Set the array of of filtered props and its size. It is a subset of props to render. A renderpass might ignore this filtered list and access to all the props of the vtkRenderer object directly. For example, a render pass may filter props that are visible and not culled by the frustum, but a sub render pass building a shadow map may need all the visible props.

Precondition
positive_size: propArrayCount>=0
valid_null_array: propArray!=0 || propArrayCount==0
Postcondition
is_set: GetPropArray()==propArray && GetPropArrayCount()==propArrayCount
vtkInformation* vtkRenderState::GetRequiredKeys ( ) const

Return the required property keys for the props. It tells that the current render pass it supposed to render only props that have all the RequiredKeys in their property keys.

void vtkRenderState::SetRequiredKeys ( vtkInformation keys)

Set the required property keys for the props. See GetRequiredKeys().

Postcondition
is_set: GetRequiredKeys()==keys

Member Data Documentation

vtkRenderer * vtkRenderState::Renderer
protected

The renderer in which the render pass is performed. It gives access to the RenderWindow, to the props.

Definition at line 104 of file vtkRenderState.h.

vtkFrameBufferObject * vtkRenderState::FrameBuffer
protected

The framebuffer in use. NULL means the FrameBuffer provided by the RenderWindow (it can actually be an FBO in case the RenderWindow is in off screen mode).

Definition at line 109 of file vtkRenderState.h.

vtkProp ** vtkRenderState::PropArray
protected

Subset of props to render. A renderpass might ignore this filtered list and access to all the props of the vtkRenderer object directly. For example, a render pass may filter props that are visible and not culled by the frustum, but a sub render pass building a shadow map may need all the visible props.

Definition at line 117 of file vtkRenderState.h.

int vtkRenderState::PropArrayCount
protected

Subset of props to render. A renderpass might ignore this filtered list and access to all the props of the vtkRenderer object directly. For example, a render pass may filter props that are visible and not culled by the frustum, but a sub render pass building a shadow map may need all the visible props.

Definition at line 118 of file vtkRenderState.h.

vtkInformation * vtkRenderState::RequiredKeys
protected

It tells that the current render pass it supposed to render only props that have all the RequiredKeys in their property keys.

Definition at line 123 of file vtkRenderState.h.


The documentation for this class was generated from the following file: