1 #ifndef __FBRENDERER_H__ 2 #define __FBRENDERER_H__ 43 #include <kaydaradef.h> 48 #define FBSDK_DLL K_DLLIMPORT 51 #if !defined(K_NO_MANIPULATOR) 57 #include <fbsdk/fbcamera.h> 58 #include <fbsdk/fblight.h> 62 #ifdef FBSDKUseNamespace 204 bool& ShowTimeCode();
208 bool& ShowSafeArea();
212 bool& ShowCameraLabel();
216 bool IsInSelectionBufferPicking()
const;
220 bool IsInColorBufferPicking()
const;
224 unsigned int RenderCallbackPrefIndex()
const;
229 int PaneIndex()
const;
279 : mModel( pModel ), mPoint( pPoint ), mNormal (pNormal), mSubItemIndex(pSubItemIndex) {};
323 virtual const char* GetCallbackName()
const = 0;
329 virtual const char* GetCallbackDesc()
const = 0;
336 virtual unsigned int GetCallbackPrefCount()
const;
341 virtual const char* GetCallbackPrefName(
unsigned int pIndex)
const;
351 virtual void Attach();
356 virtual void Detach();
381 #define FBRegisterRendererCallback( UniqueNameStr, ClassName, Label, Description, IconFilename ) \ 382 HIObject CreateRendererCallback##ClassName( HIObject ,const char* pName,void * ) \ 384 ClassName *Class = new ClassName( pName ); \ 385 if (Class->FBCreate()) { \ 386 return Class->GetHIObject(); \ 392 FBLibraryModule( ClassName ) \ 394 FBRegisterObject( ClassName##R1,"renderer/callback/ogl",Label,Description,CreateRendererCallback##ClassName,true, IconFilename ); \ 401 #define FBRendererCallbackDeclare( ClassName, Parent ) \ 402 FBClassDeclare( ClassName,Parent); \ 404 ClassName(const char* pName):Parent(pName) { FBClassInit; } \ 410 #define FBRendererCallbackImplementation( ThisComponent ) \ 411 FBClassImplementation( ThisComponent ) 465 void SetViewport(
int pX,
int pY,
int pW,
int pH);
476 bool RenderBegin(
int pX,
int pY,
int pW,
int pH);
483 bool RenderEnd(
FBView* pView=NULL);
497 bool PreRender(
int pLayer = -1);
503 bool Render(
int pLayer = -1);
531 bool FrameCurrentCameraWithModels(
bool pAll);
534 void ArrangeSelectedObjectsInSchematic();
540 bool ArrangeObjectsInSchematicFromModel(
const FBModel& pModel );
555 bool GetSchematicNodesBoundingBox(
bool pConsiderCollapsedNodes,
int& pTop,
int& pLeft,
int& pBottom,
int& pRight );
566 bool GetSchematicNodesBoundingBoxFromModel(
FBModel* pModel,
bool pConsiderCollapsedNodes,
int& pTop,
int& pLeft,
int& pBottom,
int& pRight );
576 const char* GetCurrentSchematicBookmarkName()
const;
581 bool IsCurrentSchematicBookmarkDirty()
const;
587 bool CreateSchematicBookmark(
const char* pBookmarkName);
593 bool DeleteSchematicBookmark(
const char* pBookmarkName);
600 bool RenameSchematicBookmark(
const char* pOldBookmarkName,
const char* pNewBookmarkName);
606 bool SelectSchematicBookmark(
const char* pBookmarkName);
611 bool UpdateCurrentSchematicBookmark();
624 bool MouseInput(
int pX,
int pY,
FBInputType pInputType,
int pButtonKey,
FBInputModifier pModifier,
int pWheelDeltaValue=0,
int pLayer = -1);
637 bool MouseInputNormalized(
float pX,
float pY,
FBInputType pInputType,
int pButtonKey,
FBInputModifier pModifier,
int pWheelDeltaValue,
int pLayer = -1,
int pPaneId = -1);
646 bool Pick(
int pX,
int pY,
FBPickInfosList& pPickInfosList,
bool pNeedIntersectPosition =
false );
656 bool PickNormalized(
float pX,
float pY,
FBPickInfosList& pPickInfosList,
bool pNeedIntersectPosition =
false,
int pPaneId = -1);
665 bool RectPick(
int pX1,
int pY1,
int pX2,
int pY2,
FBPickInfosList& pPickInfosList);
675 bool RectPickNormalized(
float pX1,
float pY1,
float pX2,
float pY2,
FBPickInfosList& pPickInfosList,
int pPaneId = -1);
688 void KeyboardInput(
FBDeviceKeyboardKey pKeyIndex,
bool pKeyState,
bool pIsTrigger =
false);
695 FBModel* GetDisplayableGeometry(
int pIndex );
702 FBLight* GetDisplayableLight(
int pIndex );
723 bool IsModelInsideCameraFrustum(
FBModel* pGeometry,
FBCamera* pCamera = NULL);
729 #if !defined(K_NO_MANIPULATOR) 782 int GetViewerTextureId();
787 void CloneViewAdd(
FBView* pView);
792 void CloneViewRemove(
FBView* pView);
798 void CloneViewRender(
int pWidth,
int pHeight);
815 void SetCameraInPane(
FBCamera* pCamera,
unsigned int pPaneIndex );
829 FBCamera* GetCameraInPane(
unsigned int pPaneIndex );
834 void SetPaneCount(
unsigned int pPaneCount );
839 unsigned int GetPaneCount();
845 bool SetSelectedPaneIndex(
unsigned int pPaneIndex );
850 unsigned int GetSelectedPaneIndex()
const;
858 void SetSchematicViewInPane(
unsigned int pPaneIndex,
bool pActive );
863 int GetSchematicViewPaneIndex();
872 void SetCameraSwitcherInPane(
unsigned int pPaneIndex,
bool pActive );
880 bool IsCameraSwitcherInPane(
unsigned int pPaneIndex );
883 #ifdef FBSDKUseNamespace
FBPropertyInt CurrentPaneCallbackPrefIndex
Read Write Property: Current Pane's Renderer Callback Preference Index.
class K_DLLIMPORT FBPropertyBase< double, kFBPT_double > FBPropertyDouble
Property: double
FBPropertyInt CurrentPaneCallbackIndex
Read Write Property: Current Pane's Renderer Callback Index.
#define __FBClassDeclare(Name, Parent)
For internal use only.
Skeletons and bones are displayed.
Open Reality renderer interface.
PropertyList: Concrete class for PropertyList of component
FB_DEFINE_COMPONENT(K_DLLIMPORT, AnimationNode)
Animation node class.
Template class to contain an array of items.
FBDeviceKeyboardKey
Keyboard keys (for input).
FBPropertyBool IDBufferDisplay
Read write Property: Render Model's unique Color ID into color Buffer (used for picking) ...
FBPropertyBool DefaultCameraBackPlateRendering
Read write Property: Set true to use default camera back plate rendering; set false to disable it...
FBPropertyBool SelectionOverride
Read write Property: Add transparent color override layer on selected models if true.
End of enum, this value indicates the number of display modes available.
FBPropertyCamera CurrentCamera
FBPropertyBool AutoEvaluate
Read Write Property: Indicate if a call to RenderBegin will also cause a re-evaluation of the scene...
FBPropertyInt RegisteredCallbackCount
Read Only Property: Registered Renderer Callback Count.
Use default display mode.
FBPropertyBool Background
Read Write Property: The renderer.
Display in Center Eye Camera, No Stereo effect.
FBPropertyBool AdvancedLightingMode
Read write Property: Turn on/off advanced lighting setting UI widgets.
K_DLLIMPORT void FBDestroyPickInfosList(FBPickInfosList *pPickInfosList)
Delete a FBPickInfosList object.
FBPropertyBool ShowStats
Read Write Property: Show the stats about FPS, Evaluation rate ... like when using Shift-F in main vi...
Null models are displayed.
Open Reality renderer callback interface.
FBInputModifier
Input Modifiers (Ctrl, Alt, Shift).
FBPropertyBool UseCameraSwitcher
FBVector3d mPoint
Location of the pick on the model's surface in world space.
FBPropertyBool SelectionForceSnapPointsDisplay
Read write Property: Force show all feature points (pivots and etc) on selected models if true...
#define FB_DEFINE_ENUM(DllTag, Type)
Define an enum and give it the ability to be a property.
FBPropertyDouble IDBufferPickingAlpha
Read write Property: Those Semi-transparent (Alpha Blend) geometry(region) contribute less than this ...
Viewing options for rendering.
Contains the user interface components for the SDK.
FBPropertyBool IDBufferPicking
Read write Property: Use ID (Color) Buffer for picking, instead of OpenGl selection buffer picking...
FBPropertyListManipulator Manipulators
List: of manipulators.
Creates custom cameras and manages system cameras.
FBPropertyBool DisplayNormals
Read Write Property: Display model normals in main viewer.
FBPropertyListRendererCallback RendererCallbacks
List: Renderer Callbacks attached.
Display in Luminance Analygh stereo mode.
FBPropertyInt DisplayableLightCount
Read Only Property: Displayable light count.
class K_DLLIMPORT FBPropertyBase< bool, kFBPT_bool > FBPropertyBool
Property: bool
int mSubItemIndex
Picked sub item index, -1 for whole object.
FBPickInfos(FBModel *pModel, FBVector3d pPoint, FBVector3d pNormal, int pSubItemIndex)
FBPickInfos.
3D icons are displayed (3D icons are 3D elements that do not exist in the scene). ...
FBPropertyInt DisplaySetUpdateId
Read Only Property: Current DisplaySet Update Id. Add/Delete models, Show/Hide models will affect Dis...
FBPropertyManipulatorTransform ManipulatorTransform
Read Only Property: Manipulator responsible of moving objects
Arrange all objects vertically.
Models-only mode (no nulls or skeletons are displayed).
FBPropertyBool EvaluateMode
Read Write Property: When true (default), call to Render will perform evaluation. Useful when renderi...
PropertyList: Manipulator.
Display in Analygh stereo mode.
Create new manipulators using the FBManipulator class.
FBInputType
Types of input events.
FBPropertyColor SelectionOverrideColor
Read write Property: Selection override layer color.
Display in active mode. User must enable OpenGL quad stereo buffer, and choose approriate stereo mode...
FBPropertyBool DefaultLightGroundProjectionRendering
Read write Property: Set true to use default light ground projection rendering; set false to disable ...
Display in Horizontal Interlace stereo mode.
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Display in Checkboard Interlace stereo mode.
FBPickingMode
3D picking mode.
class K_DLLIMPORT FBArrayTemplate< FBModel * > FBModelList
typedef class FBSDK_DLL FBArrayTemplate<FBModel*> FBModelList;
FBDisplayWhat
Model display mask This mask determines what types of models are displayed by the renderer...
#define FBSDKNamespace
FBSDKNamespace define.
class K_DLLIMPORT FBPropertyBase< FBColor, kFBPT_ColorRGB > FBPropertyColor
FBPropertyColor type definition.
Display in Left Eye Caerma, No Stereo effect.
Display in Right Eye Caerma, No Stereo effect.
End of enum, this valued indicates the number of picking modes available.
FBPropertyBool DefaultLightVolumeRendering
Read write Property: Set true to use default light volume rendering; set false to disable it...
FBVector3d mNormal
Normal of the pick on the model's surface in world space.
Display in crossed free view stereo mode.
FBPropertyBool FrustumCulling
Read Write Property: Turn on/off the early frustum culling optimization.
#define FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
FBPropertyBool SupportIDBufferPicking
Read write Property: Can this Renderer Callback support IDBuffer Picking.
FBPropertyInt RendererUpdateId
Read Only Property: Current Render Update Id. DisplaySet update, material change, texture changes and...
class K_DLLIMPORT FBPropertyBase< int, kFBPT_int > FBPropertyInt
Property: int
FBPropertyBool DefaultCameraFrontPlateRendering
Read write Property: Set true to use default camera front plate rendering; set false to disable it...
Picking information structure.
class K_DLLIMPORT FBVector3< double > FBVector3d
3D vector.
FBArrangeMode
Modes for arranging objects in schematic view.
FBPropertyInt DisplayableGeometryCount
Read Only Property: Displayable geometry count.
FBModelShadingMode
Modes for model shading.
Arrange all objects horizontally.
Declaration for the classes FBShaderManager, FBShader, FBPropertyListShader and other subclasses...
MotionBuilder SDK base class.
#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.
FBPropertyDouble SelectionOverrideTransparency
Read write Property: Selection override layer transparency.
FBPropertyScene Scene
Read Write Property: Scene that the renderer will use/draw
FBDisplayMode
Model display options.
K_DLLIMPORT FBPickInfosList * FBCreatePickInfosList()
Create a FBPickInfosList object.
Display in parallel free view stereo mode.
FBPropertyBool PickingEnabled
Read Write Property: Is picking in the viewer enabled?
FBPropertyBool HideManipulatorsOnPlayback
Read Write Property: Hide manipulators UI elements during playback.
X-Ray picking mode (obstructed models are displayed in overlay).
update this count value when add new mode
class K_DLLIMPORT FBArrayTemplate< FBPickInfos > FBPickInfosList
typedef class FBSDK_DLL FBArrayTemplate<FBPickInfos> FBPickInfosList
FBPropertyBool HideManipulatorsOnManip
Read Write Property: Hide manipulators UI elements while manipulating.