From 1b73346c5b28381e6b0fa9e46ce19c9057bc3723 Mon Sep 17 00:00:00 2001 From: rave3d Date: Tue, 8 Dec 2009 17:03:33 +0000 Subject: [PATCH] implementing public properties in wrapper classes git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@510 67173fc5-114c-0410-ac8e-9d2fd5bffc1f --- port/Assimp.NET/Assimp.NET/Animation.h | 50 ++++-- port/Assimp.NET/Assimp.NET/Bone.h | 31 +++- port/Assimp.NET/Assimp.NET/Camera.h | 80 +++++++-- port/Assimp.NET/Assimp.NET/Color3D.h | 30 +++- port/Assimp.NET/Assimp.NET/Color4D.h | 40 ++++- port/Assimp.NET/Assimp.NET/Face.h | 11 +- port/Assimp.NET/Assimp.NET/Importer.h | 2 +- port/Assimp.NET/Assimp.NET/Light.h | 110 +++++++++--- port/Assimp.NET/Assimp.NET/Material.h | 20 ++- port/Assimp.NET/Assimp.NET/MaterialProperty.h | 40 ++++- port/Assimp.NET/Assimp.NET/Matrix3x3.h | 90 ++++++++-- port/Assimp.NET/Assimp.NET/Matrix4x4.h | 160 ++++++++++++++---- port/Assimp.NET/Assimp.NET/Mesh.h | 62 +++++-- port/Assimp.NET/Assimp.NET/Node.h | 10 +- port/Assimp.NET/Assimp.NET/NodeAnim.h | 10 +- port/Assimp.NET/Assimp.NET/mLogStream.h | 80 +++++++++ 16 files changed, 676 insertions(+), 150 deletions(-) create mode 100644 port/Assimp.NET/Assimp.NET/mLogStream.h diff --git a/port/Assimp.NET/Assimp.NET/Animation.h b/port/Assimp.NET/Assimp.NET/Animation.h index f9339e6f5..59e53aa6d 100644 --- a/port/Assimp.NET/Assimp.NET/Animation.h +++ b/port/Assimp.NET/Assimp.NET/Animation.h @@ -60,28 +60,58 @@ namespace AssimpNET property array^ mAnimChannels { - array^ get(){throw gcnew System::NotImplementedException();} - void set(array^ value){throw gcnew System::NotImplementedException();} + array^ get() + { + throw gcnew System::NotImplementedException(); + } + void set(array^ value) + { + throw gcnew System::NotImplementedException(); + } } property unsigned int mNumAnimChannels { - unsigned int get(){throw gcnew System::NotImplementedException();} - void set(unsigned int value){throw gcnew System::NotImplementedException();} + unsigned int get() + { + return this->p_native->mNumChannels; + } + void set(unsigned int value) + { + this->p_native->mNumChannels = value; + } } property double mDuration { - double get(){throw gcnew System::NotImplementedException();} - void set(double value){throw gcnew System::NotImplementedException();} + double get() + { + return this->p_native->mDuration; + } + void set(double value) + { + this->p_native->mDuration = value; + } } property double mTicksPerSecond { - double get(){throw gcnew System::NotImplementedException();} - void set(double value){throw gcnew System::NotImplementedException();} + double get() + { + return this->p_native->mTicksPerSecond; + } + void set(double value) + { + this->p_native->mTicksPerSecond = value; + } } property String^ mName { - String^ get(){throw gcnew System::NotImplementedException();} - void set(String^ value){throw gcnew System::NotImplementedException();} + String^ get() + { + return gcnew String(this->p_native->mName.data); + } + void set(String^ value) + { + this->p_native->mName.Set((char *) System::Runtime::InteropServices::Marshal::StringToHGlobalAnsi(value).ToPointer()); + } } aiAnimation* getNative(); diff --git a/port/Assimp.NET/Assimp.NET/Bone.h b/port/Assimp.NET/Assimp.NET/Bone.h index 882d34076..125e945ec 100644 --- a/port/Assimp.NET/Assimp.NET/Bone.h +++ b/port/Assimp.NET/Assimp.NET/Bone.h @@ -63,18 +63,37 @@ namespace AssimpNET property String^ mName { - String^ get(){throw gcnew System::NotImplementedException();} - void set(String^ value){throw gcnew System::NotImplementedException();} + String^ get() + { + return gcnew String(this->p_native->mName.data); + } + void set(String^ value) + { + throw gcnew System::NotImplementedException(); + this->p_native->mName.Set((char*)System::Runtime::InteropServices::Marshal::StringToHGlobalAnsi(value).ToPointer()); + } } property unsigned int mNumWeights { - unsigned int get(){throw gcnew System::NotImplementedException();} - void set(unsigned int value){throw gcnew System::NotImplementedException();} + unsigned int get() + { + return this->p_native->mNumWeights; + } + void set(unsigned int value) + { + this->p_native->mNumWeights = value; + } } property Matrix4x4^ mOffsetMatrix { - Matrix4x4^ get(){throw gcnew System::NotImplementedException();} - void set(Matrix4x4^ value){throw gcnew System::NotImplementedException();} + Matrix4x4^ get() + { + return gcnew Matrix4x4(&this->p_native->mOffsetMatrix); + } + void set(Matrix4x4^ value) + { + this->p_native->mOffsetMatrix = aiMatrix4x4(*value->getNative()); + } } property array^ mWeights { diff --git a/port/Assimp.NET/Assimp.NET/Camera.h b/port/Assimp.NET/Assimp.NET/Camera.h index d5ba6e018..4b6b14a23 100644 --- a/port/Assimp.NET/Assimp.NET/Camera.h +++ b/port/Assimp.NET/Assimp.NET/Camera.h @@ -63,45 +63,93 @@ namespace AssimpNET property float mAspect { - float get(){throw gcnew System::NotImplementedException();} - void set(float value){throw gcnew System::NotImplementedException();} + float get() + { + return this->p_native->mAspect; + } + void set(float value) + { + this->p_native->mAspect = value; + } } property float mNearClipPlane { - float get(){throw gcnew System::NotImplementedException();} - void set(float value){throw gcnew System::NotImplementedException();} + float get() + { + return this->p_native->mClipPlaneNear; + } + void set(float value) + { + this->p_native->mClipPlaneNear; + } } property float mFarClipPlane { - float get(){throw gcnew System::NotImplementedException();} - void set(float value){throw gcnew System::NotImplementedException();} + float get() + { + return this->p_native->mClipPlaneFar; + } + void set(float value) + { + this->p_native->mClipPlaneFar = value; + } } property float mHorizontalFOV { - float get(){throw gcnew System::NotImplementedException();} - void set(float value){throw gcnew System::NotImplementedException();} + float get() + { + return this->p_native->mHorizontalFOV; + } + void set(float value) + { + this->p_native->mHorizontalFOV = value; + } } property Vector3D^ mLookAt { - Vector3D^ get(){throw gcnew System::NotImplementedException();} - void set(Vector3D^ value){throw gcnew System::NotImplementedException();} + Vector3D^ get() + { + return gcnew Vector3D(&this->p_native->mLookAt); + } + void set(Vector3D^ value) + { + this->p_native->mLookAt = aiVector3D(*value->getNative()); + } } property Vector3D^ mPosition { - Vector3D^ get(){throw gcnew System::NotImplementedException();} - void set(Vector3D^ value){throw gcnew System::NotImplementedException();} + Vector3D^ get() + { + return gcnew Vector3D(&this->p_native->mPosition); + } + void set(Vector3D^ value) + { + this->p_native->mPosition = aiVector3D(*value->getNative()); + } } property Vector3D^ mUp { - Vector3D^ get(){throw gcnew System::NotImplementedException();} - void set(Vector3D^ value){throw gcnew System::NotImplementedException();} + Vector3D^ get() + { + return gcnew Vector3D(&this->p_native->mUp); + } + void set(Vector3D^ value) + { + this->p_native->mUp = aiVector3D(*value->getNative()); + } } property String^ mName { - String^ get(){throw gcnew System::NotImplementedException();} - void set(String^ value){throw gcnew System::NotImplementedException();} + String^ get() + { + return gcnew String(this->p_native->mName.data); + } + void set(String^ value) + { + this->p_native->mName.Set((char*)System::Runtime::InteropServices::Marshal::StringToHGlobalAnsi(value).ToPointer()); + } } aiCamera* getNative(); diff --git a/port/Assimp.NET/Assimp.NET/Color3D.h b/port/Assimp.NET/Assimp.NET/Color3D.h index 460a7b161..4eb2b1827 100644 --- a/port/Assimp.NET/Assimp.NET/Color3D.h +++ b/port/Assimp.NET/Assimp.NET/Color3D.h @@ -27,20 +27,38 @@ namespace AssimpNET property float Red { - float get(){throw gcnew System::NotImplementedException();} - void set(float value){throw gcnew System::NotImplementedException();} + float get() + { + return this->p_native->r; + } + void set(float value) + { + this->p_native->r = value; + } } property float Green { - float get(){throw gcnew System::NotImplementedException();} - void set(float value){throw gcnew System::NotImplementedException();} + float get() + { + return this->p_native->g; + } + void set(float value) + { + this->p_native->g = value; + } } property float Blue { - float get(){throw gcnew System::NotImplementedException();} - void set(float value){throw gcnew System::NotImplementedException();} + float get() + { + return this->p_native->b; + } + void set(float value) + { + this->p_native->b = value; + } } aiColor3D* getNative(); diff --git a/port/Assimp.NET/Assimp.NET/Color4D.h b/port/Assimp.NET/Assimp.NET/Color4D.h index d96fffd17..7250876fb 100644 --- a/port/Assimp.NET/Assimp.NET/Color4D.h +++ b/port/Assimp.NET/Assimp.NET/Color4D.h @@ -24,26 +24,50 @@ namespace AssimpNET property float Red { - float get(){throw gcnew System::NotImplementedException();} - void set(float value){throw gcnew System::NotImplementedException();} + float get() + { + return this->p_native->r; + } + void set(float value) + { + this->p_native->r = value; + } } property float Green { - float get(){throw gcnew System::NotImplementedException();} - void set(float value){throw gcnew System::NotImplementedException();} + float get() + { + return this->p_native->g; + } + void set(float value) + { + this->p_native->g = value; + } } property float Blue { - float get(){throw gcnew System::NotImplementedException();} - void set(float value){throw gcnew System::NotImplementedException();} + float get() + { + return this->p_native->b; + } + void set(float value) + { + this->p_native->b = value; + } } property float Alpha { - float get(){throw gcnew System::NotImplementedException();} - void set(float value){throw gcnew System::NotImplementedException();} + float get() + { + return this->p_native->a; + } + void set(float value) + { + this->p_native->a = value; + } } aiColor4D* getNative(); diff --git a/port/Assimp.NET/Assimp.NET/Face.h b/port/Assimp.NET/Assimp.NET/Face.h index 0d46bd286..fcf1cee6a 100644 --- a/port/Assimp.NET/Assimp.NET/Face.h +++ b/port/Assimp.NET/Assimp.NET/Face.h @@ -66,8 +66,15 @@ namespace AssimpNET property unsigned int mNumIndices { - unsigned int get(){throw gcnew System::NotImplementedException();} - void set(unsigned int value){throw gcnew System::NotImplementedException();} + unsigned int get() + { + return this->p_native->mNumIndices; + + } + void set(unsigned int value) + { + this->p_native->mNumIndices = value; + } } aiFace* getNative(); diff --git a/port/Assimp.NET/Assimp.NET/Importer.h b/port/Assimp.NET/Assimp.NET/Importer.h index 85516dd67..1500b68f3 100644 --- a/port/Assimp.NET/Assimp.NET/Importer.h +++ b/port/Assimp.NET/Assimp.NET/Importer.h @@ -56,7 +56,7 @@ namespace AssimpNET { property unsigned int animations { - unsigned int get() { throw gcnew System::NotImplementedException();} + unsigned int get(){throw gcnew System::NotImplementedException();} void set(unsigned int value) { throw gcnew System::NotImplementedException();} } diff --git a/port/Assimp.NET/Assimp.NET/Light.h b/port/Assimp.NET/Assimp.NET/Light.h index 924fc5a90..ae116fdf5 100644 --- a/port/Assimp.NET/Assimp.NET/Light.h +++ b/port/Assimp.NET/Assimp.NET/Light.h @@ -70,68 +70,134 @@ namespace AssimpNET property float AngleInnerCone { - float get(){throw gcnew System::NotImplementedException();} - void set(float value){throw gcnew System::NotImplementedException();} + float get() + { + return this->p_native->mAngleInnerCone; + } + void set(float value) + { + this->p_native->mAngleInnerCone = value; + } } property float AngleOuterCone { - float get(){throw gcnew System::NotImplementedException();} - void set(float value){throw gcnew System::NotImplementedException();} + float get() + { + return this->p_native->mAngleOuterCone; + } + void set(float value) + { + this->p_native->mAngleOuterCone = value; + } } property float AttenuationConstant { - float get(){throw gcnew System::NotImplementedException();} - void set(float value){throw gcnew System::NotImplementedException();} + float get() + { + return this->p_native->mAttenuationConstant; + } + void set(float value) + { + this->p_native->mAttenuationConstant = value; + } } property float AttenuationLinear { - float get(){throw gcnew System::NotImplementedException();} - void set(float value){throw gcnew System::NotImplementedException();} + float get() + { + return this->p_native->mAttenuationLinear; + } + void set(float value) + { + this->p_native->mAttenuationLinear = value; + } } property float AttenuationQuadratic { - float get(){throw gcnew System::NotImplementedException();} - void set(float value){throw gcnew System::NotImplementedException();} + float get() + { + return this->p_native->mAttenuationQuadratic; + } + void set(float value) + { + this->p_native->mAttenuationQuadratic = value; + } } property Color3D^ ColorAmbient { - Color3D^ get(){throw gcnew System::NotImplementedException();} - void set(Color3D^ value){throw gcnew System::NotImplementedException();} + Color3D^ get() + { + return gcnew Color3D(&this->p_native->mColorAmbient); + } + void set(Color3D^ value) + { + this->p_native->mColorAmbient = aiColor3D(*value->getNative()); + } } property Color3D^ ColorDiffuse { - Color3D^ get(){throw gcnew System::NotImplementedException();} - void set(Color3D^ value){throw gcnew System::NotImplementedException();} + Color3D^ get() + { + return gcnew Color3D(&this->p_native->mColorDiffuse); + } + void set(Color3D^ value) + { + this->p_native->mColorDiffuse = aiColor3D(*value->getNative()); + } } property Color3D^ ColorSpecular { - Color3D^ get(){throw gcnew System::NotImplementedException();} - void set(Color3D^ value){throw gcnew System::NotImplementedException();} + Color3D^ get() + { + return gcnew Color3D(&this->p_native->mColorSpecular); + } + void set(Color3D^ value) + { + this->p_native->mColorSpecular = aiColor3D(*value->getNative()); + } } property Vector3D^ Direction { - Vector3D^ get(){throw gcnew System::NotImplementedException();} - void set(Vector3D^ value){throw gcnew System::NotImplementedException();} + Vector3D^ get() + { + return gcnew Vector3D(&this->p_native->mDirection); + } + void set(Vector3D^ value) + { + this->p_native->mDirection = aiVector3D(*value->getNative()); + } } property Vector3D^ Position { - Vector3D^ get(){throw gcnew System::NotImplementedException();} - void set(Vector3D^ value){throw gcnew System::NotImplementedException();} + Vector3D^ get() + { + return gcnew Vector3D(&this->p_native->mPosition); + } + void set(Vector3D^ value) + { + this->p_native->mPosition = aiVector3D(*value->getNative()); + } } property String^ Name { - String^ get(){throw gcnew System::NotImplementedException();} - void set(String^ value){throw gcnew System::NotImplementedException();} + String^ get() + { + return gcnew String(this->p_native->mName.data); + } + void set(String^ value) + { + this->p_native->mName.Set((char*)System::Runtime::InteropServices::Marshal::StringToHGlobalAnsi(value).ToPointer()); + } } property LightSourceType Type diff --git a/port/Assimp.NET/Assimp.NET/Material.h b/port/Assimp.NET/Assimp.NET/Material.h index dc94b9a3b..675caaf43 100644 --- a/port/Assimp.NET/Assimp.NET/Material.h +++ b/port/Assimp.NET/Assimp.NET/Material.h @@ -71,14 +71,26 @@ namespace AssimpNET property unsigned int mNumAllocated { - unsigned int get(){throw gcnew System::NotImplementedException();} - void set(unsigned int value){throw gcnew System::NotImplementedException();} + unsigned int get() + { + return this->p_native->mNumAllocated; + } + void set(unsigned int value) + { + this->p_native->mNumAllocated = value; + } } property unsigned int mNumProperties { - unsigned int get(){throw gcnew System::NotImplementedException();} - void set(unsigned int value){throw gcnew System::NotImplementedException();} + unsigned int get() + { + return this->p_native->mNumProperties; + } + void set(unsigned int value) + { + this->p_native->mNumProperties = value; + } } property array^ mProperties diff --git a/port/Assimp.NET/Assimp.NET/MaterialProperty.h b/port/Assimp.NET/Assimp.NET/MaterialProperty.h index 2b4db33fd..c84fb2c14 100644 --- a/port/Assimp.NET/Assimp.NET/MaterialProperty.h +++ b/port/Assimp.NET/Assimp.NET/MaterialProperty.h @@ -72,26 +72,50 @@ namespace AssimpNET property unsigned int mDataLength { - unsigned int get(){throw gcnew System::NotImplementedException();} - void set(unsigned int value){throw gcnew System::NotImplementedException();} + unsigned int get() + { + return this->p_native->mDataLength; + } + void set(unsigned int value) + { + this->p_native->mDataLength = value; + } } property unsigned int mIndex { - unsigned int get(){throw gcnew System::NotImplementedException();} - void set(unsigned int value){throw gcnew System::NotImplementedException();} + unsigned int get() + { + return this->p_native->mIndex; + } + void set(unsigned int value) + { + this->p_native->mIndex = value; + } } property String^ mKey { - String^ get(){throw gcnew System::NotImplementedException();} - void set(String^ value){throw gcnew System::NotImplementedException();} + String^ get() + { + return gcnew String(this->p_native->mKey.data); + } + void set(String^ value) + { + this->p_native->mKey.Set((char*)System::Runtime::InteropServices::Marshal::StringToHGlobalAnsi(value).ToPointer()); + } } property unsigned int mSemantic { - unsigned int get(){throw gcnew System::NotImplementedException();} - void set(unsigned int value){throw gcnew System::NotImplementedException();} + unsigned int get() + { + return this->p_native->mSemantic; + } + void set(unsigned int value) + { + this->p_native->mSemantic = value; + } } property PropertyTypeInfo mType diff --git a/port/Assimp.NET/Assimp.NET/Matrix3x3.h b/port/Assimp.NET/Assimp.NET/Matrix3x3.h index cd0239903..96990308d 100644 --- a/port/Assimp.NET/Assimp.NET/Matrix3x3.h +++ b/port/Assimp.NET/Assimp.NET/Matrix3x3.h @@ -80,55 +80,109 @@ namespace AssimpNET property float a1 { - float get(){throw gcnew System::NotImplementedException();} - void set(float value){throw gcnew System::NotImplementedException();} + float get() + { + return this->p_native->a1; + } + void set(float value) + { + this->p_native->a1 = value; + } } property float a2 { - float get(){throw gcnew System::NotImplementedException();} - void set(float value){throw gcnew System::NotImplementedException();} + float get() + { + return this->p_native->a2; + } + void set(float value) + { + this->p_native->a2 = value; + } } property float a3 { - float get(){throw gcnew System::NotImplementedException();} - void set(float value){throw gcnew System::NotImplementedException();} + float get() + { + return this->p_native->a3; + } + void set(float value) + { + this->p_native->a3 = value; + } } property float b1 { - float get(){throw gcnew System::NotImplementedException();} - void set(float value){throw gcnew System::NotImplementedException();} + float get() + { + return this->p_native->b1; + } + void set(float value) + { + this->p_native->b1 = value; + } } property float b2 { - float get(){throw gcnew System::NotImplementedException();} - void set(float value){throw gcnew System::NotImplementedException();} + float get() + { + return this->p_native->b2; + } + void set(float value) + { + this->p_native->b2 = value; + } } property float b3 { - float get(){throw gcnew System::NotImplementedException();} - void set(float value){throw gcnew System::NotImplementedException();} + float get() + { + return this->p_native->b3; + } + void set(float value) + { + this->p_native->b3 = value; + } } property float c1 { - float get(){throw gcnew System::NotImplementedException();} - void set(float value){throw gcnew System::NotImplementedException();} + float get() + { + return this->p_native->c1; + } + void set(float value) + { + this->p_native->c1 = value; + } } property float c2 { - float get(){throw gcnew System::NotImplementedException();} - void set(float value){throw gcnew System::NotImplementedException();} + float get() + { + return this->p_native->c2; + } + void set(float value) + { + this->p_native->c2 = value; + } } property float c3 { - float get(){throw gcnew System::NotImplementedException();} - void set(float value){throw gcnew System::NotImplementedException();} + float get() + { + return this->p_native->c3; + } + void set(float value) + { + this->p_native->c3 = value; + } } aiMatrix3x3* getNative(); diff --git a/port/Assimp.NET/Assimp.NET/Matrix4x4.h b/port/Assimp.NET/Assimp.NET/Matrix4x4.h index 75ca99b94..6a5400ff1 100644 --- a/port/Assimp.NET/Assimp.NET/Matrix4x4.h +++ b/port/Assimp.NET/Assimp.NET/Matrix4x4.h @@ -89,98 +89,194 @@ namespace AssimpNET property float a1 { - float get(){throw gcnew System::NotImplementedException();} - void set(float value){throw gcnew System::NotImplementedException();} + float get() + { + return this->p_native->a1; + } + void set(float value) + { + this->p_native->a1 = value; + } } property float a2 { - float get(){throw gcnew System::NotImplementedException();} - void set(float value){throw gcnew System::NotImplementedException();} + float get() + { + return this->p_native->a2; + } + void set(float value) + { + this->p_native->a2 = value; + } } property float a3 { - float get(){throw gcnew System::NotImplementedException();} - void set(float value){throw gcnew System::NotImplementedException();} + float get() + { + return this->p_native->a3; + } + void set(float value) + { + this->p_native->a3 = value; + } } property float a4 { - float get(){throw gcnew System::NotImplementedException();} - void set(float value){throw gcnew System::NotImplementedException();} + float get() + { + return this->p_native->a4; + } + void set(float value) + { + this->p_native->a4 = value; + } } property float b1 { - float get(){throw gcnew System::NotImplementedException();} - void set(float value){throw gcnew System::NotImplementedException();} + float get() + { + return this->p_native->b1; + } + void set(float value) + { + this->p_native->b1 = value; + } } property float b2 { - float get(){throw gcnew System::NotImplementedException();} - void set(float value){throw gcnew System::NotImplementedException();} + float get() + { + return this->p_native->b2; + } + void set(float value) + { + this->p_native->b2 = value; + } } property float b3 { - float get(){throw gcnew System::NotImplementedException();} - void set(float value){throw gcnew System::NotImplementedException();} + float get() + { + return this->p_native->b3; + } + void set(float value) + { + this->p_native->b3 = value; + } } property float b4 { - float get(){throw gcnew System::NotImplementedException();} - void set(float value){throw gcnew System::NotImplementedException();} + float get() + { + return this->p_native->b4; + } + void set(float value) + { + this->p_native->b4 = value; + } } property float c1 { - float get(){throw gcnew System::NotImplementedException();} - void set(float value){throw gcnew System::NotImplementedException();} + float get() + { + return this->p_native->c1; + } + void set(float value) + { + this->p_native->c1 = value; + } } property float c2 { - float get(){throw gcnew System::NotImplementedException();} - void set(float value){throw gcnew System::NotImplementedException();} + float get() + { + return this->p_native->c2; + } + void set(float value) + { + this->p_native->c2 = value; + } } property float c3 { - float get(){throw gcnew System::NotImplementedException();} - void set(float value){throw gcnew System::NotImplementedException();} + float get() + { + return this->p_native->c3; + } + void set(float value) + { + this->p_native->c3 = value; + } } property float c4 { - float get(){throw gcnew System::NotImplementedException();} - void set(float value){throw gcnew System::NotImplementedException();} + float get() + { + return this->p_native->c4; + } + void set(float value) + { + this->p_native->c4 = value; + } } property float d1 { - float get(){throw gcnew System::NotImplementedException();} - void set(float value){throw gcnew System::NotImplementedException();} + float get() + { + return this->p_native->d1; + } + void set(float value) + { + this->p_native->d1 = value; + } } property float d2 { - float get(){throw gcnew System::NotImplementedException();} - void set(float value){throw gcnew System::NotImplementedException();} + float get() + { + return this->p_native->d2; + } + void set(float value) + { + this->p_native->d2 = value; + } } property float d3 { - float get(){throw gcnew System::NotImplementedException();} - void set(float value){throw gcnew System::NotImplementedException();} + float get() + { + return this->p_native->d3; + } + void set(float value) + { + this->p_native->d3 = value; + } } property float d4 { - float get(){throw gcnew System::NotImplementedException();} - void set(float value){throw gcnew System::NotImplementedException();} + float get() + { + return this->p_native->d4; + } + void set(float value) + { + this->p_native->d4 = value; + } } aiMatrix4x4* getNative(); diff --git a/port/Assimp.NET/Assimp.NET/Mesh.h b/port/Assimp.NET/Assimp.NET/Mesh.h index 60d1f342d..46c888800 100644 --- a/port/Assimp.NET/Assimp.NET/Mesh.h +++ b/port/Assimp.NET/Assimp.NET/Mesh.h @@ -97,8 +97,14 @@ namespace AssimpNET property unsigned int mMaterialIndex { - unsigned int get(){throw gcnew System::NotImplementedException();} - void set(unsigned int value){throw gcnew System::NotImplementedException();} + unsigned int get() + { + return this->p_native->mMaterialIndex; + } + void set(unsigned int value) + { + this->p_native->mMaterialIndex = value; + } } property array^ mNormals @@ -109,32 +115,62 @@ namespace AssimpNET property unsigned int mNumBones { - unsigned int get(){throw gcnew System::NotImplementedException();} - void set(unsigned int value){throw gcnew System::NotImplementedException();} + unsigned int get() + { + return this->p_native->mNumBones; + } + void set(unsigned int value) + { + this->p_native->mNumBones = value; + } } property unsigned int mNumFaces { - unsigned int get(){throw gcnew System::NotImplementedException();} - void set(unsigned int value){throw gcnew System::NotImplementedException();} + unsigned int get() + { + return this->p_native->mNumFaces; + } + void set(unsigned int value) + { + this->p_native->mNumFaces = value; + } } - property unsigned int mNumUVComponents + property array^ mNumUVComponents { - unsigned int get(){throw gcnew System::NotImplementedException();} - void set(unsigned int value){throw gcnew System::NotImplementedException();} + array^get() + { + throw gcnew System::NotImplementedException(); + } + void set(array^ value) + { + throw gcnew System::NotImplementedException(); + } } property unsigned int mNumVertices { - unsigned int get(){throw gcnew System::NotImplementedException();} - void set(unsigned int value){throw gcnew System::NotImplementedException();} + unsigned int get() + { + return this->p_native->mNumVertices; + } + void set(unsigned int value) + { + this->p_native->mNumVertices = value; + } } property unsigned int mPrimitveTypes { - unsigned int get(){throw gcnew System::NotImplementedException();} - void set(unsigned int value){throw gcnew System::NotImplementedException();} + unsigned int get() + { + return this->p_native->mPrimitiveTypes; + } + void set(unsigned int value) + { + this->p_native->mPrimitiveTypes = value; + } } property array^ mTangents diff --git a/port/Assimp.NET/Assimp.NET/Node.h b/port/Assimp.NET/Assimp.NET/Node.h index a51b4dc3e..bb5372493 100644 --- a/port/Assimp.NET/Assimp.NET/Node.h +++ b/port/Assimp.NET/Assimp.NET/Node.h @@ -75,8 +75,14 @@ namespace AssimpNET property String^ mName { - String^ get(){throw gcnew System::NotImplementedException();} - void set(String^ value){throw gcnew System::NotImplementedException();} + String^ get() + { + return gcnew String(this->p_native->mName.data); + } + void set(String^ value) + { + this->p_native->mName.Set((char*)System::Runtime::InteropServices::Marshal::StringToHGlobalAnsi(value).ToPointer()); + } } property unsigned int mNumChildren diff --git a/port/Assimp.NET/Assimp.NET/NodeAnim.h b/port/Assimp.NET/Assimp.NET/NodeAnim.h index 60c383904..b961f04a8 100644 --- a/port/Assimp.NET/Assimp.NET/NodeAnim.h +++ b/port/Assimp.NET/Assimp.NET/NodeAnim.h @@ -70,8 +70,14 @@ namespace AssimpNET property String^ mNodeName { - String^ get(){throw gcnew System::NotImplementedException();} - void set(String^ value){throw gcnew System::NotImplementedException();} + String^ get() + { + return gcnew String(this->p_native->mNodeName.data); + } + void set(String^ value) + { + this->p_native->mNodeName.Set((char*)System::Runtime::InteropServices::Marshal::StringToHGlobalAnsi(value).ToPointer()); + } } property unsigned int mNumPositionKeys diff --git a/port/Assimp.NET/Assimp.NET/mLogStream.h b/port/Assimp.NET/Assimp.NET/mLogStream.h new file mode 100644 index 000000000..7f5acc5df --- /dev/null +++ b/port/Assimp.NET/Assimp.NET/mLogStream.h @@ -0,0 +1,80 @@ +/* +--------------------------------------------------------------------------- +Open Asset Import Library (ASSIMP) +--------------------------------------------------------------------------- + +Copyright (c) 2006-2008, ASSIMP Development Team + +All rights reserved. + +Redistribution and use of this software in source and binary forms, +with or without modification, are permitted provided that the following +conditions are met: + + * Redistributions of source code must retain the above + copyright notice, this list of conditions and the + following disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the + following disclaimer in the documentation and/or other + materials provided with the distribution. + + * Neither the name of the ASSIMP team, nor the names of its + contributors may be used to endorse or promote products + derived from this software without specific prior + written permission of the ASSIMP Development Team. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--------------------------------------------------------------------------- + */ + +#pragma once + +//managned includes +#include "mIOSystem.h" + +//native includes +#include "LogStream.h" + +using namespace System; + +namespace AssimpNET +{ + + enum DefaulLogStreams + { + DLS_FILE, + DLS_COUT, + DLS_CERR, + DLS_DEBUGGER + }; + + + public ref class LogStream abstract + { + public: + virtual ~LogStream(void); + virtual void write(array^ message) = 0; + + static LogStream^ createDefaultStream(DefaulLogStreams streams, array^ name, IOSystem^ io); + + protected: + LogStream(void); + LogStream(Assimp::LogStream* native); + + Assimp::LogStream* getNative(); + private: + Assimp::LogStream *p_native; + }; +}//namespace \ No newline at end of file