using System; using System.Runtime.InteropServices; using System.Text; using BMapSharp.VirtoolsTypes; namespace BMapSharp { public static class BMap { /// The callback function of BMap. /// The message content need to be printed. public delegate void OutputCallback([In, MarshalAs(UnmanagedType.LPUTF8Str)] string msg); /// The custom marshaler for BMap string array. public class BMStringArrayMarshaler : ICustomMarshaler { // References: // https://stackoverflow.com/questions/18498452/how-do-i-write-a-custom-marshaler-which-allows-data-to-flow-from-native-to-manag // https://learn.microsoft.com/en-us/dotnet/fundamentals/runtime-libraries/system-runtime-interopservices-icustommarshaler // // NOTE: I do not create a member to store the object we are marshaling. // Because my binding do not have In, Out parameter. All parameters are In OR Out. // So there is no reason to keep that member. private static BMStringArrayMarshaler g_Instance; public static ICustomMarshaler GetInstance(string pstrCookie) { if (g_Instance is null) g_Instance = new BMStringArrayMarshaler(); return g_Instance; } // For respecting the standard of BMap, // the native memory we created is a simple array and each item is a pointer to a NULL-terminated UTF8 string. // Please note the array self is not NULL-terminated because its length is provided by another argument in function calling. // However, this memory layout is not good for our marshaling. // We can not know the size of array we created. Because we need iterate it when freeing or fetching data. // We also can not know the size of string we created because we need read them when parsing them to C# string. // // So the solution we made is adding an uint32_t header before the array to indicate the size of array. // And also add an uint32_t header for each string to indicate the length of string (in bytes, NULL exclusive). // So the pointer put in array is not the address we allocated, it has an offset. // Also we return native pointer is not the address we allocated, it also has an offset. private static readonly int szLengthHeaderSize = Marshal.SizeOf(); private static readonly int szArrayItemSize = Marshal.SizeOf(); private static readonly int szStringItemSize = Marshal.SizeOf(); public IntPtr MarshalManagedToNative(object ManagedObj) { // Check nullptr object. if (ManagedObj is null) return IntPtr.Zero; // Check argument type. string[] castManagedObj = ManagedObj as string[]; if (castManagedObj is null) throw new MarshalDirectiveException("BMStringArrayMashaler must be used on an string array."); // Allocate string items first int szArrayItemCount = castManagedObj.Length; IntPtr[] apStrings = new IntPtr[szArrayItemCount]; for (int i = 0; i < szArrayItemCount; ++i) { // Encode string first. byte[] encString = Encoding.UTF8.GetBytes(castManagedObj[i]); // Allocate string memory with extra NULL terminal. int szStringItemCount = encString.Length; IntPtr pString = Marshal.AllocHGlobal(szStringItemSize * (szStringItemCount + 1) + szLengthHeaderSize); // Setup length field Marshal.WriteInt32(pString, 0, szStringItemCount); // Copy string data with offset. IntPtr pFakeString = pString + szLengthHeaderSize; Marshal.Copy(encString, 0, pFakeString, szStringItemCount); // Set NULL terminal. Marshal.WriteByte(pFakeString, szStringItemSize * szStringItemCount, 0); // Set item in string pointer apStrings[i] = pFakeString; } // Allocate array pointer now. IntPtr pArray = Marshal.AllocHGlobal(szArrayItemSize * szArrayItemCount + szLengthHeaderSize); // Setup length field Marshal.WriteInt32(pArray, 0, szArrayItemCount); // Copy string pointer data with offset. IntPtr pFakeArray = pArray + szLengthHeaderSize; Marshal.Copy(apStrings, 0, pFakeArray, szArrayItemCount); // Return value return pFakeArray; } public object MarshalNativeToManaged(IntPtr pNativeData) { // Check nullptr if (pNativeData == IntPtr.Zero) return null; // Get real array pointer IntPtr pFakeArray = pNativeData; IntPtr pArray = pFakeArray - szLengthHeaderSize; // Get the count of array and read string pointers int szArrayItemCount = Marshal.ReadInt32(pArray, 0); IntPtr[] apStrings = new IntPtr[szArrayItemCount]; Marshal.Copy(pFakeArray, apStrings, 0, szArrayItemCount); // Iterate the array and process each string one by one. string[] ret = new string[szArrayItemCount]; for (int i = 0; i < szArrayItemCount; ++i) { // Get string pointer IntPtr pFakeString = apStrings[i]; if (pFakeString == IntPtr.Zero) { ret[i] = null; continue; } IntPtr pString = pFakeString - szLengthHeaderSize; // Read string length int szStringItemCount = Marshal.ReadInt32(pString, 0); // Read string body byte[] encString = new byte[szStringItemCount]; Marshal.Copy(pFakeString, encString, 0, szStringItemCount); // Decode string with UTF8 ret[i] = Encoding.UTF8.GetString(encString); } // Return result return ret; } public void CleanUpNativeData(IntPtr pNativeData) { // Check nullptr if (pNativeData == IntPtr.Zero) return; // Get real array pointer IntPtr pFakeArray = pNativeData; IntPtr pArray = pFakeArray - szLengthHeaderSize; // Get the count of array and read string pointers int szArrayItemCount = Marshal.ReadInt32(pArray, 0); IntPtr[] apStrings = new IntPtr[szArrayItemCount]; Marshal.Copy(pFakeArray, apStrings, 0, szArrayItemCount); // Iterate the array and free them one by one. for (int i = 0; i < szArrayItemCount; ++i) { // Get string pointer IntPtr pFakeString = apStrings[i]; if (pFakeString == IntPtr.Zero) continue; IntPtr pString = pFakeString - szLengthHeaderSize; // Free string pointer Marshal.FreeHGlobal(pString); } // Free array self Marshal.FreeHGlobal(pArray); } public void CleanUpManagedData(object ManagedObj) { // Do nothing, because managed data do not need any clean up. } public int GetNativeDataSize() { return -1; } } // Decide the file name of loaded DLL. #if BMAP_OS_WINDOWS private const string g_DllName = "BMap.dll"; #elif BMAP_OS_LINUX private const string g_DllName = "BMap.so"; #elif BMAP_OS_MACOS private const string g_DllName = "BMap.dylib"; #else private const string g_DllName = "BMap.bin"; #endif #region Function Defines // ##### GENERATED FUNCTIONS BEGIN ##### /// BMInit /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMInit", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMInit(); /// BMDispose /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMDispose", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMDispose(); /// BMFile_Load /// Type: LibCmo::CKSTRING. /// Type: LibCmo::CKSTRING. /// Type: LibCmo::CKSTRING. /// Type: BMap::NakedOutputCallback. /// Type: LibCmo::CKDWORD. /// Type: LibCmo::CKSTRING*. /// Type: BMap::BMFile*. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMFile_Load", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMFile_Load([In, MarshalAs(UnmanagedType.LPUTF8Str)] string file_name, [In, MarshalAs(UnmanagedType.LPUTF8Str)] string temp_folder, [In, MarshalAs(UnmanagedType.LPUTF8Str)] string texture_folder, [In, MarshalAs(UnmanagedType.FunctionPtr)] OutputCallback raw_callback, [In, MarshalAs(UnmanagedType.U4)] uint encoding_count, [In, MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(BMStringArrayMarshaler))] string[] encodings, [Out, MarshalAs(UnmanagedType.SysInt)] out IntPtr out_file); /// BMFile_Create /// Type: LibCmo::CKSTRING. /// Type: LibCmo::CKSTRING. /// Type: BMap::NakedOutputCallback. /// Type: LibCmo::CKDWORD. /// Type: LibCmo::CKSTRING*. /// Type: BMap::BMFile*. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMFile_Create", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMFile_Create([In, MarshalAs(UnmanagedType.LPUTF8Str)] string temp_folder, [In, MarshalAs(UnmanagedType.LPUTF8Str)] string texture_folder, [In, MarshalAs(UnmanagedType.FunctionPtr)] OutputCallback raw_callback, [In, MarshalAs(UnmanagedType.U4)] uint encoding_count, [In, MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(BMStringArrayMarshaler))] string[] encodings, [Out, MarshalAs(UnmanagedType.SysInt)] out IntPtr out_file); /// BMFile_Save /// Type: BMap::BMFile*. /// Type: LibCmo::CKSTRING. /// Type: LibCmo::CK2::CK_TEXTURE_SAVEOPTIONS. /// Type: bool. /// Type: LibCmo::CKINT. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMFile_Save", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMFile_Save([In, MarshalAs(UnmanagedType.SysInt)] IntPtr map_file, [In, MarshalAs(UnmanagedType.LPUTF8Str)] string file_name, [In, MarshalAs(UnmanagedType.U4)] uint texture_save_opt, [In, MarshalAs(UnmanagedType.U1)] bool use_compress, [In, MarshalAs(UnmanagedType.I4)] int compreess_level); /// BMFile_Free /// Type: BMap::BMFile*. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMFile_Free", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMFile_Free([In, MarshalAs(UnmanagedType.SysInt)] IntPtr map_file); /// BMFile_GetGroupCount /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CKDWORD. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMFile_GetGroupCount", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMFile_GetGroupCount([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [Out, MarshalAs(UnmanagedType.U4)] out uint out_count); /// BMFile_GetGroup /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CKDWORD. /// Type: LibCmo::CK2::CK_ID. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMFile_GetGroup", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMFile_GetGroup([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint idx, [Out, MarshalAs(UnmanagedType.U4)] out uint out_id); /// BMFile_CreateGroup /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMFile_CreateGroup", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMFile_CreateGroup([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [Out, MarshalAs(UnmanagedType.U4)] out uint out_id); /// BMFile_Get3dObjectCount /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CKDWORD. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMFile_Get3dObjectCount", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMFile_Get3dObjectCount([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [Out, MarshalAs(UnmanagedType.U4)] out uint out_count); /// BMFile_Get3dObject /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CKDWORD. /// Type: LibCmo::CK2::CK_ID. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMFile_Get3dObject", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMFile_Get3dObject([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint idx, [Out, MarshalAs(UnmanagedType.U4)] out uint out_id); /// BMFile_Create3dObject /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMFile_Create3dObject", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMFile_Create3dObject([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [Out, MarshalAs(UnmanagedType.U4)] out uint out_id); /// BMFile_GetMeshCount /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CKDWORD. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMFile_GetMeshCount", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMFile_GetMeshCount([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [Out, MarshalAs(UnmanagedType.U4)] out uint out_count); /// BMFile_GetMesh /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CKDWORD. /// Type: LibCmo::CK2::CK_ID. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMFile_GetMesh", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMFile_GetMesh([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint idx, [Out, MarshalAs(UnmanagedType.U4)] out uint out_id); /// BMFile_CreateMesh /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMFile_CreateMesh", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMFile_CreateMesh([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [Out, MarshalAs(UnmanagedType.U4)] out uint out_id); /// BMFile_GetMaterialCount /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CKDWORD. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMFile_GetMaterialCount", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMFile_GetMaterialCount([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [Out, MarshalAs(UnmanagedType.U4)] out uint out_count); /// BMFile_GetMaterial /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CKDWORD. /// Type: LibCmo::CK2::CK_ID. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMFile_GetMaterial", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMFile_GetMaterial([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint idx, [Out, MarshalAs(UnmanagedType.U4)] out uint out_id); /// BMFile_CreateMaterial /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMFile_CreateMaterial", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMFile_CreateMaterial([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [Out, MarshalAs(UnmanagedType.U4)] out uint out_id); /// BMFile_GetTextureCount /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CKDWORD. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMFile_GetTextureCount", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMFile_GetTextureCount([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [Out, MarshalAs(UnmanagedType.U4)] out uint out_count); /// BMFile_GetTexture /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CKDWORD. /// Type: LibCmo::CK2::CK_ID. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMFile_GetTexture", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMFile_GetTexture([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint idx, [Out, MarshalAs(UnmanagedType.U4)] out uint out_id); /// BMFile_CreateTexture /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMFile_CreateTexture", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMFile_CreateTexture([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [Out, MarshalAs(UnmanagedType.U4)] out uint out_id); /// BMMeshTrans_New /// Type: BMap::BMMeshTransition*. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMeshTrans_New", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMeshTrans_New([Out, MarshalAs(UnmanagedType.SysInt)] out IntPtr out_trans); /// BMMeshTrans_Delete /// Type: BMap::BMMeshTransition*. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMeshTrans_Delete", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMeshTrans_Delete([In, MarshalAs(UnmanagedType.SysInt)] IntPtr trans); /// BMMeshTrans_PrepareVertexCount /// Type: BMap::BMMeshTransition*. The pointer to corresponding BMMeshTransition. /// Type: LibCmo::CKDWORD. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMeshTrans_PrepareVertexCount", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMeshTrans_PrepareVertexCount([In, MarshalAs(UnmanagedType.SysInt)] IntPtr trans, [In, MarshalAs(UnmanagedType.U4)] uint count); /// BMMeshTrans_PrepareVertex /// Type: BMap::BMMeshTransition*. The pointer to corresponding BMMeshTransition. /// Type: LibCmo::VxMath::VxVector3*. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMeshTrans_PrepareVertex", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMeshTrans_PrepareVertex([In, MarshalAs(UnmanagedType.SysInt)] IntPtr trans, [Out, MarshalAs(UnmanagedType.SysInt)] out IntPtr out_mem); /// BMMeshTrans_PrepareNormalCount /// Type: BMap::BMMeshTransition*. The pointer to corresponding BMMeshTransition. /// Type: LibCmo::CKDWORD. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMeshTrans_PrepareNormalCount", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMeshTrans_PrepareNormalCount([In, MarshalAs(UnmanagedType.SysInt)] IntPtr trans, [In, MarshalAs(UnmanagedType.U4)] uint count); /// BMMeshTrans_PrepareNormal /// Type: BMap::BMMeshTransition*. The pointer to corresponding BMMeshTransition. /// Type: LibCmo::VxMath::VxVector3*. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMeshTrans_PrepareNormal", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMeshTrans_PrepareNormal([In, MarshalAs(UnmanagedType.SysInt)] IntPtr trans, [Out, MarshalAs(UnmanagedType.SysInt)] out IntPtr out_mem); /// BMMeshTrans_PrepareUVCount /// Type: BMap::BMMeshTransition*. The pointer to corresponding BMMeshTransition. /// Type: LibCmo::CKDWORD. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMeshTrans_PrepareUVCount", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMeshTrans_PrepareUVCount([In, MarshalAs(UnmanagedType.SysInt)] IntPtr trans, [In, MarshalAs(UnmanagedType.U4)] uint count); /// BMMeshTrans_PrepareUV /// Type: BMap::BMMeshTransition*. The pointer to corresponding BMMeshTransition. /// Type: LibCmo::VxMath::VxVector2*. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMeshTrans_PrepareUV", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMeshTrans_PrepareUV([In, MarshalAs(UnmanagedType.SysInt)] IntPtr trans, [Out, MarshalAs(UnmanagedType.SysInt)] out IntPtr out_mem); /// BMMeshTrans_PrepareMtlSlotCount /// Type: BMap::BMMeshTransition*. The pointer to corresponding BMMeshTransition. /// Type: LibCmo::CKDWORD. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMeshTrans_PrepareMtlSlotCount", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMeshTrans_PrepareMtlSlotCount([In, MarshalAs(UnmanagedType.SysInt)] IntPtr trans, [In, MarshalAs(UnmanagedType.U4)] uint count); /// BMMeshTrans_PrepareMtlSlot /// Type: BMap::BMMeshTransition*. The pointer to corresponding BMMeshTransition. /// Type: LibCmo::CK2::CK_ID*. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMeshTrans_PrepareMtlSlot", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMeshTrans_PrepareMtlSlot([In, MarshalAs(UnmanagedType.SysInt)] IntPtr trans, [Out, MarshalAs(UnmanagedType.SysInt)] out IntPtr out_mem); /// BMMeshTrans_PrepareFaceCount /// Type: BMap::BMMeshTransition*. The pointer to corresponding BMMeshTransition. /// Type: LibCmo::CKDWORD. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMeshTrans_PrepareFaceCount", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMeshTrans_PrepareFaceCount([In, MarshalAs(UnmanagedType.SysInt)] IntPtr trans, [In, MarshalAs(UnmanagedType.U4)] uint count); /// BMMeshTrans_PrepareFaceVertexIndices /// Type: BMap::BMMeshTransition*. The pointer to corresponding BMMeshTransition. /// Type: LibCmo::CKDWORD*. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMeshTrans_PrepareFaceVertexIndices", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMeshTrans_PrepareFaceVertexIndices([In, MarshalAs(UnmanagedType.SysInt)] IntPtr trans, [Out, MarshalAs(UnmanagedType.SysInt)] out IntPtr out_mem); /// BMMeshTrans_PrepareFaceNormalIndices /// Type: BMap::BMMeshTransition*. The pointer to corresponding BMMeshTransition. /// Type: LibCmo::CKDWORD*. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMeshTrans_PrepareFaceNormalIndices", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMeshTrans_PrepareFaceNormalIndices([In, MarshalAs(UnmanagedType.SysInt)] IntPtr trans, [Out, MarshalAs(UnmanagedType.SysInt)] out IntPtr out_mem); /// BMMeshTrans_PrepareFaceUVIndices /// Type: BMap::BMMeshTransition*. The pointer to corresponding BMMeshTransition. /// Type: LibCmo::CKDWORD*. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMeshTrans_PrepareFaceUVIndices", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMeshTrans_PrepareFaceUVIndices([In, MarshalAs(UnmanagedType.SysInt)] IntPtr trans, [Out, MarshalAs(UnmanagedType.SysInt)] out IntPtr out_mem); /// BMMeshTrans_PrepareFaceMtlSlot /// Type: BMap::BMMeshTransition*. The pointer to corresponding BMMeshTransition. /// Type: LibCmo::CKDWORD*. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMeshTrans_PrepareFaceMtlSlot", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMeshTrans_PrepareFaceMtlSlot([In, MarshalAs(UnmanagedType.SysInt)] IntPtr trans, [Out, MarshalAs(UnmanagedType.SysInt)] out IntPtr out_mem); /// BMMeshTrans_Parse /// Type: BMap::BMMeshTransition*. The pointer to corresponding BMMeshTransition. /// Type: BMap::BMFile*. /// Type: LibCmo::CK2::CK_ID. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMeshTrans_Parse", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMeshTrans_Parse([In, MarshalAs(UnmanagedType.SysInt)] IntPtr trans, [In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid); /// BMObject_GetName /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::CKSTRING. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMObject_GetName", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMObject_GetName([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [Out, MarshalAs(UnmanagedType.LPUTF8Str)] out string out_name); /// BMObject_SetName /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::CKSTRING. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMObject_SetName", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMObject_SetName([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [In, MarshalAs(UnmanagedType.LPUTF8Str)] string name); /// BMGroup_AddObject /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::CK2::CK_ID. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMGroup_AddObject", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMGroup_AddObject([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [In, MarshalAs(UnmanagedType.U4)] uint memberid); /// BMGroup_GetObjectCount /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::CKDWORD. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMGroup_GetObjectCount", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMGroup_GetObjectCount([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [Out, MarshalAs(UnmanagedType.U4)] out uint out_count); /// BMGroup_GetObject /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::CKDWORD. /// Type: LibCmo::CK2::CK_ID. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMGroup_GetObject", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMGroup_GetObject([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [In, MarshalAs(UnmanagedType.U4)] uint pos, [Out, MarshalAs(UnmanagedType.U4)] out uint out_objid); /// BMTexture_GetFileName /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::CKSTRING. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMTexture_GetFileName", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMTexture_GetFileName([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [Out, MarshalAs(UnmanagedType.LPUTF8Str)] out string out_filename); /// BMTexture_LoadImage /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::CKSTRING. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMTexture_LoadImage", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMTexture_LoadImage([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [In, MarshalAs(UnmanagedType.LPUTF8Str)] string filename); /// BMTexture_SaveImage /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::CKSTRING. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMTexture_SaveImage", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMTexture_SaveImage([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [In, MarshalAs(UnmanagedType.LPUTF8Str)] string filename); /// BMTexture_GetSaveOptions /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::CK2::CK_TEXTURE_SAVEOPTIONS. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMTexture_GetSaveOptions", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMTexture_GetSaveOptions([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [Out, MarshalAs(UnmanagedType.U4)] out uint out_saveopt); /// BMTexture_SetSaveOptions /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::CK2::CK_TEXTURE_SAVEOPTIONS. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMTexture_SetSaveOptions", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMTexture_SetSaveOptions([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [In, MarshalAs(UnmanagedType.U4)] uint saveopt); /// BMTexture_GetVideoFormat /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::VxMath::VX_PIXELFORMAT. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMTexture_GetVideoFormat", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMTexture_GetVideoFormat([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [Out, MarshalAs(UnmanagedType.U4)] out uint out_vfmt); /// BMTexture_SetVideoFormat /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::VxMath::VX_PIXELFORMAT. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMTexture_SetVideoFormat", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMTexture_SetVideoFormat([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [In, MarshalAs(UnmanagedType.U4)] uint vfmt); /// BMMaterial_GetDiffuse /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::VxMath::VxColor. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_GetDiffuse", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_GetDiffuse([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [Out, MarshalAs(UnmanagedType.Struct)] out VxColor out_val); /// BMMaterial_SetDiffuse /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::VxMath::VxColor. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_SetDiffuse", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_SetDiffuse([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [In, MarshalAs(UnmanagedType.Struct)] VxColor col); /// BMMaterial_GetAmbient /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::VxMath::VxColor. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_GetAmbient", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_GetAmbient([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [Out, MarshalAs(UnmanagedType.Struct)] out VxColor out_val); /// BMMaterial_SetAmbient /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::VxMath::VxColor. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_SetAmbient", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_SetAmbient([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [In, MarshalAs(UnmanagedType.Struct)] VxColor col); /// BMMaterial_GetSpecular /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::VxMath::VxColor. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_GetSpecular", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_GetSpecular([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [Out, MarshalAs(UnmanagedType.Struct)] out VxColor out_val); /// BMMaterial_SetSpecular /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::VxMath::VxColor. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_SetSpecular", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_SetSpecular([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [In, MarshalAs(UnmanagedType.Struct)] VxColor col); /// BMMaterial_GetEmissive /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::VxMath::VxColor. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_GetEmissive", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_GetEmissive([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [Out, MarshalAs(UnmanagedType.Struct)] out VxColor out_val); /// BMMaterial_SetEmissive /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::VxMath::VxColor. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_SetEmissive", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_SetEmissive([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [In, MarshalAs(UnmanagedType.Struct)] VxColor col); /// BMMaterial_GetSpecularPower /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::CKFLOAT. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_GetSpecularPower", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_GetSpecularPower([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [Out, MarshalAs(UnmanagedType.R4)] out float out_val); /// BMMaterial_SetSpecularPower /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::CKFLOAT. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_SetSpecularPower", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_SetSpecularPower([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [In, MarshalAs(UnmanagedType.R4)] float val); /// BMMaterial_GetTexture /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::CK2::CK_ID. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_GetTexture", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_GetTexture([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [Out, MarshalAs(UnmanagedType.U4)] out uint out_texid); /// BMMaterial_SetTexture /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::CK2::CK_ID. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_SetTexture", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_SetTexture([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [In, MarshalAs(UnmanagedType.U4)] uint texid); /// BMMaterial_GetTextureBorderColor /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::CKDWORD. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_GetTextureBorderColor", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_GetTextureBorderColor([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [Out, MarshalAs(UnmanagedType.U4)] out uint out_val); /// BMMaterial_SetTextureBorderColor /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::CKDWORD. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_SetTextureBorderColor", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_SetTextureBorderColor([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [In, MarshalAs(UnmanagedType.U4)] uint val); /// BMMaterial_GetTextureBlendMode /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::VxMath::VXTEXTURE_BLENDMODE. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_GetTextureBlendMode", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_GetTextureBlendMode([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [Out, MarshalAs(UnmanagedType.U4)] out uint out_val); /// BMMaterial_SetTextureBlendMode /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::VxMath::VXTEXTURE_BLENDMODE. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_SetTextureBlendMode", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_SetTextureBlendMode([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [In, MarshalAs(UnmanagedType.U4)] uint val); /// BMMaterial_GetTextureMinMode /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::VxMath::VXTEXTURE_FILTERMODE. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_GetTextureMinMode", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_GetTextureMinMode([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [Out, MarshalAs(UnmanagedType.U4)] out uint out_val); /// BMMaterial_SetTextureMinMode /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::VxMath::VXTEXTURE_FILTERMODE. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_SetTextureMinMode", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_SetTextureMinMode([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [In, MarshalAs(UnmanagedType.U4)] uint val); /// BMMaterial_GetTextureMagMode /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::VxMath::VXTEXTURE_FILTERMODE. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_GetTextureMagMode", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_GetTextureMagMode([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [Out, MarshalAs(UnmanagedType.U4)] out uint out_val); /// BMMaterial_SetTextureMagMode /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::VxMath::VXTEXTURE_FILTERMODE. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_SetTextureMagMode", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_SetTextureMagMode([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [In, MarshalAs(UnmanagedType.U4)] uint val); /// BMMaterial_GetTextureAddressMode /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::VxMath::VXTEXTURE_ADDRESSMODE. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_GetTextureAddressMode", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_GetTextureAddressMode([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [Out, MarshalAs(UnmanagedType.U4)] out uint out_val); /// BMMaterial_SetTextureAddressMode /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::VxMath::VXTEXTURE_ADDRESSMODE. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_SetTextureAddressMode", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_SetTextureAddressMode([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [In, MarshalAs(UnmanagedType.U4)] uint val); /// BMMaterial_GetSourceBlend /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::VxMath::VXBLEND_MODE. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_GetSourceBlend", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_GetSourceBlend([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [Out, MarshalAs(UnmanagedType.U4)] out uint out_val); /// BMMaterial_SetSourceBlend /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::VxMath::VXBLEND_MODE. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_SetSourceBlend", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_SetSourceBlend([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [In, MarshalAs(UnmanagedType.U4)] uint val); /// BMMaterial_GetDestBlend /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::VxMath::VXBLEND_MODE. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_GetDestBlend", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_GetDestBlend([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [Out, MarshalAs(UnmanagedType.U4)] out uint out_val); /// BMMaterial_SetDestBlend /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::VxMath::VXBLEND_MODE. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_SetDestBlend", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_SetDestBlend([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [In, MarshalAs(UnmanagedType.U4)] uint val); /// BMMaterial_GetFillMode /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::VxMath::VXFILL_MODE. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_GetFillMode", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_GetFillMode([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [Out, MarshalAs(UnmanagedType.U4)] out uint out_val); /// BMMaterial_SetFillMode /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::VxMath::VXFILL_MODE. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_SetFillMode", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_SetFillMode([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [In, MarshalAs(UnmanagedType.U4)] uint val); /// BMMaterial_GetShadeMode /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::VxMath::VXSHADE_MODE. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_GetShadeMode", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_GetShadeMode([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [Out, MarshalAs(UnmanagedType.U4)] out uint out_val); /// BMMaterial_SetShadeMode /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::VxMath::VXSHADE_MODE. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_SetShadeMode", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_SetShadeMode([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [In, MarshalAs(UnmanagedType.U4)] uint val); /// BMMaterial_GetAlphaTestEnabled /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: bool. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_GetAlphaTestEnabled", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_GetAlphaTestEnabled([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [Out, MarshalAs(UnmanagedType.U1)] out bool out_val); /// BMMaterial_SetAlphaTestEnabled /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: bool. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_SetAlphaTestEnabled", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_SetAlphaTestEnabled([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [In, MarshalAs(UnmanagedType.U1)] bool enabled); /// BMMaterial_GetAlphaBlendEnabled /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: bool. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_GetAlphaBlendEnabled", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_GetAlphaBlendEnabled([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [Out, MarshalAs(UnmanagedType.U1)] out bool out_val); /// BMMaterial_SetAlphaBlendEnabled /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: bool. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_SetAlphaBlendEnabled", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_SetAlphaBlendEnabled([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [In, MarshalAs(UnmanagedType.U1)] bool enabled); /// BMMaterial_GetPerspectiveCorrectionEnabled /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: bool. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_GetPerspectiveCorrectionEnabled", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_GetPerspectiveCorrectionEnabled([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [Out, MarshalAs(UnmanagedType.U1)] out bool out_val); /// BMMaterial_SetPerspectiveCorrectionEnabled /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: bool. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_SetPerspectiveCorrectionEnabled", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_SetPerspectiveCorrectionEnabled([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [In, MarshalAs(UnmanagedType.U1)] bool enabled); /// BMMaterial_GetZWriteEnabled /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: bool. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_GetZWriteEnabled", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_GetZWriteEnabled([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [Out, MarshalAs(UnmanagedType.U1)] out bool out_val); /// BMMaterial_SetZWriteEnabled /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: bool. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_SetZWriteEnabled", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_SetZWriteEnabled([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [In, MarshalAs(UnmanagedType.U1)] bool enabled); /// BMMaterial_GetTwoSidedEnabled /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: bool. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_GetTwoSidedEnabled", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_GetTwoSidedEnabled([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [Out, MarshalAs(UnmanagedType.U1)] out bool out_val); /// BMMaterial_SetTwoSidedEnabled /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: bool. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_SetTwoSidedEnabled", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_SetTwoSidedEnabled([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [In, MarshalAs(UnmanagedType.U1)] bool enabled); /// BMMaterial_GetAlphaRef /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::CKBYTE. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_GetAlphaRef", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_GetAlphaRef([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [Out, MarshalAs(UnmanagedType.U4)] out uint out_val); /// BMMaterial_SetAlphaRef /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::CKBYTE. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_SetAlphaRef", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_SetAlphaRef([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [In, MarshalAs(UnmanagedType.U4)] uint val); /// BMMaterial_GetAlphaFunc /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::VxMath::VXCMPFUNC. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_GetAlphaFunc", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_GetAlphaFunc([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [Out, MarshalAs(UnmanagedType.U4)] out uint out_val); /// BMMaterial_SetAlphaFunc /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::VxMath::VXCMPFUNC. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_SetAlphaFunc", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_SetAlphaFunc([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [In, MarshalAs(UnmanagedType.U4)] uint val); /// BMMaterial_GetZFunc /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::VxMath::VXCMPFUNC. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_GetZFunc", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_GetZFunc([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [Out, MarshalAs(UnmanagedType.U4)] out uint out_val); /// BMMaterial_SetZFunc /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::VxMath::VXCMPFUNC. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMaterial_SetZFunc", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMaterial_SetZFunc([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [In, MarshalAs(UnmanagedType.U4)] uint val); /// BMMesh_GetLitMode /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::VxMath::VXMESH_LITMODE. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMesh_GetLitMode", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMesh_GetLitMode([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [Out, MarshalAs(UnmanagedType.U4)] out uint out_mode); /// BMMesh_SetLitMode /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::VxMath::VXMESH_LITMODE. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMesh_SetLitMode", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMesh_SetLitMode([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [In, MarshalAs(UnmanagedType.U4)] uint mode); /// BMMesh_GetVertexCount /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::CKDWORD. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMesh_GetVertexCount", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMesh_GetVertexCount([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [Out, MarshalAs(UnmanagedType.U4)] out uint out_count); /// BMMesh_SetVertexCount /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::CKDWORD. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMesh_SetVertexCount", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMesh_SetVertexCount([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [In, MarshalAs(UnmanagedType.U4)] uint count); /// BMMesh_GetVertexPositions /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::VxMath::VxVector3*. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMesh_GetVertexPositions", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMesh_GetVertexPositions([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [Out, MarshalAs(UnmanagedType.SysInt)] out IntPtr out_mem); /// BMMesh_GetVertexNormals /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::VxMath::VxVector3*. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMesh_GetVertexNormals", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMesh_GetVertexNormals([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [Out, MarshalAs(UnmanagedType.SysInt)] out IntPtr out_mem); /// BMMesh_GetVertexUVs /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::VxMath::VxVector2*. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMesh_GetVertexUVs", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMesh_GetVertexUVs([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [Out, MarshalAs(UnmanagedType.SysInt)] out IntPtr out_mem); /// BMMesh_GetFaceCount /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::CKDWORD. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMesh_GetFaceCount", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMesh_GetFaceCount([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [Out, MarshalAs(UnmanagedType.U4)] out uint out_count); /// BMMesh_SetFaceCount /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::CKDWORD. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMesh_SetFaceCount", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMesh_SetFaceCount([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [In, MarshalAs(UnmanagedType.U4)] uint count); /// BMMesh_GetFaceIndices /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::CKWORD*. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMesh_GetFaceIndices", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMesh_GetFaceIndices([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [Out, MarshalAs(UnmanagedType.SysInt)] out IntPtr out_mem); /// BMMesh_GetFaceMaterialSlotIndexs /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::CKWORD*. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMesh_GetFaceMaterialSlotIndexs", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMesh_GetFaceMaterialSlotIndexs([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [Out, MarshalAs(UnmanagedType.SysInt)] out IntPtr out_mem); /// BMMesh_GetMaterialSlotCount /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::CKDWORD. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMesh_GetMaterialSlotCount", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMesh_GetMaterialSlotCount([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [Out, MarshalAs(UnmanagedType.U4)] out uint out_count); /// BMMesh_SetMaterialSlotCount /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::CKDWORD. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMesh_SetMaterialSlotCount", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMesh_SetMaterialSlotCount([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [In, MarshalAs(UnmanagedType.U4)] uint count); /// BMMesh_GetMaterialSlot /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::CKDWORD. /// Type: LibCmo::CK2::CK_ID. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMesh_GetMaterialSlot", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMesh_GetMaterialSlot([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [In, MarshalAs(UnmanagedType.U4)] uint index, [Out, MarshalAs(UnmanagedType.U4)] out uint out_mtlid); /// BMMesh_SetMaterialSlot /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::CKDWORD. /// Type: LibCmo::CK2::CK_ID. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BMMesh_SetMaterialSlot", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BMMesh_SetMaterialSlot([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [In, MarshalAs(UnmanagedType.U4)] uint index, [In, MarshalAs(UnmanagedType.U4)] uint mtlid); /// BM3dObject_GetWorldMatrix /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::VxMath::VxMatrix. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BM3dObject_GetWorldMatrix", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BM3dObject_GetWorldMatrix([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [Out, MarshalAs(UnmanagedType.Struct)] out VxMatrix out_mat); /// BM3dObject_SetWorldMatrix /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::VxMath::VxMatrix. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BM3dObject_SetWorldMatrix", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BM3dObject_SetWorldMatrix([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [In, MarshalAs(UnmanagedType.Struct)] VxMatrix mat); /// BM3dObject_GetCurrentMesh /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::CK2::CK_ID. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BM3dObject_GetCurrentMesh", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BM3dObject_GetCurrentMesh([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [Out, MarshalAs(UnmanagedType.U4)] out uint out_meshid); /// BM3dObject_SetCurrentMesh /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: LibCmo::CK2::CK_ID. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BM3dObject_SetCurrentMesh", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BM3dObject_SetCurrentMesh([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [In, MarshalAs(UnmanagedType.U4)] uint meshid); /// BM3dObject_GetVisibility /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: bool. This is OUT parameter. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BM3dObject_GetVisibility", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BM3dObject_GetVisibility([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [Out, MarshalAs(UnmanagedType.U1)] out bool out_isVisible); /// BM3dObject_SetVisibility /// Type: BMap::BMFile*. The pointer to corresponding BMFile. /// Type: LibCmo::CK2::CK_ID. The CKID of object you accessing. /// Type: bool. /// True if no error, otherwise False. [DllImport(g_DllName, EntryPoint = "BM3dObject_SetVisibility", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] internal static extern bool BM3dObject_SetVisibility([In, MarshalAs(UnmanagedType.SysInt)] IntPtr bmfile, [In, MarshalAs(UnmanagedType.U4)] uint objid, [In, MarshalAs(UnmanagedType.U1)] bool is_visible); // ##### GENERATED FUNCTIONS END ##### #endregion } }