See samples: render.py, CameraSwitcher.py.
Public Member Functions |
|
FBRenderer () | |
Constructor. |
|
bool | FrameCurrentCameraWithModels (bool pAll) |
Frame the current camera either with all
models or with the currently selected models. |
|
FBViewingOptions | GetViewingOptions () |
Obtain the current viewing options. |
|
KeyboardInput (FBDeviceKeyboardKey pKeyIndex, bool pKeyState, bool pIsTrigger=False) | |
Keyboard input. |
|
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. |
|
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 | RenderBegin (int pX, int pY, int pW, int pH) |
RenderBegin. |
|
bool | RenderEnd (FBView pView=None) |
RenderEnd. |
|
bool | SetViewingOptions (FBViewingOptions pOptions) |
Set the viewing options. |
|
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.
|
|
Public Attributes |
|
bool | AutoEvaluate |
Read Write Property: Indicate if a
call to RenderBegin will also cause a re-evaluation of the scene.
|
|
bool | Background |
Read Write Property: The renderer.
|
|
FBColor | ClearColor |
Read Write Property: Clear color.
|
|
FBCamera | CurrentCamera |
Read Write Property: Current camera.
if UseCameraSwitcher is on, this will Get/Set camera switcher's
current camera; |
|
int | LayerCount |
Read Write Property: Number of
sorting layers. |
|
FBScene | Scene |
Read Write Property: Scene that the
renderer will use/draw |
|
bool | UseCameraSwitcher |
Read Write Property:
Activate/Deactivate usage of camera switcher for the first model
view of main viewer. |
|
FBViewerInfos | ViewerInfos |
Read Only Property: Used to display
information about the current scene. Will be present in any
rendered images. |
|
FBZSortMode | ZSortMode |
Read Write Property: Z sorting
method. |
FBRenderer | ( | ) |
Frame the current camera either with all models or with the currently selected models.
pAll | true to frame with all models. |
FBViewingOptions GetViewingOptions | ( | ) |
Obtain the current viewing options.
KeyboardInput | ( | FBDeviceKeyboardKey | pKeyIndex, | |
bool | pKeyState, | |||
bool | pIsTrigger = False |
|||
) |
Keyboard input.
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. |
bool MouseInput | ( | int | pX, | |
int | pY, | |||
FBInputType | pInputType, | |||
int | pButtonKey, | |||
FBInputModifier | pModifier, | |||
int | pLayer = -1 |
|||
) |
Mouse input.
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). |
bool Pick | ( | int | pX, | |
int | pY, | |||
FBPickInfosList | pPickInfosList, | |||
bool | pNeedIntersectPoistion =
False |
|||
) |
Object picking.
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. |
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.
pLayer | Rendering layer ID(default=-1). |
Renders one frame.
pLayer | Rendering layer ID(default=-1). |
RenderBegin.
must be called before rendering can happen
pX | X position where to render. | |
pY | Y position where to render. | |
pW | Width of render area. | |
pH | Hight of render area. |
RenderEnd.
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. |
bool SetViewingOptions | ( | FBViewingOptions | pOptions | ) |
Set the viewing options.
pOptions | See FBViewingOptions for more detail. |
Must be called before inputing if the same renderer is used on multiple views/cameras in the same application.
pX | X position where to render. | |
pY | Y position where to render. | |
pW | Width of render area. | |
pH | Hight of render area. |
Read Write Property: Indicate if a call to RenderBegin will also cause a re-evaluation of the scene.
Read Write Property: The renderer.
Read Write Property: Clear color.
Read Write Property: Current camera. if UseCameraSwitcher is on, this will Get/Set camera switcher's current camera;
Read Write Property: Number of sorting layers.
Read Write Property: Activate/Deactivate usage of camera switcher for the first model view of main viewer.
Read Only Property: Used to display information about the current scene. Will be present in any rendered images.
Read Write Property: Z sorting method.