Katana Plug-in APIs 0.1

FnManipulatorSuite.h

00001 // Copyright (c) 2016 The Foundry Visionmongers Ltd. All Rights Reserved.
00002 
00003 #ifndef FNVIEWER_FNMANIOULATORSUITE_H
00004 #define FNVIEWER_FNMANIOULATORSUITE_H
00005 
00006 #include <stdint.h>
00007 
00008 extern "C"
00009 {
00010     typedef struct FnManipulatorPluginStruct* FnManipulatorPluginHandle;
00011     typedef struct FnManipulatorHostStruct* FnManipulatorHostHandle;
00012 
00013     struct FnViewportPluginSuite_v2;          // Forward declaration
00014     struct FnManipulatorHandlePluginSuite_v1; // Forward declaration
00015 
00016     #include <FnAttribute/suite/FnAttributeSuite.h>
00017 
00018     #include "FnViewportSuite.h"
00019     #include "FnManipulatorHandleSuite.h"
00020 
00021     #define FnManipulatorPluginSuite_version 1
00022     #define FnManipulatorHostSuite_version 2
00023 
00024     struct FnManipulatorPluginSuite_v1
00025     {
00026         FnManipulatorPluginHandle (*create)(
00027             FnManipulatorHostHandle hostHandle);
00028 
00029         void (*destroy)(FnManipulatorPluginHandle handle);
00030 
00031         int (*matches)(FnAttributeHandle locationAttributesHandle);
00032 
00033         FnAttributeHandle (*getTags)();
00034 
00035         void (*setup)(FnManipulatorPluginHandle handle);
00036 
00037         int (*event)(FnManipulatorPluginHandle handle,
00038             FnAttributeHandle eventAttrHandle);
00039 
00040         void (*draw)(FnManipulatorPluginHandle handle);
00041 
00042         void (*pickerDraw)(FnManipulatorPluginHandle handle, int64_t pickerId);
00043 
00044         void (*setOption)(FnManipulatorPluginHandle handle,
00045                           uint64_t optionId, FnAttributeHandle attr);
00046 
00047         FnAttributeHandle (*getOption)(FnManipulatorPluginHandle handle,
00048                                        uint64_t optionId);
00049 
00050     };
00051 
00052     struct FnManipulatorHostSuite_v1  // Old suite
00053     {
00054         const char* (*getPluginName)(FnManipulatorHostHandle handle);
00055 
00056         int (*event)(FnManipulatorHostHandle handle,
00057                      FnAttributeHandle eventAttrHandle);
00058 
00059         void (*draw)(FnManipulatorHostHandle handle);
00060 
00061         void (*pickerDraw)(FnManipulatorHostHandle handle, int64_t pickerId);
00062 
00063         FnAttributeHandle (*getXform)(FnManipulatorHostHandle handle);
00064 
00065         void (*setXform)(FnManipulatorHostHandle handle,
00066             FnAttributeHandle xformMatrix);
00067 
00068         FnAttributeHandle (*calculateAveragePositionXform)(
00069             FnManipulatorHostHandle handle);
00070 
00071         FnAttributeHandle (*getValue)(FnManipulatorHostHandle handle,
00072                                       const char* locationPath,
00073                                       const char* attrName);
00074 
00075         int (*setValue)(FnManipulatorHostHandle handle,
00076                         const char* locationPath, const char* attrName,
00077                         FnAttributeHandle valueAttrHandle, int isFinal);
00078 
00079         void (*getViewport)(
00080             FnManipulatorHostHandle handle,
00081             FnViewportHostHandle* viewportHostHandle,
00082             FnViewportPluginHandle* viewportPluginHandle,
00083             FnViewportPluginSuite_v2** viewportPluginSuite);
00084 
00085         FnAttributeHandle (*getLocationPaths)(FnManipulatorHostHandle handle);
00086 
00087         void (*addManipulatorHandle)(
00088             FnManipulatorHostHandle handle,
00089             const char* pluginName, const char* name,
00090             FnManipulatorHandleHostHandle* manipulatorHandleHostHandle,
00091             FnManipulatorHandlePluginHandle* manipulatorHandlePluginHandle,
00092             FnManipulatorHandlePluginSuite_v1** manipulatorHandlePluginSuite);
00093 
00094         void (*getManipulatorHandleByName)(
00095             FnManipulatorHostHandle handle, const char* name,
00096             FnManipulatorHandleHostHandle* manipulatorHandleHostHandle,
00097             FnManipulatorHandlePluginHandle* manipulatorHandlePluginHandle,
00098             FnManipulatorHandlePluginSuite_v1** manipulatorHandlePluginSuite);
00099 
00100         void (*getManipulatorHandleByIndex)(
00101             FnManipulatorHostHandle handle, unsigned int index,
00102             FnManipulatorHandleHostHandle* manipulatorHandleHostHandle,
00103             FnManipulatorHandlePluginHandle* manipulatorHandlePluginHandle,
00104             FnManipulatorHandlePluginSuite_v1** manipulatorHandlePluginSuite);
00105 
00106         void (*removeManipulatorHandleByName)(FnManipulatorHostHandle handle,
00107                                               const char* name);
00108 
00109         void (*removeManipulatorHandleByIndex)(FnManipulatorHostHandle handle,
00110                                                unsigned int index);
00111 
00112         unsigned int (*getNumberOfManipulatorHandles)(
00113             FnManipulatorHostHandle handle);
00114 
00115         const char* (*getManipulatorHandleName)(FnManipulatorHostHandle handle,
00116                                                 unsigned int index);
00117     };
00118 
00119     struct FnManipulatorHostSuite_v2
00120     {
00121         const char* (*getPluginName)(FnManipulatorHostHandle handle);
00122 
00123         int (*event)(FnManipulatorHostHandle handle,
00124                      FnAttributeHandle eventAttrHandle);
00125 
00126         void (*draw)(FnManipulatorHostHandle handle);
00127 
00128         void (*pickerDraw)(FnManipulatorHostHandle handle, int64_t pickerId);
00129 
00130         FnAttributeHandle (*getXform)(FnManipulatorHostHandle handle);
00131 
00132         void (*setXform)(FnManipulatorHostHandle handle,
00133             FnAttributeHandle xformMatrix);
00134 
00135         FnAttributeHandle (*calculateAveragePositionXform)(
00136             FnManipulatorHostHandle handle);
00137 
00138         FnAttributeHandle (*getValue)(FnManipulatorHostHandle handle,
00139                                       const char* locationPath,
00140                                       const char* attrName);
00141 
00142         int (*setValue)(FnManipulatorHostHandle handle,
00143                         const char* locationPath, const char* attrName,
00144                         FnAttributeHandle valueAttrHandle, int isFinal);
00145 
00146         void (*getViewport)(
00147             FnManipulatorHostHandle handle,
00148             FnViewportHostHandle* viewportHostHandle,
00149             FnViewportPluginHandle* viewportPluginHandle,
00150             FnViewportPluginSuite_v2** viewportPluginSuite);
00151 
00152         FnAttributeHandle (*getLocationPaths)(FnManipulatorHostHandle handle);
00153 
00154         void (*addManipulatorHandle)(
00155             FnManipulatorHostHandle handle,
00156             const char* pluginName, const char* name,
00157             FnManipulatorHandleHostHandle* manipulatorHandleHostHandle,
00158             FnManipulatorHandlePluginHandle* manipulatorHandlePluginHandle,
00159             FnManipulatorHandlePluginSuite_v1** manipulatorHandlePluginSuite);
00160 
00161         void (*getManipulatorHandleByName)(
00162             FnManipulatorHostHandle handle, const char* name,
00163             FnManipulatorHandleHostHandle* manipulatorHandleHostHandle,
00164             FnManipulatorHandlePluginHandle* manipulatorHandlePluginHandle,
00165             FnManipulatorHandlePluginSuite_v1** manipulatorHandlePluginSuite);
00166 
00167         void (*getManipulatorHandleByIndex)(
00168             FnManipulatorHostHandle handle, unsigned int index,
00169             FnManipulatorHandleHostHandle* manipulatorHandleHostHandle,
00170             FnManipulatorHandlePluginHandle* manipulatorHandlePluginHandle,
00171             FnManipulatorHandlePluginSuite_v1** manipulatorHandlePluginSuite);
00172 
00173         void (*removeManipulatorHandleByName)(FnManipulatorHostHandle handle,
00174                                               const char* name);
00175 
00176         void (*removeManipulatorHandleByIndex)(FnManipulatorHostHandle handle,
00177                                                unsigned int index);
00178 
00179         unsigned int (*getNumberOfManipulatorHandles)(
00180             FnManipulatorHostHandle handle);
00181 
00182         const char* (*getManipulatorHandleName)(FnManipulatorHostHandle handle,
00183                                                 unsigned int index);
00184 
00185         FnAttributeHandle (*GetRegisteredManipulatorsInfo)();
00186 
00187         int (*isInteractive)(FnManipulatorHostHandle handle);
00188 
00189         void (*openManipulationGroup)(FnManipulatorHostHandle handle,
00190                                       const char* locationPath);
00191 
00192         void (*closeManipulationGroup)(FnManipulatorHostHandle handle,
00193                                        const char* locationPath);
00194     };
00195 }
00196 
00197 #endif //FNVIEWER_FNMANIOULATORSUITE_H
 All Classes Functions Variables Typedefs Enumerations Enumerator