From 4ad0d569f3f48f741f315414fdb807edd2487f5e Mon Sep 17 00:00:00 2001 From: rave3d Date: Fri, 6 Aug 2010 18:41:05 +0000 Subject: [PATCH] Ingnore an error producing SetProperty method on AssimpSwigPort.i git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@789 67173fc5-114c-0410-ac8e-9d2fd5bffc1f --- port/Assimp.NET/Assimp.NET/Assimp.NET.vcproj | 4 +- port/Assimp.NET/Assimp.NET/AssimpSwigPort.i | 1 + .../Assimp.NET/AssimpSwigPort_wrap.cxx | 142 +++++++++++++++--- port/Assimp.NET/Assimp.NET_CS/Assimp.cs | 5 + .../Assimp.NET/Assimp.NET_CS/AssimpPINVOKE.cs | 39 ++++- port/Assimp.NET/Assimp.NET_CS/Importer.cs | 10 ++ port/Assimp.NET/Assimp.NET_CS/aiAnimMesh.cs | 10 ++ 7 files changed, 183 insertions(+), 28 deletions(-) diff --git a/port/Assimp.NET/Assimp.NET/Assimp.NET.vcproj b/port/Assimp.NET/Assimp.NET/Assimp.NET.vcproj index 72a01aad7..20e256364 100644 --- a/port/Assimp.NET/Assimp.NET/Assimp.NET.vcproj +++ b/port/Assimp.NET/Assimp.NET/Assimp.NET.vcproj @@ -1,7 +1,7 @@ diff --git a/port/Assimp.NET/Assimp.NET/AssimpSwigPort.i b/port/Assimp.NET/Assimp.NET/AssimpSwigPort.i index 0ba7cb8f7..0ad577924 100644 --- a/port/Assimp.NET/Assimp.NET/AssimpSwigPort.i +++ b/port/Assimp.NET/Assimp.NET/AssimpSwigPort.i @@ -473,6 +473,7 @@ ASSIMP_POINTER_POINTER(aiScene,aiTexture,mTextures,$self->mNumTextures); %ignore Assimp::Importer::SetPropertyInteger; %ignore Assimp::Importer::SetPropertyFloat; %ignore Assimp::Importer::SetPropertyString; +%ignore Assimp::Importer::SetPropertyBool; %ignore Assimp::Importer::UnregisterLoader; %ignore Assimp::Importer::UnregisterPPStep; %extend Assimp::Importer { diff --git a/port/Assimp.NET/Assimp.NET/AssimpSwigPort_wrap.cxx b/port/Assimp.NET/Assimp.NET/AssimpSwigPort_wrap.cxx index 9be1e6409..f27b5e40c 100644 --- a/port/Assimp.NET/Assimp.NET/AssimpSwigPort_wrap.cxx +++ b/port/Assimp.NET/Assimp.NET/AssimpSwigPort_wrap.cxx @@ -3301,6 +3301,16 @@ SWIGEXPORT double SWIGSTDCALL CSharp_AI_MATH_HALF_PI_F_get() { } +SWIGEXPORT char * SWIGSTDCALL CSharp_AI_CONFIG_GLOB_MEASURE_TIME_get() { + char * jresult ; + char *result = 0 ; + + result = (char *)("GLOB_MEASURE_TIME"); + jresult = SWIG_csharp_string_callback((const char *)result); + return jresult; +} + + SWIGEXPORT char * SWIGSTDCALL CSharp_AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE_get() { char * jresult ; char *result = 0 ; @@ -8245,6 +8255,66 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_aiAnimation_GetmMeshChannels(void * jarg1) } +SWIGEXPORT int SWIGSTDCALL CSharp_AI_MAX_FACE_INDICES_get() { + int jresult ; + int result; + + result = (int)(0x7fff); + jresult = result; + return jresult; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_AI_MAX_BONE_WEIGHTS_get() { + int jresult ; + int result; + + result = (int)(0x7fffffff); + jresult = result; + return jresult; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_AI_MAX_VERTICES_get() { + int jresult ; + int result; + + result = (int)(0x7fffffff); + jresult = result; + return jresult; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_AI_MAX_FACES_get() { + int jresult ; + int result; + + result = (int)(0x7fffffff); + jresult = result; + return jresult; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_AI_MAX_NUMBER_OF_COLOR_SETS_get() { + int jresult ; + int result; + + result = (int)(0x4); + jresult = result; + return jresult; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_AI_MAX_NUMBER_OF_TEXTURECOORDS_get() { + int jresult ; + int result; + + result = (int)(0x4); + jresult = result; + return jresult; +} + + SWIGEXPORT void SWIGSTDCALL CSharp_aiFace_mNumIndices_set(void * jarg1, unsigned int jarg2) { aiFace *arg1 = (aiFace *) 0 ; unsigned int arg2 ; @@ -8555,26 +8625,6 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_aiBone_GetmWeights(void * jarg1) { } -SWIGEXPORT int SWIGSTDCALL CSharp_AI_MAX_NUMBER_OF_COLOR_SETS_get() { - int jresult ; - int result; - - result = (int)(0x4); - jresult = result; - return jresult; -} - - -SWIGEXPORT int SWIGSTDCALL CSharp_AI_MAX_NUMBER_OF_TEXTURECOORDS_get() { - int jresult ; - int result; - - result = (int)(0x4); - jresult = result; - return jresult; -} - - SWIGEXPORT void SWIGSTDCALL CSharp_aiAnimMesh_mBitangents_set(void * jarg1, void * jarg2) { aiAnimMesh *arg1 = (aiAnimMesh *) 0 ; aiVector3D *arg2 = (aiVector3D *) 0 ; @@ -8597,6 +8647,28 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_aiAnimMesh_mBitangents_get(void * jarg1) { } +SWIGEXPORT void SWIGSTDCALL CSharp_aiAnimMesh_mNumVertices_set(void * jarg1, unsigned int jarg2) { + aiAnimMesh *arg1 = (aiAnimMesh *) 0 ; + unsigned int arg2 ; + + arg1 = (aiAnimMesh *)jarg1; + arg2 = (unsigned int)jarg2; + if (arg1) (arg1)->mNumVertices = arg2; +} + + +SWIGEXPORT unsigned int SWIGSTDCALL CSharp_aiAnimMesh_mNumVertices_get(void * jarg1) { + unsigned int jresult ; + aiAnimMesh *arg1 = (aiAnimMesh *) 0 ; + unsigned int result; + + arg1 = (aiAnimMesh *)jarg1; + result = (unsigned int) ((arg1)->mNumVertices); + jresult = result; + return jresult; +} + + SWIGEXPORT void * SWIGSTDCALL CSharp_new_aiAnimMesh() { void * jresult ; aiAnimMesh *result = 0 ; @@ -11049,6 +11121,36 @@ SWIGEXPORT int SWIGSTDCALL CSharp_Importer_GetPropertyInteger__SWIG_1(void * jar } +SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Importer_GetPropertyBool__SWIG_0(void * jarg1, char * jarg2, unsigned int jarg3) { + unsigned int jresult ; + Assimp::Importer *arg1 = (Assimp::Importer *) 0 ; + char *arg2 = (char *) 0 ; + bool arg3 ; + bool result; + + arg1 = (Assimp::Importer *)jarg1; + arg2 = (char *)jarg2; + arg3 = jarg3 ? true : false; + result = (bool)((Assimp::Importer const *)arg1)->GetPropertyBool((char const *)arg2,arg3); + jresult = result; + return jresult; +} + + +SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Importer_GetPropertyBool__SWIG_1(void * jarg1, char * jarg2) { + unsigned int jresult ; + Assimp::Importer *arg1 = (Assimp::Importer *) 0 ; + char *arg2 = (char *) 0 ; + bool result; + + arg1 = (Assimp::Importer *)jarg1; + arg2 = (char *)jarg2; + result = (bool)((Assimp::Importer const *)arg1)->GetPropertyBool((char const *)arg2); + jresult = result; + return jresult; +} + + SWIGEXPORT float SWIGSTDCALL CSharp_Importer_GetPropertyFloat__SWIG_0(void * jarg1, char * jarg2, float jarg3) { float jresult ; Assimp::Importer *arg1 = (Assimp::Importer *) 0 ; diff --git a/port/Assimp.NET/Assimp.NET_CS/Assimp.cs b/port/Assimp.NET/Assimp.NET_CS/Assimp.cs index 6e49420d9..66851ab5d 100644 --- a/port/Assimp.NET/Assimp.NET_CS/Assimp.cs +++ b/port/Assimp.NET/Assimp.NET_CS/Assimp.cs @@ -103,6 +103,7 @@ public class Assimp { public static readonly double AI_MATH_PI_F = AssimpPINVOKE.AI_MATH_PI_F_get(); public static readonly double AI_MATH_TWO_PI_F = AssimpPINVOKE.AI_MATH_TWO_PI_F_get(); public static readonly double AI_MATH_HALF_PI_F = AssimpPINVOKE.AI_MATH_HALF_PI_F_get(); + public static readonly string AI_CONFIG_GLOB_MEASURE_TIME = AssimpPINVOKE.AI_CONFIG_GLOB_MEASURE_TIME_get(); public static readonly string AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE = AssimpPINVOKE.AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE_get(); public static readonly string AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE = AssimpPINVOKE.AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE_get(); public static readonly string AI_CONFIG_IMPORT_MDL_COLORMAP = AssimpPINVOKE.AI_CONFIG_IMPORT_MDL_COLORMAP_get(); @@ -154,6 +155,10 @@ public class Assimp { public static readonly int ASSIMP_CFLAGS_DEBUG = AssimpPINVOKE.ASSIMP_CFLAGS_DEBUG_get(); public static readonly int ASSIMP_CFLAGS_NOBOOST = AssimpPINVOKE.ASSIMP_CFLAGS_NOBOOST_get(); public static readonly int ASSIMP_CFLAGS_SINGLETHREADED = AssimpPINVOKE.ASSIMP_CFLAGS_SINGLETHREADED_get(); + public static readonly int AI_MAX_FACE_INDICES = AssimpPINVOKE.AI_MAX_FACE_INDICES_get(); + public static readonly int AI_MAX_BONE_WEIGHTS = AssimpPINVOKE.AI_MAX_BONE_WEIGHTS_get(); + public static readonly int AI_MAX_VERTICES = AssimpPINVOKE.AI_MAX_VERTICES_get(); + public static readonly int AI_MAX_FACES = AssimpPINVOKE.AI_MAX_FACES_get(); public static readonly int AI_MAX_NUMBER_OF_COLOR_SETS = AssimpPINVOKE.AI_MAX_NUMBER_OF_COLOR_SETS_get(); public static readonly int AI_MAX_NUMBER_OF_TEXTURECOORDS = AssimpPINVOKE.AI_MAX_NUMBER_OF_TEXTURECOORDS_get(); public static readonly string AI_DEFAULT_MATERIAL_NAME = AssimpPINVOKE.AI_DEFAULT_MATERIAL_NAME_get(); diff --git a/port/Assimp.NET/Assimp.NET_CS/AssimpPINVOKE.cs b/port/Assimp.NET/Assimp.NET_CS/AssimpPINVOKE.cs index ad569681f..c7d58c3ee 100644 --- a/port/Assimp.NET/Assimp.NET_CS/AssimpPINVOKE.cs +++ b/port/Assimp.NET/Assimp.NET_CS/AssimpPINVOKE.cs @@ -206,6 +206,9 @@ class AssimpPINVOKE { [DllImport("Assimp", EntryPoint="CSharp_AI_MATH_HALF_PI_F_get")] public static extern double AI_MATH_HALF_PI_F_get(); + [DllImport("Assimp", EntryPoint="CSharp_AI_CONFIG_GLOB_MEASURE_TIME_get")] + public static extern string AI_CONFIG_GLOB_MEASURE_TIME_get(); + [DllImport("Assimp", EntryPoint="CSharp_AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE_get")] public static extern string AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE_get(); @@ -1397,6 +1400,24 @@ class AssimpPINVOKE { [DllImport("Assimp", EntryPoint="CSharp_aiAnimation_GetmMeshChannels")] public static extern IntPtr aiAnimation_GetmMeshChannels(HandleRef jarg1); + [DllImport("Assimp", EntryPoint="CSharp_AI_MAX_FACE_INDICES_get")] + public static extern int AI_MAX_FACE_INDICES_get(); + + [DllImport("Assimp", EntryPoint="CSharp_AI_MAX_BONE_WEIGHTS_get")] + public static extern int AI_MAX_BONE_WEIGHTS_get(); + + [DllImport("Assimp", EntryPoint="CSharp_AI_MAX_VERTICES_get")] + public static extern int AI_MAX_VERTICES_get(); + + [DllImport("Assimp", EntryPoint="CSharp_AI_MAX_FACES_get")] + public static extern int AI_MAX_FACES_get(); + + [DllImport("Assimp", EntryPoint="CSharp_AI_MAX_NUMBER_OF_COLOR_SETS_get")] + public static extern int AI_MAX_NUMBER_OF_COLOR_SETS_get(); + + [DllImport("Assimp", EntryPoint="CSharp_AI_MAX_NUMBER_OF_TEXTURECOORDS_get")] + public static extern int AI_MAX_NUMBER_OF_TEXTURECOORDS_get(); + [DllImport("Assimp", EntryPoint="CSharp_aiFace_mNumIndices_set")] public static extern void aiFace_mNumIndices_set(HandleRef jarg1, uint jarg2); @@ -1475,18 +1496,18 @@ class AssimpPINVOKE { [DllImport("Assimp", EntryPoint="CSharp_aiBone_GetmWeights")] public static extern IntPtr aiBone_GetmWeights(HandleRef jarg1); - [DllImport("Assimp", EntryPoint="CSharp_AI_MAX_NUMBER_OF_COLOR_SETS_get")] - public static extern int AI_MAX_NUMBER_OF_COLOR_SETS_get(); - - [DllImport("Assimp", EntryPoint="CSharp_AI_MAX_NUMBER_OF_TEXTURECOORDS_get")] - public static extern int AI_MAX_NUMBER_OF_TEXTURECOORDS_get(); - [DllImport("Assimp", EntryPoint="CSharp_aiAnimMesh_mBitangents_set")] public static extern void aiAnimMesh_mBitangents_set(HandleRef jarg1, HandleRef jarg2); [DllImport("Assimp", EntryPoint="CSharp_aiAnimMesh_mBitangents_get")] public static extern IntPtr aiAnimMesh_mBitangents_get(HandleRef jarg1); + [DllImport("Assimp", EntryPoint="CSharp_aiAnimMesh_mNumVertices_set")] + public static extern void aiAnimMesh_mNumVertices_set(HandleRef jarg1, uint jarg2); + + [DllImport("Assimp", EntryPoint="CSharp_aiAnimMesh_mNumVertices_get")] + public static extern uint aiAnimMesh_mNumVertices_get(HandleRef jarg1); + [DllImport("Assimp", EntryPoint="CSharp_new_aiAnimMesh")] public static extern IntPtr new_aiAnimMesh(); @@ -2102,6 +2123,12 @@ class AssimpPINVOKE { [DllImport("Assimp", EntryPoint="CSharp_Importer_GetPropertyInteger__SWIG_1")] public static extern int Importer_GetPropertyInteger__SWIG_1(HandleRef jarg1, string jarg2); + [DllImport("Assimp", EntryPoint="CSharp_Importer_GetPropertyBool__SWIG_0")] + public static extern bool Importer_GetPropertyBool__SWIG_0(HandleRef jarg1, string jarg2, bool jarg3); + + [DllImport("Assimp", EntryPoint="CSharp_Importer_GetPropertyBool__SWIG_1")] + public static extern bool Importer_GetPropertyBool__SWIG_1(HandleRef jarg1, string jarg2); + [DllImport("Assimp", EntryPoint="CSharp_Importer_GetPropertyFloat__SWIG_0")] public static extern float Importer_GetPropertyFloat__SWIG_0(HandleRef jarg1, string jarg2, float jarg3); diff --git a/port/Assimp.NET/Assimp.NET_CS/Importer.cs b/port/Assimp.NET/Assimp.NET_CS/Importer.cs index a5efe1f44..fec51d251 100644 --- a/port/Assimp.NET/Assimp.NET_CS/Importer.cs +++ b/port/Assimp.NET/Assimp.NET_CS/Importer.cs @@ -57,6 +57,16 @@ public class Importer : IDisposable { return ret; } + public bool GetPropertyBool(string szName, bool bErrorReturn) { + bool ret = AssimpPINVOKE.Importer_GetPropertyBool__SWIG_0(swigCPtr, szName, bErrorReturn); + return ret; + } + + public bool GetPropertyBool(string szName) { + bool ret = AssimpPINVOKE.Importer_GetPropertyBool__SWIG_1(swigCPtr, szName); + return ret; + } + public float GetPropertyFloat(string szName, float fErrorReturn) { float ret = AssimpPINVOKE.Importer_GetPropertyFloat__SWIG_0(swigCPtr, szName, fErrorReturn); return ret; diff --git a/port/Assimp.NET/Assimp.NET_CS/aiAnimMesh.cs b/port/Assimp.NET/Assimp.NET_CS/aiAnimMesh.cs index 349b5d860..628f35fd0 100644 --- a/port/Assimp.NET/Assimp.NET_CS/aiAnimMesh.cs +++ b/port/Assimp.NET/Assimp.NET_CS/aiAnimMesh.cs @@ -51,6 +51,16 @@ public class aiAnimMesh : IDisposable { } } + public uint mNumVertices { + set { + AssimpPINVOKE.aiAnimMesh_mNumVertices_set(swigCPtr, value); + } + get { + uint ret = AssimpPINVOKE.aiAnimMesh_mNumVertices_get(swigCPtr); + return ret; + } + } + public aiAnimMesh() : this(AssimpPINVOKE.new_aiAnimMesh(), true) { }