Open Reality Reference Guide
FBRenderer Class Reference

Open Reality renderer interface. More...

#include <fbrenderer.h>

Inheritance diagram for FBRenderer:

Public Member Functions

 FBRenderer (HIObject pObject)
 Constructor. More...
 
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. More...
 
bool RenderBegin (int pX, int pY, int pW, int pH)
 RenderBegin. More...
 
bool RenderEnd (FBView *pView=NULL)
 RenderEnd. More...
 
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. More...
 
bool Render (int pLayer=-1)
 Renders one frame. More...
 
void OGLSetupSceneLights (FBRenderOptions &pRenderOptions)
 Setup the scene lights in OpenGL. More...
 
void OGLModelDisplay (FBRenderOptions &pRenderOptions, FBModel &pModel)
 
bool SetViewingOptions (FBViewingOptions &pOptions)
 Set the viewing options. More...
 
FBViewingOptionsGetViewingOptions ()
 Obtain the current viewing options. More...
 
bool FrameCurrentCameraWithModels (bool pAll)
 Frame the current camera either with all models or with the currently selected models. More...
 
void ArrangeSelectedObjectsInSchematic ()
 Request to arrange selected objects in schematic view . More...
 
bool ArrangeObjectsInSchematicFromModel (const FBModel &pModel)
 Request to arrange a node's tree in the Schematic View, given a starting node. More...
 
void ArrangeAllInSchematic (FBArrangeMode pMode)
 Request to arrange all objects in schematic view . More...
 
bool GetSchematicNodesBoundingBox (bool pConsiderCollapsedNodes, int &pTop, int &pLeft, int &pBottom, int &pRight)
 Returns the bounding box (top, left, bottom, right) used by all the Schematic View nodes. More...
 
bool GetSchematicNodesBoundingBoxFromModel (FBModel *pModel, bool pConsiderCollapsedNodes, int &pTop, int &pLeft, int &pBottom, int &pRight)
 Returns the bounding box (top, left, bottom, right) of a node's tree in the Schematic View, given a starting node. More...
 
FBStringList GetSchematicBookmarkNames () const
 Return the bookmark names available in the Schematic View. More...
 
const char * GetCurrentSchematicBookmarkName () const
 Return the current bookmark name used by the Schematic View. More...
 
bool IsCurrentSchematicBookmarkDirty () const
 Return if the current bookmark used by the Schematic View is dirty or not. More...
 
bool CreateSchematicBookmark (const char *pBookmarkName)
 Create a new bookmark in the Schematic View. More...
 
bool DeleteSchematicBookmark (const char *pBookmarkName)
 Delete a bookmark from the Schematic View. More...
 
bool RenameSchematicBookmark (const char *pOldBookmarkName, const char *pNewBookmarkName)
 Rename a bookmark in the Schematic View. More...
 
bool SelectSchematicBookmark (const char *pBookmarkName)
 Select an existing bookmark in the Schematic View and use it as the current bookmark. More...
 
bool UpdateCurrentSchematicBookmark ()
 Update the current bookmark in the Schematic View. More...
 
bool MouseInput (int pX, int pY, FBInputType pInputType, int pButtonKey, FBInputModifier pModifier, int pWheelDeltaValue=0, int pLayer=-1)
 Mouse input. More...
 
bool MouseInputNormalized (float pX, float pY, FBInputType pInputType, int pButtonKey, FBInputModifier pModifier, int pWheelDeltaValue, int pLayer=-1, int pPaneId=-1)
 Mouse input. More...
 
bool Pick (int pX, int pY, FBPickInfosList &pPickInfosList, bool pNeedIntersectPosition=false)
 Object picking selection. More...
 
bool PickNormalized (float pX, float pY, FBPickInfosList &pPickInfosList, bool pNeedIntersectPosition=false, int pPaneId=-1)
 Object picking selection. More...
 
bool RectPick (int pX1, int pY1, int pX2, int pY2, FBPickInfosList &pPickInfosList)
 Object rectangle selection. More...
 
bool RectPickNormalized (float pX1, float pY1, float pX2, float pY2, FBPickInfosList &pPickInfosList, int pPaneId=-1)
 Object rectangle selection. More...
 
int GetLastPickInfoList (FBPickInfosList &pPickInfosList)
 Return the last picking info list in the current view pane. More...
 
void KeyboardInput (FBDeviceKeyboardKey pKeyIndex, bool pKeyState, bool pIsTrigger=false)
 Keyboard input. More...
 
FBModelGetDisplayableGeometry (int pIndex)
 Get the displayable geometry model. More...
 
FBLightGetDisplayableLight (int pIndex)
 Get the displayable light. More...
 
const FBModelListGetDisplayableGeometryInCameraFrustum (FBModelList *pModelList=NULL, FBCamera *pCamera=NULL)
 Get a list of displayable geometry inside given camera's frustum. More...
 
bool IsModelInsideCameraFrustum (FBModel *pGeometry, FBCamera *pCamera=NULL)
 To tell if given model is located inside camera's frustum. More...
 
int GetViewerTextureId ()
 Viewer texture Id. More...
 
void CloneViewAdd (FBView *pView)
 Add a new clone view to call when rendering main viewer. More...
 
void CloneViewRemove (FBView *pView)
 Remove a new clone view to call when rendering main viewer. More...
 
void CloneViewRender (int pWidth, int pHeight)
 Viewer texture Id. More...
 
void SetCameraInPane (FBCamera *pCamera, unsigned int pPaneIndex)
 Set the camera to display in the given pane index. More...
 
FBCameraGetCameraInPane (unsigned int pPaneIndex)
 Return the camera displayed in the given pane index. More...
 
void SetPaneCount (unsigned int pPaneCount)
 Set the number of panes to display in the viewer's layout. More...
 
unsigned int GetPaneCount ()
 Return the number of panes displayed in the viewer's layout. More...
 
bool SetSelectedPaneIndex (unsigned int pPaneIndex)
 Select the pane associated with the given pane index in the active viewer's layout. More...
 
unsigned int GetSelectedPaneIndex () const
 Return the pane index associated with the selected pane in the active viewer's layout. More...
 
void SetSchematicViewInPane (unsigned int pPaneIndex, bool pActive)
 Set/Remove the Schematic View in the given pane index. More...
 
int GetSchematicViewPaneIndex ()
 Return the pane index of the pane displaying the Schematic View. More...
 
void SetCameraSwitcherInPane (unsigned int pPaneIndex, bool pActive)
 Set/Remove the Camera Switcher in the given pane index. More...
 
bool IsCameraSwitcherInPane (unsigned int pPaneIndex)
 Return the Camera Switcher activeness in the given pane index. More...
 
- Public Member Functions inherited from FBComponent
 FBComponent (HIObject pObject)
 Constructor. More...
 
virtual ~FBComponent ()
 Destructor. More...
 
virtual bool FBCreate ()
 Open Reality Creation function. More...
 
virtual void FBDestroy ()
 Open Reality destruction function. More...
 
virtual void FBDelete () override
 Open Reality deletion function. More...
 
virtual bool SetHIObject (HIObject pObject, bool pSDKComponent) override
 Assign component to an internal pointer. More...
 
virtual int PropertyAdd (FBProperty *pProperty)
 Add a property to the component's property manager. More...
 
bool PropertyAddReferenceProperty (FBProperty *pReferenceProperty)
 Add a reference property to the component's property manager. More...
 
void PropertyRemove (FBProperty *pProperty)
 Remove a Property from the component's Property manager. More...
 
void PropertyGetModifiedList (FBArrayTemplate< FBProperty * > &pPropList, FBPlugModificationFlag pModificationFlags)
 Get list of properties which have been modified since last loading. More...
 
FBPropertyPropertyCreate (const char *pName, FBPropertyType pType, const char *pDataType, bool pAnimatable, bool pIsUser=false, FBProperty *pReferenceSource=NULL)
 Create user or dynamic property. More...
 
FBObjectFlag GetObjectFlags ()
 Get all Object Flags (concatenated). More...
 
void SetObjectFlags (FBObjectFlag pFlags)
 SetObjectFlags. More...
 
bool HasObjectFlags (FBObjectFlag pFlags)
 Check whether a specific object flag is enabled. More...
 
void EnableObjectFlags (FBObjectFlag pFlags)
 Enable a specific Object Flags. More...
 
void DisableObjectFlags (FBObjectFlag pFlags)
 Disable a specific Object Flags. More...
 
void SetObjectStatus (FBObjectStatus pStatus, bool pValue)
 Enable/Disable a specific Object Status. More...
 
bool GetObjectStatus (FBObjectStatus pStatus)
 Check to see if an object status is enabled. More...
 
bool ProcessNamespaceHierarchy (FBNamespaceAction pNamespaceAction, const char *pNamespaceName, const char *pReplaceTo=NULL, bool pAddRight=true)
 ProcessNamespaceHierarchy. More...
 
bool ProcessObjectNamespace (FBNamespaceAction pNamespaceAction, const char *pNamespaceName, const char *pReplaceTo=NULL, bool pAddRight=true)
 ProcessObjectNamespace. More...
 
virtual const char * ClassName () override
 Get the class name. More...
 
virtual bool UseCustomPropertyViewSet () const
 Use the custom property viewSet or not. More...
 
const char * GetFullName (void)
 Get the full name. More...
 
void SetOwnerNamespace (FBNamespace *pOwnerNSObj)
 Set the owner Namespace object. More...
 
FBNamespaceGetOwnerNamespace (void)
 Get the owner Namespace object. More...
 
FBFileReferenceGetOwnerFileReference (void)
 Get the owner FileReference object. More...
 
void HardSelect ()
 HardSelect. More...
 
virtual bool Is (int pTypeId) override
 Returns true if object is of type TypeId. More...
 
virtual int GetTypeId () override
 GetTypeId( int pTypeId ) More...
 
- Public Member Functions inherited from FBWrapperHolder
FBScriptWrapperGetWrapper ()
 Return the wrapper interface of this FBObject. More...
 
void AddWrapper (FBScriptWrapper *)
 
void RemoveWrapper (FBScriptWrapper *)
 

Public Attributes

FBPropertyCamera CurrentCamera
 
FBPropertyBool UseCameraSwitcher
 
FBPropertyManipulatorTransform ManipulatorTransform
 Read Only Property: Manipulator responsible of moving objects More...
 
FBPropertyListManipulator Manipulators
 List: of manipulators. More...
 
FBPropertyScene Scene
 Read Write Property: Scene that the renderer will use/draw More...
 
FBPropertyBool AutoEvaluate
 Read Write Property: Indicate if a call to RenderBegin will also cause a re-evaluation of the scene. More...
 
FBPropertyBool EvaluateMode
 Read Write Property: When true (default), call to Render will perform evaluation. Useful when rendering and evaluation needs to be decoupled. More...
 
FBPropertyBool Background
 Read Write Property: The renderer. More...
 
FBPropertyBool ShowStats
 Read Write Property: Show the stats about FPS, Evaluation rate ... like when using Shift-F in main viewer. More...
 
FBPropertyBool FrustumCulling
 Read Write Property: Turn on/off the early frustum culling optimization. More...
 
FBPropertyBool DisplayNormals
 Read Write Property: Display model normals in main viewer. More...
 
FBPropertyBool PickingEnabled
 Read Write Property: Is picking in the viewer enabled? More...
 
FBPropertyBool IDBufferPicking
 Read write Property: Use ID (Color) Buffer for picking, instead of OpenGl selection buffer picking. More...
 
FBPropertyDouble IDBufferPickingAlpha
 Read write Property: Those Semi-transparent (Alpha Blend) geometry(region) contribute less than this threshold, will be considered as invisible during ID picking. More...
 
FBPropertyBool IDBufferDisplay
 Read write Property: Render Model's unique Color ID into color Buffer (used for picking) More...
 
FBPropertyBool SelectionOverride
 Read write Property: Add transparent color override layer on selected models if true. More...
 
FBPropertyDouble SelectionOverrideTransparency
 Read write Property: Selection override layer transparency. More...
 
FBPropertyColor SelectionOverrideColor
 Read write Property: Selection override layer color.
More...
 
FBPropertyBool SelectionForceSnapPointsDisplay
 Read write Property: Force show all feature points (pivots and etc) on selected models if true, ignore individual model's settings. More...
 
FBPropertyInt DisplaySetUpdateId
 Read Only Property: Current DisplaySet Update Id. Add/Delete models, Show/Hide models will affect DisplaySet. More...
 
FBPropertyInt RendererUpdateId
 Read Only Property: Current Render Update Id. DisplaySet update, material change, texture changes and shader change and other operations will trigger Renderer update. More...
 
FBPropertyInt DisplayableGeometryCount
 Read Only Property: Displayable geometry count. More...
 
FBPropertyInt DisplayableLightCount
 Read Only Property: Displayable light count. More...
 
FBPropertyListRendererCallback RendererCallbacks
 List: Renderer Callbacks attached. More...
 
FBPropertyInt RegisteredCallbackCount
 Read Only Property: Registered Renderer Callback Count. More...
 
FBPropertyInt CurrentPaneCallbackIndex
 Read Write Property: Current Pane's Renderer Callback Index. More...
 
FBPropertyInt CurrentPaneCallbackPrefIndex
 Read Write Property: Current Pane's Renderer Callback Preference Index. More...
 
FBPropertyBool HideManipulatorsOnManip
 Read Write Property: Hide manipulators UI elements while manipulating. More...
 
FBPropertyBool HideManipulatorsOnPlayback
 Read Write Property: Hide manipulators UI elements during playback. More...
 
FBPropertyBool AdvancedMaterialMode
 Read write Property: Turn on/off advanced material setting UI widgets. More...
 
FBPropertyBool AdvancedLightingMode
 Read write Property: Turn on/off advanced lighting setting UI widgets. More...
 
- Public Attributes inherited from FBComponent
FBPropertyManager PropertyList
 Read Only Property: Manages all of the properties for the component. More...
 
FBPropertyListComponent Components
 List: List of components. More...
 
FBPropertyListComponent Parents
 List: Parents. More...
 
FBPropertyBool Selected
 Read Write Property: Selected property. More...
 
FBPropertyString Name
 Read Write Property: Unique name of object. More...
 
FBPropertyString LongName
 Read Write Property: Name and namespace for object.
More...
 
FBPropertyFolder Folder
 Read Write Property: The folder that contain this component. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from FBComponent
static int GetInternalClassId ()
 
static void FBComponentSetName (FBComponent *pObject, const char *pName)
 
static const char * FBComponentGetName (FBComponent *pObject)
 
static void FBComponentSetLongName (FBComponent *pObject, const char *pName)
 
static const char * FBComponentGetLongName (FBComponent *pObject)
 
- Static Public Attributes inherited from FBComponent
static int TypeInfo
 Contains the Type information of the object. More...
 
- Protected Member Functions inherited from FBPlug
bool IsSDKComponent ()
 Return whether or not item is an SDK component. More...
 
bool ConnectSrc (FBPlug *pSrc, FBConnectionType pConnectionType=kFBConnectionTypeNone)
 Add a source connection. More...
 
bool ConnectDst (FBPlug *pDst, FBConnectionType pConnectionType=kFBConnectionTypeNone)
 Add a destination connection. More...
 
bool ConnectSrcAt (int pDst_SrcIndex, FBPlug *pSrc, FBConnectionType pConnectionType=kFBConnectionTypeNone)
 Add a source connection. More...
 
bool ConnectDstAt (int pSrc_DstIndex, FBPlug *pDst, FBConnectionType pConnectionType=kFBConnectionTypeNone)
 Add a destination connection. More...
 
bool DisconnectDst (FBPlug *pDst)
 Remove a destination connection. More...
 
bool DisconnectSrc (FBPlug *pSrc)
 Remove a source connection. More...
 
void DisconnectAllSrc ()
 Remove all source connections. More...
 
void DisconnectAllDst ()
 Remove all destination connections. More...
 
bool DisconnectDstAt (int pIndex)
 Remove a destination connection at a specified index. More...
 
bool DisconnectSrcAt (int pIndex)
 Remove a source connection at a specified index. More...
 
bool ReplaceDstAt (int pIndex, FBPlug *pDst)
 Replace a destination connection at a specified index. More...
 
bool ReplaceSrcAt (int pIndex, FBPlug *pSrc)
 Replace a source connection at a specified index. More...
 
bool SwapSrc (int pIndexA, int pIndexB)
 Swap source connection at index A with source connection at index B. More...
 
bool MoveSrcAt (int pIndex, int pAtIndex)
 Move source connection at pIndex to pAtIndex. More...
 
bool MoveSrcAt (FBPlug *pSrc, FBPlug *pAtSrc)
 Move source connection pSrc to the position of pAtSrc. More...
 
int GetSrcCount ()
 Get source connection count. More...
 
FBPlugGetSrc (int pIndex)
 Get a source connection's plug at specified index. More...
 
FBConnectionType GetSrcType (int pIndex)
 Get a source connection's type at specified index. More...
 
int GetDstCount ()
 Get destination connection count. More...
 
FBPlugGetDst (int pIndex)
 Get a destination connection's plug at specified index. More...
 
FBConnectionType GetDstType (int pIndex)
 Get a destination connection's type at specified index. More...
 
bool BeginChange ()
 Begins a change on multiple plugs. More...
 
void EndChange ()
 Ends a change on multiple plugs. More...
 
void SetSelfModified (FBPlugModificationFlag pFlag, bool pBool)
 Set the plug's self modification flag. More...
 
bool GetSelfModified (FBPlugModificationFlag pFlag)
 Tell if the plug's self has changed. More...
 
void SetContentModified (FBPlugModificationFlag pFlag, bool pBool)
 Set the plug's owned property/object's modification flag. More...
 
bool GetContentModified (FBPlugModificationFlag pFlag)
 Tell if the plug's content has changed. More...
 
int GetPlugConnectionModifiedList (FBPlugList &pPlugList, FBPlugModificationFlag pConnectionModificatonFlag, bool pAddRemove)
 Get plug's modified src/dst property/object connection added/removed List. More...
 
bool RevertModification (FBPlugModificationFlag pFlag=kFBAllModifiedMask)
 Revert the plug's modification to original status. More...
 
void SetStatusFlag (FBPlugStatusFlag pStatus, bool pValue)
 Set the plug's status flag. More...
 
bool GetStatusFlag (FBPlugStatusFlag pStatus) const
 Tell if the plug's status has changed. More...
 
FBPlugGetOwner ()
 Get the owner of this plug. More...
 
FBPlugGetOwned (int pIndex)
 Get the owned plug at specified index. More...
 
int GetOwnedCount ()
 Get the owned plug count. More...
 
virtual bool PlugDataNotify (FBConnectionAction pAction, FBPlug *pThis, void *pData=NULL, void *pDataOld=NULL, int pDataSize=0)
 PlugDataNotify when overloaded is equivalent of FBSystem.OnConnectionDataNotify but in the context of the derived object only. More...
 
virtual bool PlugStateNotify (FBConnectionAction pAction, FBPlug *pThis, void *pData=NULL, void *pDataOld=NULL, int pDataSize=0)
 PlugStateNotify when overloaded is equivalent of FBSystem.OnConnectionStateNotify but in the context of the derived object only. More...
 
virtual bool PlugNotify (FBConnectionAction pAction, FBPlug *pThis, int pIndex, FBPlug *pPlug=NULL, FBConnectionType pConnectionType=kFBConnectionTypeNone, FBPlug *pNewPlug=NULL)
 PlugNotify when overloaded is equivalent of FBSystem.OnConnectionNotify but in the context of the derived object only. More...
 
- Static Protected Member Functions inherited from FBPlug
static int GetInternalClassId ()
 Internal class Id. More...
 
- Protected Attributes inherited from FBPlug
bool mAllocated
 Contain the Allocation State of the Component. More...
 
HIObject mObject
 Handle on the Plug. More...
 
bool mSDKComponent
 bool Plug is an SDK component.
More...
 
- Static Protected Attributes inherited from FBPlug
static const char * ClassGroupName
 ClassGroupName of the object. More...
 
static int TypeInfo
 TypeInfo. More...
 
static int mGlobalTypeInfo
 Represente the Type Index. More...
 

Detailed Description

Open Reality renderer interface.

Definition at line 445 of file fbrenderer.h.

Constructor & Destructor Documentation

◆ FBRenderer()

FBRenderer ( HIObject  pObject)

Constructor.

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

Parameters
pObjectFor internal use only.

Member Function Documentation

◆ ArrangeAllInSchematic()

void ArrangeAllInSchematic ( FBArrangeMode  pMode)

Request to arrange all objects in schematic view .

Parameters
pModeArrange mode.

◆ ArrangeObjectsInSchematicFromModel()

bool ArrangeObjectsInSchematicFromModel ( const FBModel pModel)

Request to arrange a node's tree in the Schematic View, given a starting node.

Parameters
pModelThe starting node from which the arrange operation is requested.
Returns
True if the operation is successful, false otherwise.

◆ ArrangeSelectedObjectsInSchematic()

void ArrangeSelectedObjectsInSchematic ( )

Request to arrange selected objects in schematic view .

◆ CloneViewAdd()

void CloneViewAdd ( FBView pView)

Add a new clone view to call when rendering main viewer.

Parameters
pViewView to be called for expose.

◆ CloneViewRemove()

void CloneViewRemove ( FBView pView)

Remove a new clone view to call when rendering main viewer.

Parameters
pViewView to be called for expose.

◆ CloneViewRender()

void CloneViewRender ( int  pWidth,
int  pHeight 
)

Viewer texture Id.

This function starts/stop rendering to an additional buffer which can be accessed with GetViewerTextureId() without the need to turn VideoOut Online.

Parameters
pStateSet On/Off texture viewer generation. If false, GetViewerTextureId() will not return a valid texture.

◆ CreateSchematicBookmark()

bool CreateSchematicBookmark ( const char *  pBookmarkName)

Create a new bookmark in the Schematic View.

Parameters
pBookmarkNameThe new bookmark name.
Returns
True if the operation is successful, false otherwise. False is returned if the bookmark name is empty or if a bookmark with the given name already exists.

◆ DeleteSchematicBookmark()

bool DeleteSchematicBookmark ( const char *  pBookmarkName)

Delete a bookmark from the Schematic View.

Parameters
pBookmarkNameThe bookmark name to delete.
Returns
True if the operation is successful, false otherwise. False is returned if the bookmark name is empty or if no bookmark exists with the given name.

◆ FrameCurrentCameraWithModels()

bool FrameCurrentCameraWithModels ( bool  pAll)

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

Parameters
pAlltrue to frame with all models.
Returns
true if successful.

◆ GetCameraInPane()

FBCamera* GetCameraInPane ( unsigned int  pPaneIndex)

Return the camera displayed in the given pane index.

If the Schematic View is displayed in the pane associated with the given pane index, the returned camera is the camera that would be displayed if the Schematic View was deactivated. If the Camera Switcher is on in the pane associated with the given pane index, the returned camera is the switcher's current camera.

Note: To operate current camera in Camera Switcher, it is recommended to use FBCameraSwitcher().

Parameters
pPaneIndexThe pane index.
Returns
The camera used in the given pane index, NULL if the pane index is invalid.

◆ GetCurrentSchematicBookmarkName()

const char* GetCurrentSchematicBookmarkName ( ) const

Return the current bookmark name used by the Schematic View.

Returns
The current bookmark name used by the Schematic View. An empty string is returned if there is no current bookmark.

◆ GetDisplayableGeometry()

FBModel* GetDisplayableGeometry ( int  pIndex)

Get the displayable geometry model.

Those geometry models which have Show property ON are considered as "displayable".

Parameters
pIndexdisplayable geometry model index to query.
Returns
displayable geometry model.

◆ GetDisplayableGeometryInCameraFrustum()

const FBModelList& GetDisplayableGeometryInCameraFrustum ( FBModelList pModelList = NULL,
FBCamera pCamera = NULL 
)

Get a list of displayable geometry inside given camera's frustum.

This function will return conservative result. It's possible for some geometry outside of the frustum will be considered to be visible, but it will not skip any real visible geometry. This function should only be called in the main rendering thread.

Parameters
pModelListModelList holding the return models.
pCamerause current camera if NULL.
Returns
Reference to pModelList. if pModelList is NULL return a const reference to internal static FBModelList and consecutive call to this function will invalidate the result of previous call.

◆ GetDisplayableLight()

FBLight* GetDisplayableLight ( int  pIndex)

Get the displayable light.

Those light models which have Show property ON are considered as "displayable".

Parameters
pIndexdisplayable light index to query.
Returns
displayable light.

◆ GetLastPickInfoList()

int GetLastPickInfoList ( FBPickInfosList pPickInfosList)

Return the last picking info list in the current view pane.

Parameters
pPickInfosListThe list of pick infos.
Returns
number of item in the list.

◆ GetPaneCount()

unsigned int GetPaneCount ( )

Return the number of panes displayed in the viewer's layout.

Returns
The number of panes displayed.

◆ GetSchematicBookmarkNames()

FBStringList GetSchematicBookmarkNames ( ) const

Return the bookmark names available in the Schematic View.

Returns
A string list containing the bookmark names available in the Schematic View. An empty list is returned if no bookmark is available.

◆ GetSchematicNodesBoundingBox()

bool GetSchematicNodesBoundingBox ( bool  pConsiderCollapsedNodes,
int &  pTop,
int &  pLeft,
int &  pBottom,
int &  pRight 
)

Returns the bounding box (top, left, bottom, right) used by all the Schematic View nodes.

Parameters
pConsiderCollapsedNodesTrue to also consider nodes which are not visible because collapsed, false otherwise.
pTopTop value of the bounding box. Will be filled once the method returns.
pLeftLeft value of the bounding box. Will be filled once the method returns.
pBottomBottom value of the bounding box. Will be filled once the method returns.
pRightRight value of the bounding box. Will be filled once the method returns.
Returns
True if the operation is successful, false otherwise (e.g. the Schematic View has any node in it, etc.).

◆ GetSchematicNodesBoundingBoxFromModel()

bool GetSchematicNodesBoundingBoxFromModel ( FBModel pModel,
bool  pConsiderCollapsedNodes,
int &  pTop,
int &  pLeft,
int &  pBottom,
int &  pRight 
)

Returns the bounding box (top, left, bottom, right) of a node's tree in the Schematic View, given a starting node.

Parameters
pModelThe starting node from which the bounding box tree is requested.
pConsiderCollapsedNodesTrue to also consider nodes which are not visible because collapsed, false otherwise.
pTopTop value of the bounding box. Will be filled once the method returns.
pLeftLeft value of the bounding box. Will be filled once the method returns.
pBottomBottom value of the bounding box. Will be filled once the method returns.
pRightRight value of the bounding box. Will be filled once the method returns.
Returns
True if the operation is successful, false otherwise (e.g. the starting node is not in the Schematic View, etc.).

◆ GetSchematicViewPaneIndex()

int GetSchematicViewPaneIndex ( )

Return the pane index of the pane displaying the Schematic View.

Returns
The pane index of the pane displaying the Schematic View, -1 if the Schematic View is currently not displayed in any pane.

◆ GetSelectedPaneIndex()

unsigned int GetSelectedPaneIndex ( ) const

Return the pane index associated with the selected pane in the active viewer's layout.

Returns
The selected pane index.

◆ GetViewerTextureId()

int GetViewerTextureId ( )

Viewer texture Id.

This function is returning the texture Id of the viewer pane and also making sure the opengl context is current

Returns
Texture Id of the viewer when Videoout is Online.

◆ GetViewingOptions()

FBViewingOptions* GetViewingOptions ( )

Obtain the current viewing options.

Returns
A structure that can be queried and updated for a call to SetViewingOptions.

◆ IsCameraSwitcherInPane()

bool IsCameraSwitcherInPane ( unsigned int  pPaneIndex)

Return the Camera Switcher activeness in the given pane index.

If the Schematic View is displayed in the pane associated with the given pane index, the returned value is the value that would be returned if the Schematic View was deactivated.

Parameters
pPaneIndexThe pane index.
Returns
True if the Camera Switcher is active in the pane associated with the given pane index, False otherwise.

◆ IsCurrentSchematicBookmarkDirty()

bool IsCurrentSchematicBookmarkDirty ( ) const

Return if the current bookmark used by the Schematic View is dirty or not.

Returns
True if the current bookmark is dirty, false otherwise. False is returned if there is no current bookmark.

◆ IsModelInsideCameraFrustum()

bool IsModelInsideCameraFrustum ( FBModel pGeometry,
FBCamera pCamera = NULL 
)

To tell if given model is located inside camera's frustum.

This function will return conservative result. It's possible for some geometry outside of the frustum will be considered to be visible, but it will not skip any real visible geometry. This function should only be called in the main rendering thread.

Parameters
pGeometrythe geometry to be queried.
pCamerause current camera if NULL.
Returns
true if Model is inside camera frustum.

◆ KeyboardInput()

void KeyboardInput ( FBDeviceKeyboardKey  pKeyIndex,
bool  pKeyState,
bool  pIsTrigger = false 
)

Keyboard input.

Parameters
pKeyIndexKey index. (See "enum FBDeviceKeyboardKey" above for supported keys)
pKeyStateKey state. (True == key is down, False == key is up)
pIsTriggerWhen setting pKeyState to True, resets key state to False right after operation.

◆ MouseInput()

bool MouseInput ( int  pX,
int  pY,
FBInputType  pInputType,
int  pButtonKey,
FBInputModifier  pModifier,
int  pWheelDeltaValue = 0,
int  pLayer = -1 
)

Mouse input.

Parameters
pXX position.
pYY position.
pInputTypeType of input.
pButtonKeyButton/Key pressed.
pModifierModifier pressed (CTRL/ALT/SHIFT).
pWheelDeltaValueMouse wheel delta value
pLayerRendering layer ID(default=-1).
Returns
true if successful.

◆ MouseInputNormalized()

bool MouseInputNormalized ( float  pX,
float  pY,
FBInputType  pInputType,
int  pButtonKey,
FBInputModifier  pModifier,
int  pWheelDeltaValue,
int  pLayer = -1,
int  pPaneId = -1 
)

Mouse input.

Parameters
pXX position, normalized to the range of [0, 1] in the view port dimension.
pYY position, normalized to the range of [0, 1] in the view port dimension.
pInputTypeType of input.
pButtonKeyButton/Key pressed.
pModifierModifier pressed (CTRL/ALT/SHIFT).
pWheelDeltaValueMouse wheel delta value
pLayerRendering layer ID(default=-1).
pPaneIdspecify which pane's dimension used for normalization, default (-1) for the whole viewer.
Returns
true if successful.

◆ OGLSetupSceneLights()

void OGLSetupSceneLights ( FBRenderOptions pRenderOptions)

Setup the scene lights in OpenGL.

Parameters
pRenderOptionsSee FBRenderOptions for more detail.

◆ Pick()

bool Pick ( int  pX,
int  pY,
FBPickInfosList pPickInfosList,
bool  pNeedIntersectPosition = false 
)

Object picking selection.

Parameters
pXX position.
pYY position.
pPickInfosListThe list of pick infos.
pNeedIntersectPositionrequire valid intersection position if true, this will take more time to process, and not reliable with very dense mesh.

◆ PickNormalized()

bool PickNormalized ( float  pX,
float  pY,
FBPickInfosList pPickInfosList,
bool  pNeedIntersectPosition = false,
int  pPaneId = -1 
)

Object picking selection.

Parameters
pXX position, normalized to the range of [0, 1] in the view port dimension.
pYY position, normalized to the range of [0, 1] in the view port dimension.
pPickInfosListThe list of pick infos.
pNeedIntersectPositionrequire valid intersection position if true, this will take more time to process, and not reliable with very dense mesh.
pPaneIdspecify which pane's dimension used for normalization, default (-1) for the whole viewer.

◆ PreRender()

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
pLayerRendering layer ID(default=-1).
Returns
true if successful.

◆ RectPick()

bool RectPick ( int  pX1,
int  pY1,
int  pX2,
int  pY2,
FBPickInfosList pPickInfosList 
)

Object rectangle selection.

Parameters
pX1Left upper corner X position.
pY1Left upper corner y position.
pX2Right bottom corner X position.
pY2Right bottom corner y position.
pPickInfosListThe list of pick infos.

◆ RectPickNormalized()

bool RectPickNormalized ( float  pX1,
float  pY1,
float  pX2,
float  pY2,
FBPickInfosList pPickInfosList,
int  pPaneId = -1 
)

Object rectangle selection.

Parameters
pX1Left upper corner X position, normalized to the range of [0, 1] in the viewport dimension.
pY1Left upper corner y position, normalized to the range of [0, 1] in the viewport dimension.
pX2Right bottom corner X position, normalized to the range of [0, 1] in the viewport dimension.
pY2Right bottom corner y position, normalized to the range of [0, 1] in the viewport dimension.
pPickInfosListThe list of pick infos.
pPaneIdspecify which pane's dimension used for normalization, default (-1) for the whole viewer.

◆ RenameSchematicBookmark()

bool RenameSchematicBookmark ( const char *  pOldBookmarkName,
const char *  pNewBookmarkName 
)

Rename a bookmark in the Schematic View.

Parameters
pOldBookmarkNameThe bookmark name to rename.
pNewBookmarkNameThe new bookmark name.
Returns
True if the operation is successful, false otherwise. False is returned if the old/new bookmark name is empty, if the old bookmark doesn't exist or if a bookmark with the new given name already exists.

◆ Render()

bool Render ( int  pLayer = -1)

Renders one frame.

Parameters
pLayerRendering layer ID(default=-1).
Returns
true if successful.

◆ RenderBegin()

bool RenderBegin ( int  pX,
int  pY,
int  pW,
int  pH 
)

RenderBegin.

Parameters
pXX position where to render.
pYY position where to render.
pWWidth of render area.
pHHight of render area.

must be called before rendering can happen

◆ RenderEnd()

bool RenderEnd ( FBView pView = NULL)

RenderEnd.

Parameters
pViewIf 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.

◆ SelectSchematicBookmark()

bool SelectSchematicBookmark ( const char *  pBookmarkName)

Select an existing bookmark in the Schematic View and use it as the current bookmark.

Parameters
pBookmarkNameThe bookmark name to select.
Returns
True if the operation is successful, false otherwise. False is returned if the bookmark name is empty or if no bookmark exists with the given name.

◆ SetCameraInPane()

void SetCameraInPane ( FBCamera pCamera,
unsigned int  pPaneIndex 
)

Set the camera to display in the given pane index.

If the Schematic View is displayed in the pane associated with the given pane index, the camera will be displayed when the Schematic View will be deactivated from this pane.

Note: If current pane uses Camera Switcher, it will be set to use Camera, rather than old behavior that still uses Camera Switcher and sets Camera to be Camera Switcher's current camera, which introduce a Zombie Camera Switcher problem. By using Camera, the problem is gone.

Note: To operate current camera in Camera Switcher, it is recommended to use FBCameraSwitcher().

Parameters
pCameraThe camera to set.
pPaneIndexThe pane index.

◆ SetCameraSwitcherInPane()

void SetCameraSwitcherInPane ( unsigned int  pPaneIndex,
bool  pActive 
)

Set/Remove the Camera Switcher in the given pane index.

To specify which camera the Camera Switcher should be displaying, use the SetCameraInPane method. If the Schematic View is displayed in the pane associated with the given pane index, the camera switcher will be displayed (if activated) when the Schematic View will be deactivated from this pane.

Parameters
pPaneIndexThe pane index.
pActiveTrue to activate the Camera Switcher in the given pane, False to remove it.

◆ SetPaneCount()

void SetPaneCount ( unsigned int  pPaneCount)

Set the number of panes to display in the viewer's layout.

Parameters
pPaneCountThe number of panes to display.

◆ SetSchematicViewInPane()

void SetSchematicViewInPane ( unsigned int  pPaneIndex,
bool  pActive 
)

Set/Remove the Schematic View in the given pane index.

When activating the Schematic View in the pane, if the Schematic View is already activated in another pane, the Schematic View will be removed from latter before being activated into the new pane.

Parameters
pPaneIndexThe pane index.
pActiveTrue to activate the Schematic View in the given pane, False to remove it.

◆ SetSelectedPaneIndex()

bool SetSelectedPaneIndex ( unsigned int  pPaneIndex)

Select the pane associated with the given pane index in the active viewer's layout.

Parameters
pPaneIndexThe pane index.
Returns
True if the operation is successful, False otherwise.

◆ SetViewingOptions()

bool SetViewingOptions ( FBViewingOptions pOptions)

Set the viewing options.

Parameters
pOptionsSee FBViewingOptions for more detail.

◆ SetViewport()

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
pXX position where to render.
pYY position where to render.
pWWidth of render area.
pHHight of render area.

◆ UpdateCurrentSchematicBookmark()

bool UpdateCurrentSchematicBookmark ( )

Update the current bookmark in the Schematic View.

Returns
True if the operation is successful, false otherwise. False is returned if there is no current bookmark.

Member Data Documentation

◆ AdvancedLightingMode

FBPropertyBool AdvancedLightingMode

Read write Property: Turn on/off advanced lighting setting UI widgets.

Include UI widgets for various advanced lighting setting, includes: Light: area light, spot light inner/outer angles, barndoors and etc.,; Model: PrimaryVisibility, CastsShadows and ReceiveShadows.

MoBu default render doesn't utilize those advanced lighting properties, they're provided for pipeline interop and custom plugin development purpose. This property must been set to be true before creating any scene light or model objects to allow UI widgets display properly.

it's equivalent to the config item "AdvancedLightingUISetting" at [Rendering] section"

Definition at line 776 of file fbrenderer.h.

◆ AdvancedMaterialMode

FBPropertyBool AdvancedMaterialMode

Read write Property: Turn on/off advanced material setting UI widgets.

Note
MoBu default render won't utilize those advanced material properties, they're provided for pipeline interop and custom plugin development purpose.

Definition at line 763 of file fbrenderer.h.

◆ AutoEvaluate

FBPropertyBool AutoEvaluate

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

Definition at line 735 of file fbrenderer.h.

◆ Background

FBPropertyBool Background

Read Write Property: The renderer.

Definition at line 737 of file fbrenderer.h.

◆ CurrentCamera

FBPropertyCamera CurrentCamera
Deprecated:
Use SetCameraInPane/GetCameraInPane methods instead.

Definition at line 726 of file fbrenderer.h.

◆ CurrentPaneCallbackIndex

FBPropertyInt CurrentPaneCallbackIndex

Read Write Property: Current Pane's Renderer Callback Index.

Definition at line 755 of file fbrenderer.h.

◆ CurrentPaneCallbackPrefIndex

FBPropertyInt CurrentPaneCallbackPrefIndex

Read Write Property: Current Pane's Renderer Callback Preference Index.

Definition at line 756 of file fbrenderer.h.

◆ DisplayableGeometryCount

FBPropertyInt DisplayableGeometryCount

Read Only Property: Displayable geometry count.

Definition at line 751 of file fbrenderer.h.

◆ DisplayableLightCount

FBPropertyInt DisplayableLightCount

Read Only Property: Displayable light count.

Definition at line 752 of file fbrenderer.h.

◆ DisplayNormals

FBPropertyBool DisplayNormals

Read Write Property: Display model normals in main viewer.

Definition at line 740 of file fbrenderer.h.

◆ DisplaySetUpdateId

FBPropertyInt DisplaySetUpdateId

Read Only Property: Current DisplaySet Update Id. Add/Delete models, Show/Hide models will affect DisplaySet.

Definition at line 749 of file fbrenderer.h.

◆ EvaluateMode

FBPropertyBool EvaluateMode

Read Write Property: When true (default), call to Render will perform evaluation. Useful when rendering and evaluation needs to be decoupled.

Definition at line 736 of file fbrenderer.h.

◆ FrustumCulling

FBPropertyBool FrustumCulling

Read Write Property: Turn on/off the early frustum culling optimization.

Definition at line 739 of file fbrenderer.h.

◆ HideManipulatorsOnManip

FBPropertyBool HideManipulatorsOnManip

Read Write Property: Hide manipulators UI elements while manipulating.

Definition at line 757 of file fbrenderer.h.

◆ HideManipulatorsOnPlayback

FBPropertyBool HideManipulatorsOnPlayback

Read Write Property: Hide manipulators UI elements during playback.

Definition at line 758 of file fbrenderer.h.

◆ IDBufferDisplay

FBPropertyBool IDBufferDisplay

Read write Property: Render Model's unique Color ID into color Buffer (used for picking)

Definition at line 744 of file fbrenderer.h.

◆ IDBufferPicking

FBPropertyBool IDBufferPicking

Read write Property: Use ID (Color) Buffer for picking, instead of OpenGl selection buffer picking.

Definition at line 742 of file fbrenderer.h.

◆ IDBufferPickingAlpha

FBPropertyDouble IDBufferPickingAlpha

Read write Property: Those Semi-transparent (Alpha Blend) geometry(region) contribute less than this threshold, will be considered as invisible during ID picking.

Definition at line 743 of file fbrenderer.h.

◆ Manipulators

List: of manipulators.

Definition at line 731 of file fbrenderer.h.

◆ ManipulatorTransform

FBPropertyManipulatorTransform ManipulatorTransform

Read Only Property: Manipulator responsible of moving objects

Definition at line 730 of file fbrenderer.h.

◆ PickingEnabled

FBPropertyBool PickingEnabled

Read Write Property: Is picking in the viewer enabled?

Definition at line 741 of file fbrenderer.h.

◆ RegisteredCallbackCount

FBPropertyInt RegisteredCallbackCount

Read Only Property: Registered Renderer Callback Count.

Definition at line 754 of file fbrenderer.h.

◆ RendererCallbacks

FBPropertyListRendererCallback RendererCallbacks

List: Renderer Callbacks attached.

Definition at line 753 of file fbrenderer.h.

◆ RendererUpdateId

FBPropertyInt RendererUpdateId

Read Only Property: Current Render Update Id. DisplaySet update, material change, texture changes and shader change and other operations will trigger Renderer update.

Definition at line 750 of file fbrenderer.h.

◆ Scene

FBPropertyScene Scene

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

Definition at line 734 of file fbrenderer.h.

◆ SelectionForceSnapPointsDisplay

FBPropertyBool SelectionForceSnapPointsDisplay

Read write Property: Force show all feature points (pivots and etc) on selected models if true, ignore individual model's settings.

Definition at line 748 of file fbrenderer.h.

◆ SelectionOverride

FBPropertyBool SelectionOverride

Read write Property: Add transparent color override layer on selected models if true.

Definition at line 745 of file fbrenderer.h.

◆ SelectionOverrideColor

FBPropertyColor SelectionOverrideColor

Read write Property: Selection override layer color.

Definition at line 747 of file fbrenderer.h.

◆ SelectionOverrideTransparency

FBPropertyDouble SelectionOverrideTransparency

Read write Property: Selection override layer transparency.

Definition at line 746 of file fbrenderer.h.

◆ ShowStats

FBPropertyBool ShowStats

Read Write Property: Show the stats about FPS, Evaluation rate ... like when using Shift-F in main viewer.

Definition at line 738 of file fbrenderer.h.

◆ UseCameraSwitcher

FBPropertyBool UseCameraSwitcher
Deprecated:
Use SetCameraSwitcherInPane/IsCameraSwitcherInPane methods instead.

Definition at line 727 of file fbrenderer.h.


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