// This file is generated by the Glue3D library, and should not be modified
#if __cplusplus
#pragma once
#else
using System;
using System.Runtime.InteropServices;
#endif
namespace WebSupergoo {
#if __cplusplus
namespace PublicEnums
{
#endif
#if !__cplusplus
/// <summary>Libraries used inside the Glue3D dll</summary>
public
#endif
enum ELibrary {
/// <summary>Rendering Library (with all the low level rendering functions)</summary>
Lib_Rendering = 0,
/// <summary>U3D library (for reading U3D content)</summary>
Lib_U3D,
/// <summary>PRC library (for reading/writing PRC content)</summary>
Lib_PRC,
/// <summary>OBJ library (for reading/writing OBJ content)</summary>
Lib_OBJ,
/// <summary>Used to access the version info of the Glue3D dll</summary>
Lib_Glue3D,
};
#if !__cplusplus
/// <summary>Flags used to set up the renderer</summary>
[Flags]
public
#endif
enum ERendererFlags {
/// <summary>Nothing to set</summary>
RenderFlags_None = 0x0000,
/// <summary>Enable rendering to framebuffer object (FBO)</summary>
RenderFlags_RenderToFBO = 0x0001,
/// <summary>Enable vertical sync (to avoid tearing artefacts)</summary>
RenderFlags_EnableVSync = 0x0002,
/// <summary>Try to automatically find the best available antialiasing mode</summary>
RenderFlags_FindBestAAMode = 0x0004,
};
#if !__cplusplus
/// <summary>Flags for the RenderProxy object</summary>
[Flags]
public
#endif
enum ERenderProxyFlags {
/// <summary>No flags set</summary>
RenderProxyFlags_None = 0x0000,
/// <summary>Render to FBO is available</summary>
RenderProxyFlags_RenderToFBO = 0x0001,
/// <summary>CSAA is supported</summary>
RenderProxyFlags_SupportsCSAA = 0x0002,
};
#if !__cplusplus
/// <summary>Loading parameter flags for views</summary>
[Flags]
public
#endif
enum ELoadViewFlags {
/// <summary>Nothing set</summary>
LoadView_Invalid = 0x0000,
/// <summary>The strings in the views contain 3DV data (if not set, the strings are assumed to be filenames to load)</summary>
LoadView_StringData = 0x0001,
};
#if !__cplusplus
/// <summary>Loading parameter flags</summary>
[Flags]
public
#endif
enum ELoadParamFlags {
/// <summary>Nothing set</summary>
LoadParam_Invalid = 0x0000,
/// <summary>Look up scene by handle (ie scene has to be loaded already, for example when capturing an already loaded scene)</summary>
LoadParam_Input_SceneHandle = 0x0001,
/// <summary>Load a scene by filename</summary>
LoadParam_Input_Filename = 0x0002,
/// <summary>Load a scene from the raw data array that has been passed in</summary>
LoadParam_Input_RawData = 0x0004,
};
#if !__cplusplus
/// <summary>Flags for exporting a scene</summary>
[Flags]
public
#endif
enum EExportFlags {
/// <summary>Export scene as U3D (not yet supported)</summary>
ExportFormat_U3D = 0x0001,
/// <summary>Export scene as PRC</summary>
ExportFormat_PRC = 0x0002,
/// <summary>Export scene as OBJ</summary>
ExportFormat_OBJ = 0x0004,
/// <summary>Export textures as JPEG (if not set, will use PNG)</summary>
ExportTexturesJPEG = 0x0010,
/// <summary>Export normals (not needed if normals are standard perpendicular normals, if not exported, the importer will have to generate the normals)</summary>
ExportNormals = 0x0020,
/// <summary>PRC-specific: Use highly compressed tesselations (rather than standard compression)</summary>
ExportPRCHighlyCompressed = 0x0040,
};
#if !__cplusplus
/// <summary>Flags related to the view and what is displayed in the 3D render window</summary>
[Flags]
public
#endif
enum EViewFlags {
/// <summary>No special settings</summary>
ViewParams_None = 0x0000,
/// <summary>Show a grid (in the horizontal plane)</summary>
ViewParams_ShowGrid = 0x0001,
/// <summary>Show the main axis of the world coordinate system</summary>
ViewParams_ShowAxis = 0x0002,
/// <summary>Show a bounding box enclosing the whole scene</summary>
ViewParams_ShowSceneBBox = 0x0004,
/// <summary>Show bounding boxes for the individual models</summary>
ViewParams_ShowModelBBoxes = 0x0008,
/// <summary>Whether to attempt loading view files (text files containing PDF view annotation info, which need to be located next to the scene file)</summary>
ViewParams_LoadViewFiles = 0x0010,
/// <summary>Whether view files which reference built-in cameras override the built-in cameras or get added as additional cams</summary>
ViewParams_ViewFilesOverride = 0x0020,
/// <summary>Whether clipping planes are explicitely set</summary>
ViewParams_ExplicitClipping = 0x0040,
/// <summary>Whether to use the specified camera matrix for setting up view camera (see ViewParams struct)</summary>
ViewParams_UseCameraMatrix = 0x0080,
/// <summary>Sets the camera to use orthogonal projection (rather than perspective projection)</summary>
ViewParams_OrthographicView = 0x0100,
};
#if !__cplusplus
/// <summary>Flags for capturing a scene to an image</summary>
[Flags]
public
#endif
enum ECaptureFlags {
/// <summary>No flags</summary>
Capture_Invalid = 0x0000,
/// <summary>Whether it will unload the scene after capture (if not used by someone else)</summary>
Capture_UnloadAfterCapture = 0x0001,
/// <summary>Will capture to a file, either with the provided filename, or to default location (appdata - if company and application name were set)</summary>
Capture_To_File = 0x0002,
/// <summary>Will capture to memory (the CaptureResult will have the byte array and array size fields set)</summary>
Capture_To_Memory = 0x0004,
};
#if !__cplusplus
/// <summary>Settings for scaling the scene</summary>
public
#endif
enum EProjectionScaling {
/// <summary>Scale to fit the width of the 3D window</summary>
ProjectionScaling_Width = 0,
/// <summary>Scale to fit the height of the 3D window</summary>
ProjectionScaling_Height,
/// <summary>Scale to fit the lesser of width or height of the 3D window</summary>
ProjectionScaling_Minimum,
/// <summary>Scale to fit the greater of width or height of the 3D window</summary>
ProjectionScaling_Maximum,
/// <summary>Scale to an explicit number</summary>
ProjectionScaling_Explicit,
};
#if !__cplusplus
/// <summary>Flags used in the CaptureResult struct</summary>
[Flags]
public
#endif
enum ECaptureResultFlags {
/// <summary>No flags specified</summary>
CaptureResult_Invalid = 0x0000,
/// <summary>Whether the scene handle was set in the loadResult field of the CaptureResult struct</summary>
CaptureResult_SceneHandle_Set = 0x0001,
/// <summary>Whether the filename was set in theloadResult field of the CaptureResult struct</summary>
CaptureResult_Filename_Set = 0x0002,
/// <summary>Whether the captureFilename field of the CaptureResult struct was set</summary>
CaptureResult_CaptureFile_Set = 0x0008,
/// <summary>Whether the data and dataSize field of the CaptureResult struct were set</summary>
CaptureResult_CaptureMemory_Set = 0x0010,
};
#if !__cplusplus
/// <summary>Renderer library properties which can be queried/set</summary>
public
#endif
enum EProperty {
/// <summary>No property specified</summary>
Prop_Invalid = 0,
/// <summary>Get OpenGL version, read-only int32 property (Note: packed value, low word for minor and high word for major version)</summary>
Prop_OpenGL_Version,
/// <summary>Get GLSL version, read-only int32 property (Note: packed value, low word for minor and high word for major version)</summary>
Prop_GLSL_Version,
/// <summary>Whether Coverage Sampled AA is supported (only Nvidia supports CSAA), read-only bool property</summary>
Prop_Renderer_SupportsCSAA,
/// <summary>The antialiasing mode for rendering to a frame buffer object (FBO), read/write int32 property (Note: packed value, low word represents color samples, high word for coverage samples)</summary>
Prop_Renderer_FBOAntialiasingMode,
/// <summary>The anisotropic filtering setting, read/write int32 property</summary>
Prop_Renderer_AnisotropicFiltering,
/// <summary>The lighting scheme to use, read/write int32 property (Note: uses values of the ELightingScheme enum)</summary>
Prop_Renderer_LightingScheme,
/// <summary>The background color to use in the 3D render window, read/write int32 property</summary>
Prop_Renderer_BackgroundColor,
/// <summary>Whether to show the world axis, read/write bool property</summary>
Prop_Scene_ShowAxis,
/// <summary>Whether to show the helper grid, read/write bool property</summary>
Prop_Scene_ShowGrid,
/// <summary>Whether to show the scene enclosing bounding box, read/write bool property</summary>
Prop_Scene_ShowBoundingBox,
/// <summary>Whether to show the individual bounding box for all models in the scene, read/write bool property</summary>
Prop_Model_ShowBoundingBoxes,
};
#if !__cplusplus
/// <summary>The camera activation type, as used in the ActivateCamera function</summary>
public
#endif
enum ECameraActivationType {
/// <summary>Camera should be activated by name</summary>
ActivateCamera_ByName,
/// <summary>Activate the first camera</summary>
ActivateCamera_First,
/// <summary>Activate the next camera in the list</summary>
ActivateCamera_Next,
/// <summary>Activate the camera that is marked as default camera</summary>
ActivateCamera_Default
};
#if !__cplusplus
/// <summary>The different camera modes that are available</summary>
public
#endif
enum ECameraMode {
/// <summary>The camera is targeting a specific location and rotates around it</summary>
CameraMode_Target = 0,
/// <summary>The camera can move freely in space</summary>
CameraMode_Free,
/// <summary>The camera is static and cannot be modified at all</summary>
CameraMode_Static,
};
#if !__cplusplus
/// <summary>The various available lighting schemes</summary>
public
#endif
enum ELightingScheme {
/// <summary>No lights are used</summary>
LightingScheme_None = 0,
/// <summary>Lights as specified in the scene file are used</summary>
LightingScheme_Artwork,
/// <summary>Three blue-grey directional lights, no ambient light</summary>
LightingScheme_White,
/// <summary>Three light-grey directional lights, no ambient light</summary>
LightingScheme_Day,
/// <summary>Three directional lights of different colors, no ambient light</summary>
LightingScheme_Night,
/// <summary>Three grey directional lights, some ambient light</summary>
LightingScheme_Hard,
/// <summary>A red, a green and a blue directional light, no ambient light</summary>
LightingScheme_Primary,
/// <summary>Three blue directional lights, no ambient light</summary>
LightingScheme_Blue,
/// <summary>Three red directional lights, no ambient light</summary>
LightingScheme_Red,
/// <summary>Six grey directional lights, aligned along the world axis. no ambient light</summary>
LightingScheme_Cube,
/// <summary>Three grey directiona lights, one light attached to the camera, no ambient light</summary>
LightingScheme_CAD,
/// <summary>A light attached to the camera, minor ambient light</summary>
LightingScheme_Headlamp,
/// <summary>User modified lighting scheme</summary>
LightingScheme_Custom
};
#if __cplusplus
} // namespace PublicEnums
#endif
#if !__cplusplus
static class Static {
public const CallingConvention DllApi = CallingConvention.Cdecl;
#if LINUX
public const UnmanagedType MarshalStr = UnmanagedType.LPWStr;
#else
public const UnmanagedType MarshalStr = UnmanagedType.BStr;
#endif
}
#region Structs
/// <summary>Renderer parameters, used to initialize the renderer</summary>
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct RendererParams
{
/// <summary>The requested major version of OpenGL</summary>
[MarshalAs(UnmanagedType.I4)]
public Int32 majorVersionGL;
/// <summary>The requested minor version of OpenGL</summary>
[MarshalAs(UnmanagedType.I4)]
public Int32 minorVersionGL;
/// <summary>The requested number of color samples for antialiasing</summary>
[MarshalAs(UnmanagedType.U2)]
public UInt16 antialiasingColorSamples;
/// <summary>The requested number of coverage samples for CSAA (Nvidia only)</summary>
[MarshalAs(UnmanagedType.U2)]
public UInt16 antialiasingCoverageSamples;
/// <summary>Other flags to set up the renderer with, see ERendererFlags</summary>
[MarshalAs(UnmanagedType.U4)]
public UInt32 flags;
}
/// <summary>The setting for creating the RenderProxy</summary>
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct RenderProxyParams
{
/// <summary>The field number of availableAAModes
/// -- the list of available antialiasing modes. Note: Uses packed ints containing the color (lo word) and coverage (hi word) samples</summary>
public const int availableAAModesField = 0;
/// <summary>The field number of anisotropyModes
/// -- the list of available anisotropic filtering modes</summary>
public const int anisotropyModesField = 1;
/// <summary>The HWND to use as parent window when creating the OpenGL window</summary>
[MarshalAs(UnmanagedType.I8)]
public Int64 parent;
/// <summary>The requested width of the render window</summary>
[MarshalAs(UnmanagedType.U4)]
public UInt32 width;
/// <summary>The requested height of the render window</summary>
[MarshalAs(UnmanagedType.U4)]
public UInt32 height;
/// <summary>The callback to get availableAAModes and anisotropyModes</summary>
public DelegateUInt32List setUInt32List;
}
/// <summary>The info about the RenderProxy, returned upon (successfully) creating the proxy object</summary>
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct RenderProxyInfo
{
/// <summary>The name of the RenderProxy instance</summary>
public IntPtr name;
/// <summary>The name length</summary>
[MarshalAs(UnmanagedType.I4)]
public Int32 nameLen;
/// <summary>Flags describing details of the RenderProxy, see also ERenderProxyFlags</summary>
[MarshalAs(UnmanagedType.U4)]
public UInt32 flags;
/// <summary>The antialiasing color samples currently used</summary>
[MarshalAs(UnmanagedType.U2)]
public UInt16 antialiasingColorSamples;
/// <summary>The antialiasing coverage samples currently used (CSAA)</summary>
[MarshalAs(UnmanagedType.U2)]
public UInt16 antialiasingCoverageSamples;
/// <summary>The currently used anisotropic filtering mode</summary>
[MarshalAs(UnmanagedType.U4)]
public UInt32 anisotropy;
}
/// <summary>The parameters used for loading views</summary>
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct LoadViewParams
{
/// <summary>Flags as specified in ELoadViewFlags</summary>
[MarshalAs(UnmanagedType.U4)]
public UInt32 flags;
/// <summary>An array of views to load from file, or (if ELoadViewFlags.LoadView_StringData is set) to interpret as 3DV data</summary>
public IntPtr viewInfos;
/// <summary>The number of views to load</summary>
[MarshalAs(UnmanagedType.U4)]
public Int32 viewInfoCount;
/// <summary>The index into viewInfos for the view to activate upon loading of the scene</summary>
[MarshalAs(UnmanagedType.U4)]
public UInt32 defaultViewIndex;
}
/// <summary>The parameters used for loading a scene</summary>
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct LoadSceneParams
{
/// <summary>Loading flags, as specified in ELoadParamFlags</summary>
[MarshalAs(UnmanagedType.U4)]
public UInt32 flags;
/// <summary>Name of the file to load a scene from, will only be used if LoadParam_Input_Filename is set</summary>
[MarshalAs(UnmanagedType.LPWStr)]
public string sceneFilename;
/// <summary>Handle of the scene to be used (for already loaded scenes), will only be used if LoadParam_Input_SceneHandle is set</summary>
[MarshalAs(UnmanagedType.U4)]
public UInt32 sceneHandle;
/// <summary>Raw data (byte array) to use for loading a scene from, used if LoadParam_Input_RawData is set (Note: Only works for clearly specified file formats like U3D or PRC, but not plain text formats like OBJ)</summary>
public IntPtr sceneData;
/// <summary>The size of the sceneData byte array, must be set if LoadParam_Input_RawData is set</summary>
[MarshalAs(UnmanagedType.U4)]
public UInt32 sceneDataSize;
/// <summary>The (optional) view data that can be provided to load upon loading the scene</summary>
[MarshalAs(UnmanagedType.Struct)]
public LoadViewParams viewData;
/// <summary>User data that can be passed through, will be returned through LoadSceneResult</summary>
public IntPtr userData;
/// <summary>The (optional) progress callback</summary>
public WebSupergoo.DelegateLoadProgress progressCallback;
}
/// <summary>Details of the loaded scene, sent in the LoadComplete event</summary>
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct LoadSceneResult
{
/// <summary>The name of the file the scene was loaded from (if applicable)</summary>
public IntPtr sceneFilename;
/// <summary>The name length of the file</summary>
[MarshalAs(UnmanagedType.I4)]
public Int32 sceneFilenameLen;
/// <summary>The handle of the scene</summary>
[MarshalAs(UnmanagedType.U4)]
public UInt32 sceneHandle;
/// <summary>The list of cameras available for this scene</summary>
public IntPtr availableCameras;
/// <summary>The list of camera lengths available</summary>
public IntPtr availableCameraLens;
/// <summary>The number of cameras available</summary>
[MarshalAs(UnmanagedType.U4)]
public UInt32 availableCameraCount;
/// <summary>The info about the currently active camera, see also ActiveCameraInfo</summary>
public IntPtr activeCameraInfo;
/// <summary>The currently active lighting scheme, see ELightingScheme</summary>
[MarshalAs(UnmanagedType.U4)]
public UInt32 lightingScheme;
/// <summary>The user data that was sent in LoadSceneParams</summary>
public IntPtr userData;
}
/// <summary>The parameters to use for exporting a scene</summary>
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct ExportSceneParams
{
/// <summary>Loading parameters, describing where the scene should be retrieved from (for already open scenes use the scene handle)</summary>
[MarshalAs(UnmanagedType.Struct)]
public LoadSceneParams loadParams;
/// <summary>The flags to use for exporting the scene, see EExportFlags</summary>
[MarshalAs(UnmanagedType.U4)]
public UInt32 exportFlags;
/// <summary>The file to write the exported scene to. Note: If not set, the exported scene will be returned as raw data in ExportSceneResult</summary>
[MarshalAs(UnmanagedType.LPWStr)]
public string exportFilename;
}
/// <summary>Information about a scene export</summary>
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct ExportSceneResult
{
/// <summary>Handle of scene that was exported (just for reference)</summary>
[MarshalAs(UnmanagedType.U4)]
public UInt32 sceneHandle;
/// <summary>The export data (if exportFilename is not set, it will use exportData and exportDataSize to write the data to)</summary>
public IntPtr exportData;
/// <summary>The size of the exported data</summary>
[MarshalAs(UnmanagedType.U4)]
public UInt32 exportDataSize;
/// <summary>The user data that was passed in</summary>
public IntPtr userData;
}
/// <summary>The view parameters to use when loading a scene</summary>
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct ViewParams
{
/// <summary>View flags to use, see also EViewFlags</summary>
[MarshalAs(UnmanagedType.U4)]
public UInt32 flags;
/// <summary>Background color to use when rendering the scene</summary>
[MarshalAs(UnmanagedType.U4)]
public UInt32 backgroundColor;
/// <summary>The lighting scheme to use, see ELightingScheme</summary>
[MarshalAs(UnmanagedType.U4)]
public UInt32 lightingScheme;
/// <summary>The name of the camera to use (only used if ViewParams_UseCameraMatrix is NOT set)</summary>
[MarshalAs(UnmanagedType.LPWStr)]
public string cameraName;
/// <summary>Name of the view (if empty will use the camera name)</summary>
[MarshalAs(UnmanagedType.LPWStr)]
public string displayName;
/// <summary>An explicit camera matrix to set up the view with (only used if EViewFlags.ViewParams_UseCameraMatrix IS set)</summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)]
public float[] cameraMatrix;
/// <summary>The center of orbit distance from the camera (distance of the point the camera rotates around)</summary>
[MarshalAs(UnmanagedType.R4)]
public float centerOfOrbitDistance;
/// <summary>The projection scaling setting, see EProjectionScaling</summary>
[MarshalAs(UnmanagedType.U4)]
public UInt32 projectionScaling;
/// <summary>The explicit projection scale, if projectionScaling was set to ProjectionScaling_Explicit</summary>
[MarshalAs(UnmanagedType.R4)]
public float projectionScale;
/// <summary>Distance of the near clipping plane, only used if viewFlags has ViewParams_ExplicitClipping set</summary>
[MarshalAs(UnmanagedType.R4)]
public float nearClip;
/// <summary>Distance of the far clipping plane, only used if viewFlags has ViewParams_ExplicitClipping set</summary>
[MarshalAs(UnmanagedType.R4)]
public float farClip;
/// <summary>The field of View (in degrees)</summary>
[MarshalAs(UnmanagedType.R4)]
public float fov;
/// <summary>The scale for orthogonal views (no effect in perspective projections)</summary>
[MarshalAs(UnmanagedType.R4)]
public float orthoScale;
}
/// <summary>The parameters to use when capturing a scene to an image</summary>
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct CaptureParams
{
/// <summary>Load parameters on where to retrieve the scene from</summary>
[MarshalAs(UnmanagedType.Struct)]
public LoadSceneParams loadParams;
/// <summary>The view parameters to use for the capture</summary>
[MarshalAs(UnmanagedType.Struct)]
public ViewParams viewParams;
/// <summary>Flags to set for the capture, see ECaptureFlags</summary>
[MarshalAs(UnmanagedType.U4)]
public UInt32 flags;
/// <summary>The name of the file to write the captured image to, only used it Capture_To_File was set</summary>
[MarshalAs(UnmanagedType.LPWStr)]
public string captureFilename;
/// <summary>The width of the captured image</summary>
[MarshalAs(UnmanagedType.U4)]
public UInt32 width;
/// <summary>The height of the captured image</summary>
[MarshalAs(UnmanagedType.U4)]
public UInt32 height;
}
/// <summary>Information about the result of a capture</summary>
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct CaptureResult
{
/// <summary>Load scene result that will be (partially) filled upon capture (see flags)</summary>
[MarshalAs(UnmanagedType.Struct)]
public LoadSceneResult loadResult;
/// <summary>Flags indicating which fields contain valid data, see ECaptureResultFlags</summary>
[MarshalAs(UnmanagedType.U4)]
public UInt32 flags;
/// <summary>The name of the output file, only set if Capture_To_File was specified</summary>
public IntPtr captureFilename;
/// <summary>The name length of the output file</summary>
[MarshalAs(UnmanagedType.I4)]
public Int32 captureFilenameLen;
/// <summary>The raw byte data of the capture, only set if Capture_To_Memory was specified</summary>
public IntPtr data;
/// <summary>The size of the raw byte data of the capture, only set if Capture_To_Memory was specified</summary>
[MarshalAs(UnmanagedType.U4)]
public UInt32 dataSize;
/// <summary>The width of the resulting image data</summary>
[MarshalAs(UnmanagedType.U4)]
public UInt32 width;
/// <summary>The height of the resulting image data</summary>
[MarshalAs(UnmanagedType.U4)]
public UInt32 height;
}
/// <summary>Info about the active camera</summary>
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct ActiveCameraInfo
{
/// <summary>The name of the camera</summary>
public IntPtr cameraName;
/// <summary>The name length of the camera</summary>
[MarshalAs(UnmanagedType.I4)]
public Int32 cameraNameLen;
/// <summary>The camera mode of operation, see ECameraMode</summary>
[MarshalAs(UnmanagedType.U4)]
public UInt32 cameraMode;
/// <summary>Set if the camera uses orthogonal projection</summary>
[MarshalAs(UnmanagedType.U4)]
public UInt32 isOrtho;
/// <summary>Set if the camera can be modified at all</summary>
[MarshalAs(UnmanagedType.U4)]
public UInt32 isModifiable;
}
/// <summary>Info about the loading progress, sent in the LoadProgress event</summary>
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct ProgressInfo
{
/// <summary>The percentage of the current loading process</summary>
[MarshalAs(UnmanagedType.R4)]
public float currentProgress;
/// <summary>The user data that was passed in with LoadSceneParams</summary>
public IntPtr userData;
}
#endregion
#region Delegates
//
// Loading/unloading a scene
//
/// <summary>Delegate that gets called when loading a scene is finished. The resultInfo parameter is an IntPtr to a LoadSceneResult struct.</summary>
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void DelegateLoadComplete(IntPtr resultInfo, bool success);
/// <summary>Delegate that gets called when unloading (closing) a scene is finished.</summary>
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void DelegateUnloadComplete(UInt32 sceneHandle);
/// <summary>Delegate that gets called when unloading all scenes is finished.</summary>
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void DelegateUnloadAllComplete();
/// <summary>Delegate that gets called frequently with updates on the loading progress.</summary>
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void DelegateLoadProgress([MarshalAs(UnmanagedType.Struct)] WebSupergoo.ProgressInfo progress);
//
// Exporting a scene
//
/// <summary>Delegate that gets called when an export was completed. The resultInfo parameter is an IntPtr to an ExportSceneResult struct</summary>
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void DelegateExportComplete(IntPtr resultInfo, bool success);
//
// capture
//
/// <summary>Delegate that gets called when a capture was completed. The resultInfo parameter is an IntPtr to an CaptureResult struct</summary>
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void DelegateCaptureComplete(IntPtr resultInfo, bool success);
//
// cameras
//
/// <summary>Delegate that gets called when the active camera changed. The camInfo parameter is an IntPtr to an ActiveCameraInfo struct</summary>
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void DelegateOnActiveCameraChanged(IntPtr camInfo, bool success);
//
// return
//
/// <summary>Delegate that gets called when a list of strings was requested</summary>
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void DelegateStrList(Int32 field, IntPtr list, IntPtr lenList, UInt32 count);
/// <summary>Delegate that gets called when a list of Int32's was requested</summary>
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void DelegateUInt32List(Int32 field,
[MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] UInt32[] list, UInt32 count);
//
// logging
//
/// <summary>Delegate that gets called when a list (of names) of the available cameras was requested</summary>
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void DelegateLogging(IntPtr userData, Int32 level, [MarshalAs(UnmanagedType.LPWStr)] string msg);
#endregion
#endif
} // namespace WebSupergoo