Basic class definitions. More...
#include <kaydaradef.h>
#include <fbsdk/fblibrary.h>
#include <fbsdk/fbplug.h>
#include <fbsdk/fbarray.h>
#include <fbsdk/fbstring.h>
#include <fbsdk/fbproperties.h>
Go to the source code of this file.
Classes | |
class | FBPropertyListComponentBase |
PropertyList: Component. More... | |
class | FBPropertyListComponent |
PropertyList: Concrete class for PropertyList of component More... | |
class | FBPropertyListObject |
List of scene objects. More... | |
class | FBComponent |
MotionBuilder SDK base class. More... | |
class | FBEvent |
Base Event class. More... | |
class | FBEventConnectionNotify |
Connection notify event class. More... | |
class | FBEventConnectionDataNotify |
Connection notify event class. More... | |
class | FBEventConnectionStateNotify |
Connection notify event class. More... | |
class | FBEventConnectionKeyingNotify |
class | FBLibraryBase |
Library class for DLL registration. More... | |
class | FBLibrary |
Library class for DLL registration. More... | |
class | FBCustomManager |
Custom manager class for user controlled observer objects. More... | |
Macros | |
#define | FBSDK_DLL K_DLLIMPORT |
Be sure that FBSDK_DLL is defined only once... | |
#define | FB_DEFAULT_SDK_ICON "openreality_noicon.png" |
Define SDK icon filename. | |
#define | __FBClassInit mLocalPtr = NULL; |
For internal use only. | |
#define | __FBClassDeInit if (mLocalPtr) {delete mLocalPtr; mLocalPtr = NULL;} |
For internal use only. | |
#define | __FBClassInitSDKComponent(pObjectToWrappedIsAllocated) |
For internal use onlyL decide if we need to delete the corresponding KObject. | |
#define | __FBClassDeclare(Name, Parent) |
For internal use only. | |
#define | __FBClassDeclareGroup(Name, Parent) |
For internal use only. | |
#define | FBStorableClassImplementation(ClassName, Type) |
Storable Class implementation. | |
#define | FBElementClassImplementation(ClassName, IconFileName) |
Element Class implementation. | |
#define | FBElementClassImplementationWithName(ClassName, UniqueNameStr, IconFileName) |
Element Class implementation. | |
#define | FBShadingElementClassImplementation(ClassName, IconFileName) |
Shading Element Class implementation. | |
#define | FBStorableClassDeclare(Name, Parent) |
Storable Class declaration. | |
#define | FBPropertyInitComponent(Param, Type, PropName, Get, Set) |
Initialize a property: component. | |
#define | FBIS(Component, ComponentType) ((Component) && (Component)->Is( ComponentType::TypeInfo )) |
Macro to verify the type of a component. | |
#define | FBRegisterEvent ( Object, EventId, EventProc ) IQ( Object,IRegister)->Register ( EventId,(HICallback)this,(kICallbackHandler)EventProc ); |
Event registration/un-registration. | |
#define | FBUnregisterEvent ( Object, EventId, EventProc ) IQ( Object,IRegister)->Unregister ( EventId,(HICallback)this,(kICallbackHandler)EventProc ); |
Event registration/un-registration. | |
#define | FBRegisterObject(LocalId, Path, Name, Description, Constructor, IsMultipleAllowed, IconFilename) [[maybe_unused]] static bool __R##LocalId = FBObject_Register( Path,Name,Description,Constructor,IsMultipleAllowed,IconFilename ) |
Event registration/un-registration. | |
#define | FBDeclareUserObject(ClassName) |
Event registration/un-registration. | |
#define | FBLibraryDeclare(LibName) |
Declare the library for the application. | |
#define | FBLibraryModule(Name) void FBModule##Name() |
FBLibraryModule Define a module registration call. | |
#define | FBLibraryRegister(ClassName) |
FBLibraryRegister Declare the module's registration functions. | |
#define | FBLibraryRegisterStorable(ClassName) |
FBLibraryRegisterStorable Declare the module's registration functions for storable classes. | |
#define | FBLibraryRegisterElement(ClassName) |
FBLibraryRegisterElement Declare the module's registration functions for element classes. | |
#define | FBLibraryRegisterShadingElement(ClassName) |
FBLibraryRegisterShadingElement Declare the module's registration functions for shading element classes. | |
#define | FBLibraryDeclareEnd |
Finish library declaration. | |
#define | FBCustomManagerImplementation(ThisComponent) FBClassImplementation( ThisComponent ) \ |
FBCustomManagerImplementation. | |
#define | FBRegisterCustomManager(ClassName) |
FBRegisterCustomManager. | |
#define | FBCustomManagerDeclare(ClassName) |
FBRegisterCustomDeclare. | |
Typedefs | |
typedef FBArrayTemplate< FBComponent * > | FBComponentList |
typedef FBArrayTemplate<FBComponent*> FBComponentList; | |
typedef HIRegister | HISender |
HISender. | |
typedef HKEventBase | HKEvent |
HKEvent. | |
typedef void(ICallback::* | FBCallback) (HISender pSender, HKEvent pEvent) |
FBCallback. | |
typedef FBComponent | FBObject |
Equivalent to FBComponent for gradual transition. | |
Functions | |
K_FORWARD (IRegister) | |
K_FORWARD (IError) | |
K_FORWARD (IStore) | |
K_FORWARD (IKtView) | |
K_FORWARD (KEventBase) | |
K_FORWARD (KGlobalNamedEvent) | |
K_DLLIMPORT int | __FBRegisterTypeInfo (int pInternalClassId) |
__FBRegisterTypeInfo For internal use only, Register the TypeInfo mapped to internal class id. | |
K_DLLIMPORT int | __FBGetInternalClassId (int pTypeInfo) |
__FBGetInternalClassId For internal use only, Get the internal class Id from the ORSDK FBCompoent's TypeInfo. | |
K_DLLIMPORT FBPlug * | __FBObjectCreatorSub (HIObject pObject) |
__FBObjectCreatorSub For internal use only, Create the FBPlug object from internal object. | |
K_DLLIMPORT void | __FBAddModelToScene (HIObject pObject) |
For internal usage only. | |
K_DLLIMPORT void | __FBRemoveModelFromScene (HIObject pObject) |
For internal usage only. | |
__FB_FORWARD (FBComponent) | |
__FB_FORWARD (FBVisualComponent) | |
K_DLLIMPORT FBComponent * | GetFBComponent (const HIObject Object) |
Get a handle to the FBComponent belonging to an HIObject. | |
K_DLLIMPORT FBVisualComponent * | FBGetFBVisualComponent (HIKtView pObject, bool pAutoCreate=true) |
Get the FBComponent from an Internal Object. | |
K_DLLIMPORT FBComponent * | FBGetFBComponent (HIObject pObject, bool pAutoCreate=true) |
Get the FBComponent from an Internal Object. | |
K_DLLIMPORT FBComponentList * | FBCreateComponentList () |
Create a FBObjectList object. | |
K_DLLIMPORT void | FBDestroyComponentList (FBComponentList *pObjectList) |
Delete a FBObjectList object. | |
K_DLLIMPORT FBArrayTemplate< FBComponent * > & | FBGetComponentArray () |
Get the Root FBComponent. | |
K_DLLIMPORT void | FBSetStoreableCustomModelRegistered () |
K_DLLIMPORT bool | FBGetStoreableCustomModelRegistered () |
K_DLLIMPORT void | FBSetStoreableCustomMaterialRegistered () |
K_DLLIMPORT bool | FBGetStoreableCustomMaterialRegistered () |
K_DLLIMPORT void | FBSetStoreableCustomTextureRegistered () |
K_DLLIMPORT bool | FBGetStoreableCustomTextureRegistered () |
K_DLLIMPORT bool | FBObject_Register (const char *pGroupName, const char *pEntryName, const char *pDescription, kObjectCreatorFnc pCreatorFnc, bool pIsMultipleAllowed, const char *pIconFilename) |
K_DLLIMPORT bool | FBObject_Unregister (const char *pGroupName, const char *pEntryName, int nth=0) |
K_DLLIMPORT int | FBObject_GetGroupCount () |
A set of functions to query the registration table. | |
K_DLLIMPORT const char * | FBObject_GetGroupName (int pGroupIndex) |
K_DLLIMPORT int | FBObject_GetEntryCount (int pGroupIndex) |
K_DLLIMPORT const char * | FBObject_GetEntryName (int pGroupIndex, int pIndex) |
K_DLLIMPORT const char * | FBObject_GetEntryDescription (int pGroupIndex, int pIndex, int nth=0) |
K_DLLIMPORT const char * | FBObject_GetEntryDLLName (int pGroupIndex, int pIndex, int nth=0) |
K_DLLIMPORT const char * | FBObject_GetIconName (int pGroupIndex, int pIndex, int nth=0) |
K_DLLIMPORT bool | FBObject_GetMultiplicity (int pGroupIndex, int pIndex, int nth=0) |
K_DLLIMPORT FBComponent * | FBCreateObject (const char *pGroupName, const char *pEntryName, const char *pName, void *pData=NULL, int nth=0) |
FBCreateObject. | |
bool | FBUnregisterObject (const char *pGroupName, const char *pEntryName, int nth=0) |
FBUnregisterObject. | |
K_DLLIMPORT int | FBRegister_ClassId (const char *pClassName) |
FB_FORWARD (FBPropertyListComponent) | |
FB_DEFINE_LIST (K_DLLIMPORT, Component) | |
FB_FORWARD (FBFolder) | |
FB_DEFINE_COMPONENT (K_DLLIMPORT, Folder) | |
FB_DEFINE_ENUM (K_DLLIMPORT, ConnectionType) | |
FB_DEFINE_ENUM (K_DLLIMPORT, ConnectionAction) | |
FB_DEFINE_ENUM (K_DLLIMPORT, ObjectFlag) | |
FB_FORWARD (FBPropertyListObject) | |
__FB_FORWARD (FBNamespace) | |
__FB_FORWARD (FBFileReference) | |
template<class T > | |
T * | FBCast (FBObject *pObject, bool pAutoCreate=false) |
Cast the SDK object using it's IObject interface into the proper class. | |
K_DLLIMPORT void | FBFindObjectsByName (const char *pNamePattern, FBComponentList &pList, bool pIncludeNamespace=true, bool pModelsOnly=false) |
FBFindObjectsByName. | |
K_DLLIMPORT FBComponent * | FBFindObjectByFullName (const char *pObjectFullName) |
FBFindObjectByFullName. | |
K_DLLIMPORT int | FBDeleteObjectsByName (const char *pNamePattern, const char *pNameSpace=NULL, const char *pGroupName=NULL) |
FBDeleteObjectsByName. | |
__FB_FORWARD (FBEvent) | |
__FB_FORWARD (FBEventConnectionNotify) | |
__FB_FORWARD (FBEventConnectionDataNotify) | |
__FB_FORWARD (FBEventConnectionStateNotify) | |
__FB_FORWARD (FBEventConnectionKeyingNotify) | |
__FB_FORWARD (FBCustomManager) | |
Basic class definitions.
Contains the basic classes that most SDK objects will derive from. These classes form the base of many functionalities of the SDK. The file also contains the base macros used in the definition/registration of the SDK classes.
Definition in file fbcomponent.h.
#define __FBClassDeclare | ( | Name, | |
Parent | |||
) |
For internal use only.
Definition at line 131 of file fbcomponent.h.
#define __FBClassDeclareGroup | ( | Name, | |
Parent | |||
) |
For internal use only.
Definition at line 155 of file fbcomponent.h.
#define __FBClassDeInit if (mLocalPtr) {delete mLocalPtr; mLocalPtr = NULL;} |
For internal use only.
Definition at line 100 of file fbcomponent.h.
#define __FBClassInit mLocalPtr = NULL; |
For internal use only.
Definition at line 94 of file fbcomponent.h.
#define __FBClassInitSDKComponent | ( | pObjectToWrappedIsAllocated | ) |
For internal use onlyL decide if we need to delete the corresponding KObject.
Definition at line 106 of file fbcomponent.h.
#define FB_DEFAULT_SDK_ICON "openreality_noicon.png" |
Define SDK icon filename.
Definition at line 88 of file fbcomponent.h.
#define FBCustomManagerDeclare | ( | ClassName | ) |
FBRegisterCustomDeclare.
ClassName | Class to declare registration functions for. |
Definition at line 1274 of file fbcomponent.h.
#define FBCustomManagerImplementation | ( | ThisComponent | ) | FBClassImplementation( ThisComponent ) \ |
FBCustomManagerImplementation.
ThisComponent | Component to customize |
Definition at line 1257 of file fbcomponent.h.
#define FBDeclareUserObject | ( | ClassName | ) |
Event registration/un-registration.
For internal use only.
Definition at line 411 of file fbcomponent.h.
#define FBElementClassImplementation | ( | ClassName, | |
IconFileName | |||
) |
Element Class implementation.
(Asset system) This should be placed in the source code file for a class.
Definition at line 187 of file fbcomponent.h.
#define FBElementClassImplementationWithName | ( | ClassName, | |
UniqueNameStr, | |||
IconFileName | |||
) |
Element Class implementation.
(Asset system) This should be placed in the source code file for a class.
Definition at line 203 of file fbcomponent.h.
#define FBIS | ( | Component, | |
ComponentType | |||
) | ((Component) && (Component)->Is( ComponentType::TypeInfo )) |
Macro to verify the type of a component.
Used to compare a component to another, by verifying their Class::TypeInfo values.
Component | Component to verify. |
ComponentType | Type to verify Component with. |
Definition at line 266 of file fbcomponent.h.
#define FBLibraryDeclare | ( | LibName | ) |
Declare the library for the application.
Creates the FBLibrary object and generic interface functions for DLL access.
Definition at line 1188 of file fbcomponent.h.
#define FBLibraryDeclareEnd |
Finish library declaration.
Definition at line 1244 of file fbcomponent.h.
#define FBLibraryModule | ( | Name | ) | void FBModule##Name() |
FBLibraryModule Define a module registration call.
Name | Module to register. |
Definition at line 1208 of file fbcomponent.h.
#define FBLibraryRegister | ( | ClassName | ) |
FBLibraryRegister Declare the module's registration functions.
ClassName | Class to declare registration functions for. |
Definition at line 1215 of file fbcomponent.h.
#define FBLibraryRegisterElement | ( | ClassName | ) |
FBLibraryRegisterElement Declare the module's registration functions for element classes.
ClassName | Class to declare registration functions for. |
Definition at line 1231 of file fbcomponent.h.
#define FBLibraryRegisterShadingElement | ( | ClassName | ) |
FBLibraryRegisterShadingElement Declare the module's registration functions for shading element classes.
ClassName | Class to declare registration functions for. |
Definition at line 1239 of file fbcomponent.h.
#define FBLibraryRegisterStorable | ( | ClassName | ) |
FBLibraryRegisterStorable Declare the module's registration functions for storable classes.
ClassName | Class to declare registration functions for. |
Definition at line 1223 of file fbcomponent.h.
#define FBPropertyInitComponent | ( | Param, | |
Type, | |||
PropName, | |||
Get, | |||
Set | |||
) |
Initialize a property: component.
Param | Owner name. |
Type | Type of variable. |
PropName | Component name. |
Get | Get function pointer. |
Set | Set function pointer. |
Definition at line 253 of file fbcomponent.h.
#define FBRegisterCustomManager | ( | ClassName | ) |
FBRegisterCustomManager.
ClassName | Class to declare registration functions for. |
Definition at line 1263 of file fbcomponent.h.
#define FBRegisterEvent ( Object, EventId, EventProc ) IQ( Object,IRegister)->Register ( EventId,(HICallback)this,(kICallbackHandler)EventProc ); |
Event registration/un-registration.
For internal use only.
Definition at line 328 of file fbcomponent.h.
#define FBRegisterObject | ( | LocalId, | |
Path, | |||
Name, | |||
Description, | |||
Constructor, | |||
IsMultipleAllowed, | |||
IconFilename | |||
) | [[maybe_unused]] static bool __R##LocalId = FBObject_Register( Path,Name,Description,Constructor,IsMultipleAllowed,IconFilename ) |
Event registration/un-registration.
For internal use only.
Definition at line 390 of file fbcomponent.h.
#define FBSDK_DLL K_DLLIMPORT |
Be sure that FBSDK_DLL is defined only once...
Definition at line 57 of file fbcomponent.h.
#define FBShadingElementClassImplementation | ( | ClassName, | |
IconFileName | |||
) |
Shading Element Class implementation.
This should be placed in the source code file for a class.
Definition at line 220 of file fbcomponent.h.
#define FBStorableClassDeclare | ( | Name, | |
Parent | |||
) |
Storable Class declaration.
Overloads the necessary functions when a class inherits from FBComponent (or its derivatives) and that you want it to be persistent.
Name | Name of class to declare. |
Parent | Parent class to associate with Name. |
Definition at line 238 of file fbcomponent.h.
#define FBStorableClassImplementation | ( | ClassName, | |
Type | |||
) |
Storable Class implementation.
This should be placed in the source code file for a class.
Definition at line 168 of file fbcomponent.h.
#define FBUnregisterEvent ( Object, EventId, EventProc ) IQ( Object,IRegister)->Unregister ( EventId,(HICallback)this,(kICallbackHandler)EventProc ); |
Event registration/un-registration.
For internal use only.
Definition at line 333 of file fbcomponent.h.
FBCallback.
pSender | Set the sender |
pEvent | Set the event |
Definition at line 403 of file fbcomponent.h.
typedef FBArrayTemplate<FBComponent*> FBComponentList |
typedef FBArrayTemplate<FBComponent*> FBComponentList;
Definition at line 301 of file fbcomponent.h.
typedef FBComponent FBObject |
Equivalent to FBComponent for gradual transition.
Definition at line 897 of file fbcomponent.h.
typedef HIRegister HISender |
HISender.
Definition at line 394 of file fbcomponent.h.
typedef HKEventBase HKEvent |
HKEvent.
Definition at line 397 of file fbcomponent.h.
enum FBNamespaceAction |
Namespace flags.
Enumerator | |
---|---|
kFBConcatNamespace | Use to add a namespace name to object. |
kFBReplaceNamespace | Use to replace a define namespace. |
kFBRemoveAllNamespace | Remove all the namespace name. |
Definition at line 480 of file fbcomponent.h.
enum FBObjectFlag |
Available flags for any component.
Definition at line 441 of file fbcomponent.h.
enum FBObjectStatus |
Available lifetime status for any component.
Definition at line 470 of file fbcomponent.h.
K_DLLIMPORT void __FBAddModelToScene | ( | HIObject | pObject | ) |
For internal usage only.
K_DLLIMPORT int __FBGetInternalClassId | ( | int | pTypeInfo | ) |
__FBGetInternalClassId For internal use only, Get the internal class Id from the ORSDK FBCompoent's TypeInfo.
K_DLLIMPORT FBPlug * __FBObjectCreatorSub | ( | HIObject | pObject | ) |
__FBObjectCreatorSub For internal use only, Create the FBPlug object from internal object.
K_DLLIMPORT int __FBRegisterTypeInfo | ( | int | pInternalClassId | ) |
__FBRegisterTypeInfo For internal use only, Register the TypeInfo mapped to internal class id.
K_DLLIMPORT void __FBRemoveModelFromScene | ( | HIObject | pObject | ) |
For internal usage only.
|
inline |
Cast the SDK object using it's IObject interface into the proper class.
pObject | Object to get SDK object for. |
pAutoCreate | Create object if it doesn't exist? (default = false) |
pObject
. Definition at line 904 of file fbcomponent.h.
K_DLLIMPORT FBComponentList * FBCreateComponentList | ( | ) |
Create a FBObjectList object.
This is to get around memory management issues when mixing debug and release runtime libraries on Windows. By using the FBCreateObjectList/FBDestroyObjectList duo of functions, you ensure that the memory used in the array is allocated, reallocated and freed in the same memory pool.
K_DLLIMPORT FBComponent * FBCreateObject | ( | const char * | pGroupName, |
const char * | pEntryName, | ||
const char * | pName, | ||
void * | pData = NULL , |
||
int | nth = 0 |
||
) |
FBCreateObject.
pGroupName | Set the name of the Group. |
pEntryName | Set the name of the Entry. |
pName | Set the name of the Object to create. |
pData | Data to pass to object creator function. |
nth | Set the occurrence of the object to remove. |
K_DLLIMPORT int FBDeleteObjectsByName | ( | const char * | pNamePattern, |
const char * | pNameSpace = NULL , |
||
const char * | pGroupName = NULL |
||
) |
FBDeleteObjectsByName.
This function will query the system for objects fulfilling a particular name pattern and delete them. specify a namespace preferred, delete all objects with the group name without specified a namespace specified may lead to inconsistent in scene. Wrap multiple calls to FBDeleteObjectsByName() inside pair of FBPreventUIUpdateBegin() / FBPreventUIUpdateEnd() could improve application's performance.
pNamePattern | if not NULL, indicate the name pattern to search. This pattern can contain any amount of *. (ex: *tr*mod*scene ). if is NULL or Empty string, * will be used for match all. |
pNameSpace | if not NULL, the objects must be inside the given namespace. |
pGroupName | if not NULL, indicate the object group name (type). |
K_DLLIMPORT void FBDestroyComponentList | ( | FBComponentList * | pObjectList | ) |
Delete a FBObjectList object.
pObjectList | pointer to the object created with a call to FBCreateObjectList(). |
K_DLLIMPORT FBComponent * FBFindObjectByFullName | ( | const char * | pObjectFullName | ) |
FBFindObjectByFullName.
This function will query the system for an object with its FullName matching. Full name is "GroupName::NameSpaceName:ObjectName". Label name is "NameSpaceName:ObjectName". also known as "PrefixName::ObjectName"
pObjectFullName | Full Name of object to search for. Specify it with schema like "GroupName::NameSpaceName:ObjectName",or "GroupName::ObjectName" if no NameSpaceName. |
K_DLLIMPORT void FBFindObjectsByName | ( | const char * | pNamePattern, |
FBComponentList & | pList, | ||
bool | pIncludeNamespace = true , |
||
bool | pModelsOnly = false |
||
) |
FBFindObjectsByName.
This function will query the system for objects fulfilling a particular name pattern
pNamePattern | Indicate the name pattern to search. This pattern can contain any amount of *. (ex: *tr*mod*scene ) |
pList | List that contains the objects |
pIncludeNamespace | Does the search use the complete name (with namespace) |
pModelsOnly | Is the search on models or all types of objects |
References FBGetFBObject().
K_DLLIMPORT FBArrayTemplate< FBComponent * > & FBGetComponentArray | ( | ) |
Get the Root FBComponent.
K_DLLIMPORT FBComponent * FBGetFBComponent | ( | HIObject | pObject, |
bool | pAutoCreate = true |
||
) |
Get the FBComponent from an Internal Object.
pObject | Object to get SDK object for. |
pAutoCreate | Create object if it doesn't exist? (default is true) |
K_DLLIMPORT FBVisualComponent * FBGetFBVisualComponent | ( | HIKtView | pObject, |
bool | pAutoCreate = true |
||
) |
Get the FBComponent from an Internal Object.
pObject | Object to get SDK object for. |
pAutoCreate | Create object if it doesn't exist? (default is true) |
K_DLLIMPORT int FBObject_GetGroupCount | ( | ) |
A set of functions to query the registration table.
|
inline |
FBUnregisterObject.
pGroupName | Set the Name of the Group from which unregister an object. |
pEntryName | Set the name of the Object to unregister. |
nth | Set the occurrence of the object to remove. |
Definition at line 384 of file fbcomponent.h.
K_DLLIMPORT FBComponent * GetFBComponent | ( | const HIObject | Object | ) |
Get a handle to the FBComponent belonging to an HIObject.
This will not create the internal SDK object, and will return NULL if the SDK object has not been initialized.
Object | Internal object for which the FBComponent is required. |