Public Member Functions | Public Attributes

FBRenderer Class Reference

This reference page is linked to from the following overview topics: FBSystem - The System Class, FBCamera - Cameras.


Search for all occurrences

Detailed Description

Open Reality renderer interface.

Definition at line 305 of file fbrenderer.h.

#include <fbrenderer.h>

Inheritance diagram for FBRenderer:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  FBRenderer (HIObject pObject)
  Constructor.
void  SetViewport (int pX, int pY, int pW, int pH)
  Must be called before inputing if the same renderer is used on multiple views/cameras in the same application.
bool  RenderBegin (int pX, int pY, int pW, int pH)
  RenderBegin.
bool  RenderEnd (HFBView pView=NULL)
  RenderEnd.
bool  PreRender (int pLayer=-1)
  PreRenders one frame (needed for some shaders) This functions destroys the frame buffer content and must be called every time a render is called the typical order of call must be Renderer->Prerender // at this point the frame buffer is garbage -Clear the ogl -Do your render functions Renderer->Render.
bool  Render (int pLayer=-1)
  Renders one frame.
bool  SetViewingOptions (FBViewingOptions &pOptions)
  Set the viewing options.
FBViewingOptions GetViewingOptions ()
  Obtain the current viewing options.
bool  FrameCurrentCameraWithModels (bool pAll)
  Frame the current camera either with all models or with the currently selected models.
bool  MouseInput (int pX, int pY, FBInputType pInputType, int pButtonKey, FBInputModifier pModifier, int pLayer=-1)
  Mouse input.
bool  Pick (int pX, int pY, FBPickInfosList &pPickInfosList, bool pNeedIntersectPoistion=false)
  Object picking.
void  KeyboardInput (FBDeviceKeyboardKey pKeyIndex, bool pKeyState, bool pIsTrigger=false)
  Keyboard input.

Public Attributes

FBPropertyCamera  CurrentCamera
  Read Write Property: Current camera.
FBPropertyBool  UseCameraSwitcher
  Read Write Property: Activate/Deactivate usage of camera switcher for the first model view of main viewer.
FBPropertyManipulatorTransform  ManipulatorTransform
  Read Only Property: Manipulator responsible of moving objects
FBPropertyListManipulator  Manipulators
  List: of manipulators.
FBPropertyScene  Scene
  Read Write Property: Scene that the renderer will use/draw
FBPropertyBool  AutoEvaluate
  Read Write Property: Indicate if a call to RenderBegin will also cause a re-evaluation of the scene.
FBPropertyBool  Background
  Read Write Property: The renderer.
FBPropertyBool  ShowStats
  Read Write Property: Show the stats about FPS, Evaluation rate ...
FBPropertyBool  DisplayNormals
  Read Write Property: Display model normals in main viewer.
FBPropertyViewerInfos  ViewerInfos
  Read Only Property: Used to display information about the current scene.

Constructor & Destructor Documentation

FBRenderer ( HIObject  pObject )

Constructor.

Client code cannot instantiate objects of this class. The FBSystem and FBScene classes provide access to the current renderer.

Parameters:
pObject For internal use only.

Member Function Documentation

void SetViewport ( int  pX,
int  pY,
int  pW,
int  pH 
)

Must be called before inputing if the same renderer is used on multiple views/cameras in the same application.

Parameters:
pX X position where to render.
pY Y position where to render.
pW Width of render area.
pH Hight of render area.
bool RenderBegin ( int  pX,
int  pY,
int  pW,
int  pH 
)

RenderBegin.

Parameters:
pX X position where to render.
pY Y position where to render.
pW Width of render area.
pH Hight of render area.

must be called before rendering can happen

bool RenderEnd ( HFBView  pView = NULL )

RenderEnd.

Parameters:
pView If you want the renderer to draw artifacts, such as TimeCode, CameraLabel or SafeArea, you must provide the FBView on which the renderer draws on.
Remarks:
Must be called at the end of rendering.
bool PreRender ( int  pLayer = -1 )

PreRenders one frame (needed for some shaders) This functions destroys the frame buffer content and must be called every time a render is called the typical order of call must be Renderer->Prerender // at this point the frame buffer is garbage -Clear the ogl -Do your render functions Renderer->Render.

Parameters:
pLayer Rendering layer ID(default=-1).
Returns:
true if successful.
bool Render ( int  pLayer = -1 )

Renders one frame.

Parameters:
pLayer Rendering layer ID(default=-1).
Returns:
true if successful.
bool SetViewingOptions ( FBViewingOptions pOptions )

Set the viewing options.

Parameters:
pOptions See FBViewingOptions for more detail.
FBViewingOptions* GetViewingOptions ( )

Obtain the current viewing options.

Returns:
A sctructure that can be queried and updated for a call to SetViewingOptions.
bool FrameCurrentCameraWithModels ( bool  pAll )

Frame the current camera either with all models or with the currently selected models.

Parameters:
pAll true to frame with all models.
Returns:
true if successful.
bool MouseInput ( int  pX,
int  pY,
FBInputType  pInputType,
int  pButtonKey,
FBInputModifier  pModifier,
int  pLayer = -1 
)

Mouse input.

Parameters:
pX X position.
pY Y position.
pInputType Type of input.
pButtonKey Button/Key pressed.
pModifier Modifier pressed (CTRL/ALT/SHIFT).
pLayer Rendering layer ID(default=-1).
Returns:
true if successful.
bool Pick ( int  pX,
int  pY,
FBPickInfosList pPickInfosList,
bool  pNeedIntersectPoistion = false 
)

Object picking.

Parameters:
pX X position.
pY Y position.
pPickInfosList The list of models hit, and the location of the hit.
pNeedIntersectPoistion require valid intersection position if true, this will take more time to process, and not reliable with very dense mesh.
void KeyboardInput ( FBDeviceKeyboardKey  pKeyIndex,
bool  pKeyState,
bool  pIsTrigger = false 
)

Keyboard input.

Parameters:
pKeyIndex Key index. (See "enum FBDeviceKeyboardKey" above for supported keys)
pKeyState Key state. (True == key is down, False == key is up)
pIsTrigger When setting pKeyState to True, resets key state to False right after operation.

Member Data Documentation

FBPropertyCamera CurrentCamera

Read Write Property: Current camera.

if UseCameraSwitcher is on, this will Get/Set camera switcher's current camera;

Definition at line 410 of file fbrenderer.h.

Read Write Property: Activate/Deactivate usage of camera switcher for the first model view of main viewer.

Definition at line 411 of file fbrenderer.h.

FBPropertyManipulatorTransform ManipulatorTransform

Read Only Property: Manipulator responsible of moving objects

Definition at line 414 of file fbrenderer.h.

List: of manipulators.

Definition at line 415 of file fbrenderer.h.

FBPropertyScene Scene

Read Write Property: Scene that the renderer will use/draw

Definition at line 418 of file fbrenderer.h.

Read Write Property: Indicate if a call to RenderBegin will also cause a re-evaluation of the scene.

Definition at line 419 of file fbrenderer.h.

Read Write Property: The renderer.

Definition at line 420 of file fbrenderer.h.

Read Write Property: Show the stats about FPS, Evaluation rate ...

like when using Shift-F in main viewer.

Definition at line 421 of file fbrenderer.h.

Read Write Property: Display model normals in main viewer.

Definition at line 422 of file fbrenderer.h.

FBPropertyViewerInfos ViewerInfos

Read Only Property: Used to display information about the current scene.

Will be present in any rendered images.

Definition at line 423 of file fbrenderer.h.


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

FBRenderer FBRenderer FBRenderer FBRenderer FBRenderer FBRenderer FBRenderer FBRenderer FBRenderer FBRenderer
FBRenderer FBRenderer FBRenderer FBRenderer FBRenderer FBRenderer FBRenderer FBRenderer FBRenderer FBRenderer