1 #ifndef __FBRENDERER_H__
2 #define __FBRENDERER_H__
48 #define FBSDK_DLL K_DLLIMPORT
51 #if !defined(K_NO_MANIPULATOR)
62 #ifdef FBSDKUseNamespace
204 bool& ShowTimeCode();
208 bool& ShowSafeArea();
212 bool& ShowCameraLabel();
221 bool IsInSelectionBufferPicking()
const;
225 bool IsInColorBufferPicking()
const;
229 unsigned int RenderCallbackPrefIndex()
const;
234 int PaneIndex()
const;
284 : mModel( pModel ), mPoint( pPoint ), mNormal (pNormal), mSubItemIndex(pSubItemIndex) {};
328 virtual const char* GetCallbackName()
const = 0;
334 virtual const char* GetCallbackDesc()
const = 0;
341 virtual unsigned int GetCallbackPrefCount()
const;
346 virtual const char* GetCallbackPrefName(
unsigned int pIndex)
const;
356 virtual void Attach();
361 virtual void Detach();
386 #define FBRegisterRendererCallback( UniqueNameStr, ClassName, Label, Description, IconFilename ) \
387 HIObject CreateRendererCallback##ClassName( HIObject ,const char* pName,void * ) \
389 ClassName *Class = new ClassName( pName ); \
390 if (Class->FBCreate()) { \
391 return Class->GetHIObject(); \
397 FBLibraryModule( ClassName ) \
399 FBRegisterObject( ClassName##R1,"renderer/callback/ogl",Label,Description,CreateRendererCallback##ClassName,true, IconFilename ); \
406 #define FBRendererCallbackDeclare( ClassName, Parent ) \
407 FBClassDeclare( ClassName,Parent); \
409 ClassName(const char* pName):Parent(pName) { FBClassInit; } \
415 #define FBRendererCallbackImplementation( ThisComponent ) \
416 FBClassImplementation( ThisComponent )
470 void SetViewport(
int pX,
int pY,
int pW,
int pH);
481 bool RenderBegin(
int pX,
int pY,
int pW,
int pH);
502 bool PreRender(
int pLayer = -1);
508 bool Render(
int pLayer = -1);
536 bool FrameCurrentCameraWithModels(
bool pAll);
539 void ArrangeSelectedObjectsInSchematic();
545 bool ArrangeObjectsInSchematicFromModel(
const FBModel& pModel );
560 bool GetSchematicNodesBoundingBox(
bool pConsiderCollapsedNodes,
int& pTop,
int& pLeft,
int& pBottom,
int& pRight );
571 bool GetSchematicNodesBoundingBoxFromModel(
FBModel* pModel,
bool pConsiderCollapsedNodes,
int& pTop,
int& pLeft,
int& pBottom,
int& pRight );
584 bool MouseInput(
int pX,
int pY,
FBInputType pInputType,
int pButtonKey,
FBInputModifier pModifier,
int pWheelDeltaValue=0,
int pLayer = -1);
597 bool MouseInputNormalized(
float pX,
float pY,
FBInputType pInputType,
int pButtonKey,
FBInputModifier pModifier,
int pWheelDeltaValue,
int pLayer = -1,
int pPaneId = -1);
606 bool Pick(
int pX,
int pY,
FBPickInfosList& pPickInfosList,
bool pNeedIntersectPosition =
false );
616 bool PickNormalized(
float pX,
float pY,
FBPickInfosList& pPickInfosList,
bool pNeedIntersectPosition =
false,
int pPaneId = -1);
625 bool RectPick(
int pX1,
int pY1,
int pX2,
int pY2,
FBPickInfosList& pPickInfosList);
635 bool RectPickNormalized(
float pX1,
float pY1,
float pX2,
float pY2,
FBPickInfosList& pPickInfosList,
int pPaneId = -1);
648 void KeyboardInput(
FBDeviceKeyboardKey pKeyIndex,
bool pKeyState,
bool pIsTrigger =
false);
655 FBModel* GetDisplayableGeometry(
int pIndex );
662 FBLight* GetDisplayableLight(
int pIndex );
689 #if !defined(K_NO_MANIPULATOR)
739 int GetViewerTextureId();
744 void CloneViewAdd(
FBView* pView);
749 void CloneViewRemove(
FBView* pView);
755 void CloneViewRender(
int pWidth,
int pHeight);
772 void SetCameraInPane(
FBCamera* pCamera,
unsigned int pPaneIndex );
786 FBCamera* GetCameraInPane(
unsigned int pPaneIndex );
791 void SetPaneCount(
unsigned int pPaneCount );
796 unsigned int GetPaneCount();
802 bool SetSelectedPaneIndex(
unsigned int pPaneIndex );
807 unsigned int GetSelectedPaneIndex()
const;
815 void SetSchematicViewInPane(
unsigned int pPaneIndex,
bool pActive );
820 int GetSchematicViewPaneIndex();
829 void SetCameraSwitcherInPane(
unsigned int pPaneIndex,
bool pActive );
837 bool IsCameraSwitcherInPane(
unsigned int pPaneIndex );
840 #ifdef FBSDKUseNamespace
FBPropertyInt DisplayableLightCount
Read Only Property: Displayable light count.
FBPropertyBool DefaultLightGroundProjectionRendering
Read write Property: Set true to use default light ground projection rendering; set false to disable ...
class FBArrayTemplate< FBModel * > FBModelList
typedef class FBSDK_DLL FBArrayTemplate FBModelList;
FBPropertyBool Background
Read Write Property: The renderer.
FBPropertyBool SupportIDBufferPicking
Read write Property: Can this Renderer Callback support IDBuffer Picking.
#define __FBClassDeclare(Name, Parent)
For internal use only.
Open Reality renderer interface.
#define FB_DEFINE_COMPONENT(DllTag, Type)
Define a component and give it the ability to be a property.
Display in Center Eye Camera, No Stereo effect.
int mSubItemIndex
Picked sub item index, -1 for whole object.
class FBPropertyBaseComponent< FBCamera * > FBPropertyCamera
Use default display mode.
FBPropertyListRendererCallback RendererCallbacks
List: Renderer Callbacks attached.
FBPropertyListManipulator Manipulators
List: of manipulators.
FBPropertyBool AdvancedLightingMode
Read write Property: Turn on/off advanced lighting setting UI widgets.
FBPropertyBool SelectionForceSnapPointsDisplay
Read write Property: Force show all feature points (pivots and etc) on selected models if true...
class FBPropertyBase< double, kFBPT_double > FBPropertyDouble
Property: double
FBPropertyBool DefaultCameraBackPlateRendering
Read write Property: Set true to use default camera back plate rendering; set false to disable it...
Arrange all objects horizontally.
Creates custom cameras and manages system cameras.
FBPropertyInt DisplayableGeometryCount
Read Only Property: Displayable geometry count.
Viewing options for rendering.
FBVector3d mNormal
Normal of the pick on the model's surface in world space.
FBInputType
Types of input events.
FBInputModifier
Input Modifiers (Ctrl, Alt, Shift).
Display in Left Eye Caerma, No Stereo effect.
Models-only mode (no nulls or skeletons are displayed).
PropertyList: Manipulator.
Open Reality renderer callback interface.
#define FB_DEFINE_ENUM(DllTag, Type)
Define an enum and give it the ability to be a property.
Display in parallel free view stereo mode.
Contains the user interface components for the SDK.
Display in Right Eye Caerma, No Stereo effect.
class FBPropertyBaseComponent< FBManipulatorTransform * > FBPropertyManipulatorTransform
MotionBuilder SDK base class.
FBPropertyBool ShowStats
Read Write Property: Show the stats about FPS, Evaluation rate ...
Skeletons and bones are displayed.
FBPropertyBool UseCameraSwitcher
class FBPropertyBase< bool, kFBPT_bool > FBPropertyBool
Property: bool
FBDisplayMode
Model display options.
FBPropertyCamera CurrentCamera
FBPickInfos(FBModel *pModel, FBVector3d pPoint, FBVector3d pNormal, int pSubItemIndex)
FBPickInfos.
FBPropertyScene Scene
Read Write Property: Scene that the renderer will use/draw
Display in crossed free view stereo mode.
FBDisplayWhat
Model display mask This mask determines what types of models are displayed by the renderer...
class FBPropertyBaseComponent< FBScene * > FBPropertyScene
FBPropertyInt RendererUpdateId
Read Only Property: Current Render Update Id.
Create new manipulators using the FBManipulator class.
FBPropertyInt CurrentPaneCallbackIndex
Read Write Property: Current Pane's Renderer Callback Index.
PropertyList: Concrete class for PropertyList of component
FBPropertyBool SelectionOverride
Read write Property: Add transparent color override layer on selected models if true.
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Template class to contain an array of items.
class FBVector3< double > FBVector3d
3D vector.
Display in Horizontal Interlace stereo mode.
#define FBSDKNamespace
FBSDKNamespace define.
FBPropertyBool DefaultCameraFrontPlateRendering
Read write Property: Set true to use default camera front plate rendering; set false to disable it...
FBPropertyManipulatorTransform ManipulatorTransform
Read Only Property: Manipulator responsible of moving objects
Picking information structure.
FBPropertyBool AutoEvaluate
Read Write Property: Indicate if a call to RenderBegin will also cause a re-evaluation of the scene...
FBPropertyInt DisplaySetUpdateId
Read Only Property: Current DisplaySet Update Id.
FBPropertyBool IDBufferPicking
Read write Property: Use ID (Color) Buffer for picking, instead of OpenGl selection buffer picking...
3D icons are displayed (3D icons are 3D elements that do not exist in the scene). ...
class FBArrayTemplate< FBPickInfos > FBPickInfosList
typedef class FBSDK_DLL FBArrayTemplate FBPickInfosList
FBDeviceKeyboardKey
Keyboard keys (for input).
#define K_DEPRECATED_2014
Display in Luminance Analygh stereo mode.
#define FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
FBPropertyBool IDBufferDisplay
Read write Property: Render Model's unique Color ID into color Buffer (used for picking) ...
End of enum, this valued indicates the number of picking modes available.
Display in Checkboard Interlace stereo mode.
FBPropertyBool FrustumCulling
Read Write Property: Turn on/off the early frustum culling optimization.
FBPropertyBool DefaultLightVolumeRendering
Read write Property: Set true to use default light volume rendering; set false to disable it...
bool operator==(const FBPickInfos &pLhs, const FBPickInfos &pRhs)
Null models are displayed.
FBPropertyDouble IDBufferPickingAlpha
Read write Property: Those Semi-transparent (Alpha Blend) geometry(region) contribute less than this ...
FBPropertyBool DisplayNormals
Read Write Property: Display model normals in main viewer.
FBPickInfosList * FBCreatePickInfosList()
Create a FBPickInfosList object.
FBVector3d mPoint
Location of the pick on the model's surface in world space.
FBModelShadingMode
Modes for model shading.
End of enum, this value indicates the number of display modes available.
class FBPropertyBase< int, kFBPT_int > FBPropertyInt
Property: int
class FBPropertyBase< FBColor, kFBPT_ColorRGB > FBPropertyColor
FBPropertyColor type definition.
Declaration for the classes FBShaderManager, FBShader, FBPropertyListShader and other subclasses...
Display in Analygh stereo mode.
FBArrangeMode
Modes for arranging objects in schematic view.
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
FBPropertyBool AdvancedMaterialMode
Read write Property: Turn on/off advanced material setting UI widgets.
void FBDestroyPickInfosList(FBPickInfosList *pPickInfosList)
Delete a FBPickInfosList object.
FBPropertyInt CurrentPaneCallbackPrefIndex
Read Write Property: Current Pane's Renderer Callback Preference Index.
update this count value when add new mode
Arrange all objects vertically.
FBPropertyDouble SelectionOverrideTransparency
Read write Property: Selection override layer transparency.
X-Ray picking mode (obstructed models are displayed in overlay).
FBPropertyColor SelectionOverrideColor
Read write Property: Selection override layer color.
FBPickingMode
3D picking mode.
FBPropertyInt RegisteredCallbackCount
Read Only Property: Registered Renderer Callback Count.
FBPropertyBool EvaluateMode
Read Write Property: When true (default), call to Render will perform evaluation. ...