diff --git a/port/Assimp.NET/Assimp.NET/Animation.cpp b/port/Assimp.NET/Assimp.NET/Animation.cpp index d43d9bc02..cf0a10213 100644 --- a/port/Assimp.NET/Assimp.NET/Animation.cpp +++ b/port/Assimp.NET/Assimp.NET/Animation.cpp @@ -6,12 +6,23 @@ namespace AssimpNET Animation::Animation(void) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiAnimation(); +} + +Animation::Animation(aiAnimation* native) +{ + this->p_native = native; } Animation::~Animation(void) { - throw gcnew System::NotImplementedException(); -} + if(this->p_native) + delete this->p_native; +} + +aiAnimation* Animation::getNative() +{ + return this->p_native; +} }//namespace \ No newline at end of file diff --git a/port/Assimp.NET/Assimp.NET/Animation.h b/port/Assimp.NET/Assimp.NET/Animation.h index 9cb09eea2..f9339e6f5 100644 --- a/port/Assimp.NET/Assimp.NET/Animation.h +++ b/port/Assimp.NET/Assimp.NET/Animation.h @@ -41,8 +41,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #pragma once +//managed includes #include "NodeAnim.h" +//native includes +#include "aiAnim.h" + using namespace System; namespace AssimpNET @@ -51,6 +55,7 @@ namespace AssimpNET { public: Animation(void); + Animation(aiAnimation* native); ~Animation(void); property array^ mAnimChannels @@ -78,6 +83,10 @@ namespace AssimpNET String^ get(){throw gcnew System::NotImplementedException();} void set(String^ value){throw gcnew System::NotImplementedException();} } + + aiAnimation* getNative(); + private: + aiAnimation *p_native; }; }//namespace diff --git a/port/Assimp.NET/Assimp.NET/Assimp.NET.vcproj b/port/Assimp.NET/Assimp.NET/Assimp.NET.vcproj index eafeadd5d..058c26f0f 100644 --- a/port/Assimp.NET/Assimp.NET/Assimp.NET.vcproj +++ b/port/Assimp.NET/Assimp.NET/Assimp.NET.vcproj @@ -42,6 +42,7 @@ - - @@ -331,26 +329,10 @@ RelativePath=".\Importer.h" > - - - - - - - - @@ -367,10 +349,30 @@ RelativePath=".\Matrix4x4.h" > + + + + + + + + + + diff --git a/port/Assimp.NET/Assimp.NET/Bone.cpp b/port/Assimp.NET/Assimp.NET/Bone.cpp index 15d592269..c4d809dd2 100644 --- a/port/Assimp.NET/Assimp.NET/Bone.cpp +++ b/port/Assimp.NET/Assimp.NET/Bone.cpp @@ -7,17 +7,28 @@ namespace AssimpNET Bone::Bone(void) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiBone(); } -Bone::Bone(const Bone^ other) +Bone::Bone(Bone% other) { - throw gcnew System::NotImplementedException(); + this->p_native = other.getNative(); +} + +Bone::Bone(aiBone* native) +{ + this->p_native = native; } Bone::~Bone(void) { - throw gcnew System::NotImplementedException(); + if(this->p_native) + delete this->p_native; +} + +aiBone* Bone::getNative() +{ + return this->p_native; } }//namespace \ No newline at end of file diff --git a/port/Assimp.NET/Assimp.NET/Bone.h b/port/Assimp.NET/Assimp.NET/Bone.h index 890b04178..882d34076 100644 --- a/port/Assimp.NET/Assimp.NET/Bone.h +++ b/port/Assimp.NET/Assimp.NET/Bone.h @@ -41,9 +41,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #pragma once +//managed includes #include "Matrix4x4.h" #include "VertexWeight.h" + +//native includes +#include "aiMesh.h" + using namespace System; namespace AssimpNET @@ -52,7 +57,8 @@ namespace AssimpNET { public: Bone(void); - Bone(const Bone^ other); + Bone(Bone% other); + Bone(aiBone* native); ~Bone(void); property String^ mName @@ -75,5 +81,9 @@ namespace AssimpNET array^ get(){throw gcnew System::NotImplementedException();} void set(array^ value){throw gcnew System::NotImplementedException();} } + + aiBone* getNative(); + private: + aiBone *p_native; }; }//namespace \ No newline at end of file diff --git a/port/Assimp.NET/Assimp.NET/Camera.cpp b/port/Assimp.NET/Assimp.NET/Camera.cpp index 3d9dcc345..b0c4428ba 100644 --- a/port/Assimp.NET/Assimp.NET/Camera.cpp +++ b/port/Assimp.NET/Assimp.NET/Camera.cpp @@ -6,12 +6,18 @@ namespace AssimpNET Camera::Camera(void) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiCamera(); +} + +Camera::Camera(aiCamera* native) +{ + this->p_native = native; } Camera::~Camera(void) { - throw gcnew System::NotImplementedException(); + if(this->p_native) + delete this->p_native; } void Camera::GetCameraMatrix(Matrix4x4^ out) @@ -19,4 +25,9 @@ void Camera::GetCameraMatrix(Matrix4x4^ out) throw gcnew System::NotImplementedException(); } +aiCamera* Camera::getNative() +{ + return this->p_native; +} + }//namespace \ No newline at end of file diff --git a/port/Assimp.NET/Assimp.NET/Camera.h b/port/Assimp.NET/Assimp.NET/Camera.h index f026af048..d5ba6e018 100644 --- a/port/Assimp.NET/Assimp.NET/Camera.h +++ b/port/Assimp.NET/Assimp.NET/Camera.h @@ -41,9 +41,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #pragma once +//managed includes #include "Matrix4x4.h" #include "Vector3D.h" +//native includes +#include "aiCamera.h" + using namespace System; namespace AssimpNET @@ -52,6 +56,7 @@ namespace AssimpNET { public: Camera(void); + Camera(aiCamera* native); ~Camera(void); void GetCameraMatrix(Matrix4x4^ out); @@ -99,5 +104,9 @@ namespace AssimpNET void set(String^ value){throw gcnew System::NotImplementedException();} } + aiCamera* getNative(); + private: + aiCamera *p_native; + }; }//namespace \ No newline at end of file diff --git a/port/Assimp.NET/Assimp.NET/Color3D.cpp b/port/Assimp.NET/Assimp.NET/Color3D.cpp index c47b5ed7b..2715a2096 100644 --- a/port/Assimp.NET/Assimp.NET/Color3D.cpp +++ b/port/Assimp.NET/Assimp.NET/Color3D.cpp @@ -6,17 +6,22 @@ namespace AssimpNET Color3D::Color3D(void) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiColor3D(); } -Color3D::Color3D(const Color3D^ other) +Color3D::Color3D(Color3D% other) { - throw gcnew System::NotImplementedException(); + this->p_native = other.getNative(); } Color3D::Color3D(float _r, float _g, float _b) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiColor3D(_r, _g, _b); +} + +Color3D::Color3D(aiColor3D* native) +{ + this->p_native = native; } bool Color3D::IsBlack() @@ -59,4 +64,9 @@ float^ Color3D::operator[] (unsigned int i) throw gcnew System::NotImplementedException(); } +aiColor3D* Color3D::getNative() +{ + return this->p_native; +} + } diff --git a/port/Assimp.NET/Assimp.NET/Color3D.h b/port/Assimp.NET/Assimp.NET/Color3D.h index ee1afc4d0..460a7b161 100644 --- a/port/Assimp.NET/Assimp.NET/Color3D.h +++ b/port/Assimp.NET/Assimp.NET/Color3D.h @@ -1,5 +1,8 @@ #pragma once +//native includes +#include "aiTypes.h" + using namespace System; namespace AssimpNET @@ -8,8 +11,9 @@ namespace AssimpNET { public: Color3D(void); - Color3D(const Color3D^ other); + Color3D(Color3D% other); Color3D(float _r, float _g, float _b); + Color3D(aiColor3D* native); bool IsBlack(); bool operator != (const Color3D^ other); @@ -39,6 +43,10 @@ namespace AssimpNET void set(float value){throw gcnew System::NotImplementedException();} } + aiColor3D* getNative(); + private: + aiColor3D *p_native; + }; } diff --git a/port/Assimp.NET/Assimp.NET/Color4D.cpp b/port/Assimp.NET/Assimp.NET/Color4D.cpp index 758b4ba09..520cfc30f 100644 --- a/port/Assimp.NET/Assimp.NET/Color4D.cpp +++ b/port/Assimp.NET/Assimp.NET/Color4D.cpp @@ -6,17 +6,22 @@ namespace AssimpNET Color4D::Color4D(void) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiColor4D(); } -Color4D::Color4D(const Color4D^ other) +Color4D::Color4D(Color4D% other) { - throw gcnew System::NotImplementedException(); + this->p_native = other.getNative(); } Color4D::Color4D(float _r, float _g, float _b, float _a) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiColor4D(_r, _g, _b, _a); +} + +Color4D::Color4D(aiColor4D *native) +{ + this->p_native = native; } bool Color4D::IsBlack() @@ -39,4 +44,9 @@ float Color4D::operator[] (unsigned int i) throw gcnew System::NotImplementedException(); } +aiColor4D* Color4D::getNative() +{ + return this->p_native; +} + }//namespace \ No newline at end of file diff --git a/port/Assimp.NET/Assimp.NET/Color4D.h b/port/Assimp.NET/Assimp.NET/Color4D.h index 58a70d7ac..d96fffd17 100644 --- a/port/Assimp.NET/Assimp.NET/Color4D.h +++ b/port/Assimp.NET/Assimp.NET/Color4D.h @@ -1,5 +1,8 @@ #pragma once +//native includes +#include "aiTypes.h" + using namespace System; namespace AssimpNET @@ -9,8 +12,9 @@ namespace AssimpNET { public: Color4D(void); - Color4D (const Color4D^ other); + Color4D (Color4D% other); Color4D (float _r, float _g, float _b, float _a); + Color4D (aiColor4D* native); bool IsBlack (); bool operator!= (const Color4D^ other); @@ -42,6 +46,9 @@ namespace AssimpNET void set(float value){throw gcnew System::NotImplementedException();} } + aiColor4D* getNative(); + private: + aiColor4D *p_native; }; diff --git a/port/Assimp.NET/Assimp.NET/DefaultLogger.cpp b/port/Assimp.NET/Assimp.NET/DefaultLogger.cpp index b0fd2136d..83501fe5a 100644 --- a/port/Assimp.NET/Assimp.NET/DefaultLogger.cpp +++ b/port/Assimp.NET/Assimp.NET/DefaultLogger.cpp @@ -1,52 +1,62 @@ -#include "DefaultLogger.h" +#include "mDefaultLogger.h" namespace AssimpNET { -DefaultLogger::DefaultLogger(void) +AssimpNET::DefaultLogger::DefaultLogger(void) { throw gcnew System::NotImplementedException(); } -DefaultLogger::~DefaultLogger(void) +AssimpNET::DefaultLogger::DefaultLogger(Assimp::DefaultLogger* native) +{ + this->p_native = native; +} + +AssimpNET::DefaultLogger::~DefaultLogger(void) { throw gcnew System::NotImplementedException(); } -bool DefaultLogger::attachStream(LogStream^ stream, unsigned int severity) +bool AssimpNET::DefaultLogger::attachStream(LogStream^ stream, unsigned int severity) { throw gcnew System::NotImplementedException(); } -bool DefaultLogger::detachStream(LogStream^ stream, unsigned int severity) +bool AssimpNET::DefaultLogger::detachStream(LogStream^ stream, unsigned int severity) { throw gcnew System::NotImplementedException(); } -Logger^ DefaultLogger::create(const String^ name, LogSeverity severity, unsigned int defStream, IOSystem^ io) +Logger^ AssimpNET::DefaultLogger::create(const String^ name, LogSeverity severity, unsigned int defStream, IOSystem^ io) { throw gcnew System::NotImplementedException(); } -Logger^ DefaultLogger::get() +Logger^ AssimpNET::DefaultLogger::get() { throw gcnew System::NotImplementedException(); } -bool DefaultLogger::isNullLogger() +bool AssimpNET::DefaultLogger::isNullLogger() { throw gcnew System::NotImplementedException(); } -void DefaultLogger::kill() +void AssimpNET::DefaultLogger::kill() { throw gcnew System::NotImplementedException(); } -void DefaultLogger::set(Logger^ logger) +void AssimpNET::DefaultLogger::set(Logger^ logger) { throw gcnew System::NotImplementedException(); } +Assimp::DefaultLogger* AssimpNET::DefaultLogger::getNative() +{ + return this->p_native; +} + }//namespace \ No newline at end of file diff --git a/port/Assimp.NET/Assimp.NET/Face.cpp b/port/Assimp.NET/Assimp.NET/Face.cpp index 7476f6f00..5fe988d74 100644 --- a/port/Assimp.NET/Assimp.NET/Face.cpp +++ b/port/Assimp.NET/Assimp.NET/Face.cpp @@ -6,17 +6,23 @@ namespace AssimpNET Face::Face(void) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiFace(); } -Face::Face(const Face^ other) +Face::Face(Face% other) { - throw gcnew System::NotImplementedException(); + this->p_native = other.getNative(); +} + +Face::Face(aiFace* native) +{ + this->p_native = native; } Face::~Face(void) { - throw gcnew System::NotImplementedException(); + if(this->p_native) + delete this->p_native; } bool Face::operator != (const Face^ other) @@ -34,5 +40,10 @@ bool Face::operator == (const Face^ other) throw gcnew System::NotImplementedException(); } +aiFace* Face::getNative() +{ + return this->p_native; +} + }//namespace \ No newline at end of file diff --git a/port/Assimp.NET/Assimp.NET/Face.h b/port/Assimp.NET/Assimp.NET/Face.h index 7dd7aa06b..0d46bd286 100644 --- a/port/Assimp.NET/Assimp.NET/Face.h +++ b/port/Assimp.NET/Assimp.NET/Face.h @@ -41,13 +41,17 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #pragma once +//native includes +#include "aiMesh.h" + namespace AssimpNET { public ref class Face { public: Face(void); - Face(const Face^ other); + Face(Face% other); + Face(aiFace* native); ~Face(void); bool operator != (const Face^ other); @@ -65,5 +69,9 @@ namespace AssimpNET unsigned int get(){throw gcnew System::NotImplementedException();} void set(unsigned int value){throw gcnew System::NotImplementedException();} } + + aiFace* getNative(); + private: + aiFace *p_native; }; }//namespace \ No newline at end of file diff --git a/port/Assimp.NET/Assimp.NET/IOStream.cpp b/port/Assimp.NET/Assimp.NET/IOStream.cpp index e65931f34..66dad4a08 100644 --- a/port/Assimp.NET/Assimp.NET/IOStream.cpp +++ b/port/Assimp.NET/Assimp.NET/IOStream.cpp @@ -1,5 +1,5 @@ -#include "IOStream.h" +#include "mIOStream.h" namespace AssimpNET { diff --git a/port/Assimp.NET/Assimp.NET/IOSystem.cpp b/port/Assimp.NET/Assimp.NET/IOSystem.cpp index 9b685c713..69a148d17 100644 --- a/port/Assimp.NET/Assimp.NET/IOSystem.cpp +++ b/port/Assimp.NET/Assimp.NET/IOSystem.cpp @@ -1,5 +1,5 @@ -#include "IOSystem.h" +#include "mIOSystem.h" namespace AssimpNET { @@ -9,9 +9,15 @@ IOSystem::IOSystem(void) throw gcnew System::NotImplementedException(); } +IOSystem::IOSystem(Assimp::IOSystem* native) +{ + this->p_native = native; +} + IOSystem::~IOSystem(void) { - throw gcnew System::NotImplementedException(); + if(this->p_native) + delete this->p_native; } bool IOSystem::ComparePaths (const String^ one, const String^ second) @@ -34,4 +40,9 @@ IOStream^ IOSystem::Open(const String^ pFile, const String^ pMode) throw gcnew System::NotImplementedException(); } +Assimp::IOSystem* IOSystem::getNative() +{ + return this->p_native; +} + }//namespace \ No newline at end of file diff --git a/port/Assimp.NET/Assimp.NET/Importer.cpp b/port/Assimp.NET/Assimp.NET/Importer.cpp index 492c1b689..9d48048cc 100644 --- a/port/Assimp.NET/Assimp.NET/Importer.cpp +++ b/port/Assimp.NET/Assimp.NET/Importer.cpp @@ -6,27 +6,33 @@ namespace AssimpNET Importer::Importer(void) { - throw gcnew System::NotImplementedException(); + p_native = new Assimp::Importer(); } -Importer::Importer(const Importer^ other) +Importer::Importer(Importer% other) { - throw gcnew System::NotImplementedException(); + p_native = other.getNative(); +} + +Importer::Importer(Assimp::Importer* native) +{ + this->p_native = native; } Importer::~Importer(void) { - throw gcnew System::NotImplementedException(); + if(this->p_native) + delete this->p_native; } void Importer::FreeScene() { - throw gcnew System::NotImplementedException(); + p_native->FreeScene(); } -array^ Importer::GetErrorString() +System::String^ Importer::GetErrorString() { - throw gcnew System::NotImplementedException(); + return gcnew System::String(p_native->GetErrorString()); } void Importer::GetExtensionsList(String^ extensions) @@ -49,19 +55,22 @@ Scene^ Importer::getOrphanedScene( ) throw gcnew System::NotImplementedException(); } -float Importer::GetPropertyFloat(array^ propName) +float Importer::GetPropertyFloat(String^ propName) { throw gcnew System::NotImplementedException(); + //return p_native->GetPropertyFloat(propName->ToCharArray()); } -int Importer::GetPropertyInt(array^ propName) +int Importer::GetPropertyInt(String^ propName) { throw gcnew System::NotImplementedException(); + //return p_native->GetPropertyInteger((IntPtr)propName->ToCharArray()); } -String^ Importer::GetPrpertyString(array^ propName) +String^ Importer::GetPrpertyString(String^ propName) { throw gcnew System::NotImplementedException(); + //return System::String(p_native->GetPropertyString(propName->ToCharArray())); } Scene^ Importer::getScene() @@ -71,12 +80,7 @@ Scene^ Importer::getScene() bool Importer::IsDefaultIOHandler() { - throw gcnew System::NotImplementedException(); -} - -bool Importer::IsExtensionSupported(array^ extension) -{ - throw gcnew System::NotImplementedException(); + return p_native->IsDefaultIOHandler(); } bool Importer::IsExtensionSupported(String^ extension) @@ -84,11 +88,6 @@ bool Importer::IsExtensionSupported(String^ extension) throw gcnew System::NotImplementedException(); } -Scene^ Importer::ReadFile(array^ fileName, unsigned int flags) -{ - throw gcnew System::NotImplementedException(); -} - Scene^ Importer::ReadFile(String^ fileName, unsigned int flags) { throw gcnew System::NotImplementedException(); @@ -96,7 +95,7 @@ Scene^ Importer::ReadFile(String^ fileName, unsigned int flags) void Importer::SetExtraVerbose(bool verbose) { - throw gcnew System::NotImplementedException(); + p_native->SetExtraVerbose(verbose); } void Importer::SetIOHanlder(IOSystem^ ioHandler) @@ -104,24 +103,29 @@ void Importer::SetIOHanlder(IOSystem^ ioHandler) throw gcnew System::NotImplementedException(); } -void Importer::SetPropertyFloat(array^ propName, float value) +void Importer::SetPropertyFloat(String^ propName, float value) { throw gcnew System::NotImplementedException(); } -void Importer::SetPropertyInt(array^ propName, int value) +void Importer::SetPropertyInt(String^ propName, int value) { throw gcnew System::NotImplementedException(); } -void Importer::SetPrpertyString(array^ propName, String^ value) +void Importer::SetPrpertyString(String^ propName, String^ value) { throw gcnew System::NotImplementedException(); } bool Importer::ValidateFlags(unsigned int flags) { - throw gcnew System::NotImplementedException(); + return p_native->ValidateFlags(flags); +} + +Assimp::Importer* Importer::getNative() +{ + return this->p_native; } diff --git a/port/Assimp.NET/Assimp.NET/Importer.h b/port/Assimp.NET/Assimp.NET/Importer.h index c6f19154b..85516dd67 100644 --- a/port/Assimp.NET/Assimp.NET/Importer.h +++ b/port/Assimp.NET/Assimp.NET/Importer.h @@ -41,9 +41,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #pragma once -#include "IOSystem.h" +//managed includes +#include "mIOSystem.h" #include "Scene.h" +//native includes +#include "assimp.hpp" + using namespace System; namespace AssimpNET @@ -103,30 +107,33 @@ namespace AssimpNET { public: Importer(void); - Importer(const Importer^ other); + Importer(Importer% other); + Importer(Assimp::Importer* native); ~Importer(void); void FreeScene(); - array^ GetErrorString(); + System::String^ GetErrorString(); void GetExtensionsList(String^ extensions); IOSystem^ GetIOHandler(); void GetMemoryRequrements(aiMemoryInfo^ in); Scene^ getOrphanedScene( ); - float GetPropertyFloat(array^ propName); - int GetPropertyInt(array^ propName); - String^ GetPrpertyString(array^ propName); + float GetPropertyFloat(String^ propName); + int GetPropertyInt(String^ propName); + String^ GetPrpertyString(String^ propName); Scene^ getScene(); bool IsDefaultIOHandler(); - bool IsExtensionSupported(array^ extension); bool IsExtensionSupported(String^ extension); - Scene^ ReadFile(array^ fileName, unsigned int flags); Scene^ ReadFile(String^ fileName, unsigned int flags); void SetExtraVerbose(bool verbose); void SetIOHanlder(IOSystem^ ioHandler); - void SetPropertyFloat(array^ propName, float value); - void SetPropertyInt(array^ propName, int value); - void SetPrpertyString(array^ propName, String^ value); + void SetPropertyFloat(String^ propName, float value); + void SetPropertyInt(String^ propName, int value); + void SetPrpertyString(String^ propName, String^ value); bool ValidateFlags(unsigned int flags); - + + Assimp::Importer* getNative(); + + private: + Assimp::Importer *p_native; }; }//namespace \ No newline at end of file diff --git a/port/Assimp.NET/Assimp.NET/Light.cpp b/port/Assimp.NET/Assimp.NET/Light.cpp index 8287b7988..a54f8d30a 100644 --- a/port/Assimp.NET/Assimp.NET/Light.cpp +++ b/port/Assimp.NET/Assimp.NET/Light.cpp @@ -6,12 +6,23 @@ namespace AssimpNET Light::Light(void) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiLight(); +} + +Light::Light(aiLight* native) +{ + this->p_native = native; } Light::~Light(void) { - throw gcnew System::NotImplementedException(); + if(this->p_native) + delete this->p_native; +} + +aiLight* Light::getNative() +{ + return this->p_native; } }//namespace \ No newline at end of file diff --git a/port/Assimp.NET/Assimp.NET/Light.h b/port/Assimp.NET/Assimp.NET/Light.h index c119f0e9e..924fc5a90 100644 --- a/port/Assimp.NET/Assimp.NET/Light.h +++ b/port/Assimp.NET/Assimp.NET/Light.h @@ -41,9 +41,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #pragma once +//managed includes #include "Vector3D.h" #include "Color3D.h" +//natvie includes +#include "aiLight.h" + using namespace System; namespace AssimpNET @@ -61,6 +65,7 @@ namespace AssimpNET { public: Light(void); + Light(aiLight* native); ~Light(void); property float AngleInnerCone @@ -134,5 +139,9 @@ namespace AssimpNET LightSourceType get(){throw gcnew System::NotImplementedException();} void set(LightSourceType value){throw gcnew System::NotImplementedException();} } + + aiLight* getNative(); + private: + aiLight *p_native; }; }//namespace \ No newline at end of file diff --git a/port/Assimp.NET/Assimp.NET/LogStream.cpp b/port/Assimp.NET/Assimp.NET/LogStream.cpp index 680e21215..feb851ec5 100644 --- a/port/Assimp.NET/Assimp.NET/LogStream.cpp +++ b/port/Assimp.NET/Assimp.NET/LogStream.cpp @@ -1,5 +1,5 @@ -#include "LogStream.h" +#include "mLogStream.h" namespace AssimpNET { @@ -9,9 +9,15 @@ LogStream::LogStream(void) throw gcnew System::NotImplementedException(); } +LogStream::LogStream(Assimp::LogStream* native) +{ + this->p_native = native; +} + LogStream::~LogStream(void) { - throw gcnew System::NotImplementedException(); + if(this->p_native) + delete this->p_native; } LogStream^ LogStream::createDefaultStream(DefaulLogStreams streams, array^ name, IOSystem^ io) @@ -19,4 +25,9 @@ LogStream^ LogStream::createDefaultStream(DefaulLogStreams streams, array^ throw gcnew System::NotImplementedException(); } +Assimp::LogStream* LogStream::getNative() +{ + return this->p_native; +} + }//namespace \ No newline at end of file diff --git a/port/Assimp.NET/Assimp.NET/Logger.cpp b/port/Assimp.NET/Assimp.NET/Logger.cpp index 0a2f1cf90..f10c74428 100644 --- a/port/Assimp.NET/Assimp.NET/Logger.cpp +++ b/port/Assimp.NET/Assimp.NET/Logger.cpp @@ -1,5 +1,5 @@ -#include "Logger.h" +#include "mLogger.h" namespace AssimpNET { @@ -9,14 +9,20 @@ Logger::Logger(void) throw gcnew System::NotImplementedException(); } -Logger::Logger(LogSeverity) +Logger::Logger(LogSeverity severity) { throw gcnew System::NotImplementedException(); } +Logger::Logger(Assimp::Logger* native) +{ + this->p_native = native; +} + Logger::~Logger(void) { - throw gcnew System::NotImplementedException(); + if(this->p_native) + delete this->p_native; } void Logger::debug (const String^ message) @@ -49,4 +55,9 @@ void Logger::warn(const String^ message) throw gcnew System::NotImplementedException(); } +Assimp::Logger* Logger::getNative() +{ + return this->p_native; +} + }//namespace \ No newline at end of file diff --git a/port/Assimp.NET/Assimp.NET/Material.cpp b/port/Assimp.NET/Assimp.NET/Material.cpp index 27b878365..95e565a46 100644 --- a/port/Assimp.NET/Assimp.NET/Material.cpp +++ b/port/Assimp.NET/Assimp.NET/Material.cpp @@ -6,12 +6,18 @@ namespace AssimpNET Material::Material(void) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiMaterial(); +} + +Material::Material(aiMaterial* native) +{ + this->p_native = native; } Material::~Material(void) { - throw gcnew System::NotImplementedException(); + if(this->p_native) + delete this->p_native; } generic @@ -32,4 +38,9 @@ aiReturn Material::GetTexture(TextureType type, unsigned int index, String^ path throw gcnew System::NotImplementedException(); } +aiMaterial* Material::getNative() +{ + return this->p_native; +} + }//namespace \ No newline at end of file diff --git a/port/Assimp.NET/Assimp.NET/Material.h b/port/Assimp.NET/Assimp.NET/Material.h index 5ee133e04..dc94b9a3b 100644 --- a/port/Assimp.NET/Assimp.NET/Material.h +++ b/port/Assimp.NET/Assimp.NET/Material.h @@ -41,10 +41,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #pragma once +//managed includes #include "Enums.h" #include "MaterialProperty.h" #include "Texture.h" +//native includes +#include "aiMaterial.h" + using namespace System; namespace AssimpNET @@ -53,6 +57,7 @@ namespace AssimpNET { public: Material(void); + Material(aiMaterial* native); ~Material(void); generic @@ -82,5 +87,9 @@ namespace AssimpNET void set(array^ value){throw gcnew System::NotImplementedException();} } + aiMaterial* getNative(); + private: + aiMaterial *p_native; + }; }//namespace \ No newline at end of file diff --git a/port/Assimp.NET/Assimp.NET/MaterialProperty.cpp b/port/Assimp.NET/Assimp.NET/MaterialProperty.cpp index 4212b3c6c..2503b09ae 100644 --- a/port/Assimp.NET/Assimp.NET/MaterialProperty.cpp +++ b/port/Assimp.NET/Assimp.NET/MaterialProperty.cpp @@ -6,12 +6,23 @@ namespace AssimpNET MaterialProperty::MaterialProperty(void) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiMaterialProperty(); +} + +MaterialProperty::MaterialProperty(aiMaterialProperty* native) +{ + this->p_native = native; } MaterialProperty::~MaterialProperty(void) { - throw gcnew System::NotImplementedException(); + if(this->p_native) + delete this->p_native; +} + +aiMaterialProperty* MaterialProperty::getNative() +{ + return this->p_native; } }//namespace \ No newline at end of file diff --git a/port/Assimp.NET/Assimp.NET/MaterialProperty.h b/port/Assimp.NET/Assimp.NET/MaterialProperty.h index 0f8f13ecd..2b4db33fd 100644 --- a/port/Assimp.NET/Assimp.NET/MaterialProperty.h +++ b/port/Assimp.NET/Assimp.NET/MaterialProperty.h @@ -41,6 +41,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #pragma once +//native includes +#include "aiMaterial.h" + using namespace System; namespace AssimpNET @@ -58,6 +61,7 @@ namespace AssimpNET { public: MaterialProperty(void); + MaterialProperty(aiMaterialProperty* native); ~MaterialProperty(void); property array^ mData @@ -95,5 +99,9 @@ namespace AssimpNET PropertyTypeInfo get(){throw gcnew System::NotImplementedException();} void set(PropertyTypeInfo value){throw gcnew System::NotImplementedException();} } + + aiMaterialProperty* getNative(); + private: + aiMaterialProperty *p_native; }; }//namespace \ No newline at end of file diff --git a/port/Assimp.NET/Assimp.NET/Matrix3x3.cpp b/port/Assimp.NET/Assimp.NET/Matrix3x3.cpp index 5bc856192..bb8b9ea6e 100644 --- a/port/Assimp.NET/Assimp.NET/Matrix3x3.cpp +++ b/port/Assimp.NET/Assimp.NET/Matrix3x3.cpp @@ -6,24 +6,30 @@ namespace AssimpNET Matrix3x3::Matrix3x3(void) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiMatrix3x3; } -Matrix3x3::Matrix3x3(const Matrix4x4^ matrix) +Matrix3x3::Matrix3x3(Matrix4x4^ matrix) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiMatrix3x3(*(matrix->getNative())); } Matrix3x3::Matrix3x3( float _a1, float _a2, float _a3, float _b1, float _b2, float _b3, float _c1, float _c2, float _c3) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiMatrix3x3(_a1, _a2, _a3, _b1, _b2, _b3, _c1, _c2, _c3); +} + +Matrix3x3::Matrix3x3(aiMatrix3x3* native) +{ + this->p_native = native; } Matrix3x3::~Matrix3x3(void) { - throw gcnew System::NotImplementedException(); + if(this->p_native) + delete this->p_native; } float Matrix3x3::Determinant() @@ -86,5 +92,10 @@ Matrix3x3^ Matrix3x3::Translation(const Vector2D^ v, Matrix3x3^ out) throw gcnew System::NotImplementedException(); } +aiMatrix3x3* Matrix3x3::getNative() +{ + return this->p_native; +} + }//namespace \ No newline at end of file diff --git a/port/Assimp.NET/Assimp.NET/Matrix3x3.h b/port/Assimp.NET/Assimp.NET/Matrix3x3.h index db2d49a52..cd0239903 100644 --- a/port/Assimp.NET/Assimp.NET/Matrix3x3.h +++ b/port/Assimp.NET/Assimp.NET/Matrix3x3.h @@ -41,20 +41,26 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #pragma once +//managed includes #include "Vector3D.h" #include "Vector2D.h" #include "Matrix4x4.h" +//native includes +#include "aiVector3D.h" +#include "aiMatrix3x3.h" + namespace AssimpNET { public ref class Matrix3x3 { public: Matrix3x3(void); - Matrix3x3(const Matrix4x4^ matrix); + Matrix3x3(Matrix4x4^ matrix); Matrix3x3( float _a1, float _a2, float _a3, float _b1, float _b2, float _b3, float _c1, float _c2, float _c3); + Matrix3x3(aiMatrix3x3* native); ~Matrix3x3(void); float Determinant(); @@ -125,5 +131,9 @@ namespace AssimpNET void set(float value){throw gcnew System::NotImplementedException();} } + aiMatrix3x3* getNative(); + private: + aiMatrix3x3 *p_native; + }; }//namespace \ No newline at end of file diff --git a/port/Assimp.NET/Assimp.NET/Matrix4x4.cpp b/port/Assimp.NET/Assimp.NET/Matrix4x4.cpp index f0ab3234e..429d23057 100644 --- a/port/Assimp.NET/Assimp.NET/Matrix4x4.cpp +++ b/port/Assimp.NET/Assimp.NET/Matrix4x4.cpp @@ -6,12 +6,12 @@ namespace AssimpNET Matrix4x4::Matrix4x4(void) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiMatrix4x4(); } -Matrix4x4::Matrix4x4(const Matrix3x3 other) +Matrix4x4::Matrix4x4(Matrix3x3^ other) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiMatrix4x4(*(other->getNative())); } Matrix4x4::Matrix4x4( float _a1, float _a2, float _a3, float _a4, @@ -19,12 +19,21 @@ Matrix4x4::Matrix4x4( float _a1, float _a2, float _a3, float _a4, float _c1, float _c2, float _c3, float _c4, float _d1, float _d2, float _d3, float _d4) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiMatrix4x4( _a1, _a2, _a3, _a4, + _b1, _b2, _b3, _b4, + _c1, _c2, _c3, _c4, + _d1, _c2, _d3, _d4); +} + +Matrix4x4::Matrix4x4(aiMatrix4x4* native) +{ + this->p_native = native; } Matrix4x4::~Matrix4x4(void) { - throw gcnew System::NotImplementedException(); + if(this->p_native) + delete this->p_native; } void Matrix4x4::Decompose(Vector3D^ scaling, Quaternion^ rotation, Vector3D^ position) @@ -127,4 +136,9 @@ Matrix4x4^ Matrix4x4::Translation (const Vector3D^ v, Matrix4x4^ out) throw gcnew System::NotImplementedException(); } +aiMatrix4x4* Matrix4x4::getNative() +{ + return this->p_native; +} + }//namespace \ No newline at end of file diff --git a/port/Assimp.NET/Assimp.NET/Matrix4x4.h b/port/Assimp.NET/Assimp.NET/Matrix4x4.h index 5ec65202e..75ca99b94 100644 --- a/port/Assimp.NET/Assimp.NET/Matrix4x4.h +++ b/port/Assimp.NET/Assimp.NET/Matrix4x4.h @@ -45,7 +45,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "Vector3D.h" #include "Quaternion.h" - +//native includes +#include "aiVector3D.h" +#include "aiMatrix4x4.h" namespace AssimpNET { @@ -53,11 +55,12 @@ namespace AssimpNET { public: Matrix4x4(void); - Matrix4x4(const Matrix3x3 other); + Matrix4x4(Matrix3x3^ other); Matrix4x4( float _a1, float _a2, float _a3, float _a4, float _b1, float _b2, float _b3, float _b4, float _c1, float _c2, float _c3, float _c4, float _d1, float _d2, float _d3, float _d4); + Matrix4x4(aiMatrix4x4* native); ~Matrix4x4(void); void Decompose(Vector3D^ scaling, Quaternion^ rotation, Vector3D^ position); @@ -180,5 +183,9 @@ namespace AssimpNET void set(float value){throw gcnew System::NotImplementedException();} } + aiMatrix4x4* getNative(); + private: + aiMatrix4x4 *p_native; + }; }//namespace \ No newline at end of file diff --git a/port/Assimp.NET/Assimp.NET/Mesh.cpp b/port/Assimp.NET/Assimp.NET/Mesh.cpp index b8b66b47d..3a609bf3c 100644 --- a/port/Assimp.NET/Assimp.NET/Mesh.cpp +++ b/port/Assimp.NET/Assimp.NET/Mesh.cpp @@ -6,12 +6,18 @@ namespace AssimpNET Mesh::Mesh(void) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiMesh(); +} + +Mesh::Mesh(aiMesh* native) +{ + this->p_native = native; } Mesh::~Mesh(void) { - throw gcnew System::NotImplementedException(); + if(this->p_native) + delete this->p_native; } unsigned int Mesh::GetNumColorChannels() @@ -59,4 +65,9 @@ bool Mesh::HasVertexColors() throw gcnew System::NotImplementedException(); } +aiMesh* Mesh::getNative() +{ + return this->p_native; +} + }//namespace \ No newline at end of file diff --git a/port/Assimp.NET/Assimp.NET/Mesh.h b/port/Assimp.NET/Assimp.NET/Mesh.h index 96b38e7de..60d1f342d 100644 --- a/port/Assimp.NET/Assimp.NET/Mesh.h +++ b/port/Assimp.NET/Assimp.NET/Mesh.h @@ -41,11 +41,15 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #pragma once +//managed includes #include "Vector3D.h" #include "Bone.h" #include "Color4D.h" #include "Face.h" +//native includes +#include "aiMesh.h" + using namespace System; namespace AssimpNET @@ -54,6 +58,7 @@ namespace AssimpNET { public: Mesh(void); + Mesh(aiMesh* native); ~Mesh(void); unsigned int GetNumColorChannels(); @@ -150,5 +155,9 @@ namespace AssimpNET void set(array^ value){throw gcnew System::NotImplementedException();} } + aiMesh* getNative(); + private: + aiMesh *p_native; + }; }//namespace \ No newline at end of file diff --git a/port/Assimp.NET/Assimp.NET/Node.cpp b/port/Assimp.NET/Assimp.NET/Node.cpp index eb87d37a2..b2dcaa9ab 100644 --- a/port/Assimp.NET/Assimp.NET/Node.cpp +++ b/port/Assimp.NET/Assimp.NET/Node.cpp @@ -6,12 +6,18 @@ namespace AssimpNET Node::Node(void) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiNode(); +} + +Node::Node(aiNode* native) +{ + this->p_native = native; } Node::~Node(void) { - throw gcnew System::NotImplementedException(); + if(this->p_native) + delete this->p_native; } Node^ Node::findNode(array^ name) @@ -24,4 +30,9 @@ Node^ Node::findNode(const String^ name) throw gcnew System::NotImplementedException(); } +aiNode* Node::getNative() +{ + return this->p_native; +} + }//namespace \ No newline at end of file diff --git a/port/Assimp.NET/Assimp.NET/Node.h b/port/Assimp.NET/Assimp.NET/Node.h index cf1439ccc..a51b4dc3e 100644 --- a/port/Assimp.NET/Assimp.NET/Node.h +++ b/port/Assimp.NET/Assimp.NET/Node.h @@ -41,8 +41,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #pragma once +//managed includes #include "Matrix4x4.h" +//native inclueds +#include "aiScene.h" + using namespace System; namespace AssimpNET @@ -51,6 +55,7 @@ namespace AssimpNET { public: Node(void); + Node(aiNode* native); ~Node(void); Node^ findNode(array^ name); @@ -98,5 +103,9 @@ namespace AssimpNET void set(Node^ value){throw gcnew System::NotImplementedException();} } + aiNode* getNative(); + private: + aiNode *p_native; + }; }//namespace \ No newline at end of file diff --git a/port/Assimp.NET/Assimp.NET/NodeAnim.cpp b/port/Assimp.NET/Assimp.NET/NodeAnim.cpp index cc5a049b8..e0cfd8f11 100644 --- a/port/Assimp.NET/Assimp.NET/NodeAnim.cpp +++ b/port/Assimp.NET/Assimp.NET/NodeAnim.cpp @@ -6,12 +6,23 @@ namespace AssimpNET NodeAnim::NodeAnim(void) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiNodeAnim(); +} + +NodeAnim::NodeAnim(aiNodeAnim* native) +{ + this->p_native = native; } NodeAnim::~NodeAnim(void) { - throw gcnew System::NotImplementedException(); + if(this->p_native) + delete this->p_native; +} + +aiNodeAnim* NodeAnim::getNative() +{ + return this->p_native; } }//namespace \ No newline at end of file diff --git a/port/Assimp.NET/Assimp.NET/NodeAnim.h b/port/Assimp.NET/Assimp.NET/NodeAnim.h index 8a0ae3038..60c383904 100644 --- a/port/Assimp.NET/Assimp.NET/NodeAnim.h +++ b/port/Assimp.NET/Assimp.NET/NodeAnim.h @@ -41,9 +41,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #pragma once +//managend includes #include "VectorKey.h" #include "QuatKey.h" +//native includes +#include "aiAnim.h" + using namespace System; namespace AssimpNET @@ -61,6 +65,7 @@ namespace AssimpNET { public: NodeAnim(void); + NodeAnim(aiNodeAnim* native); ~NodeAnim(void); property String^ mNodeName @@ -117,5 +122,9 @@ namespace AssimpNET void set(array^ value){throw gcnew System::NotImplementedException();} } + aiNodeAnim* getNative(); + private: + aiNodeAnim *p_native; + }; }//namespace \ No newline at end of file diff --git a/port/Assimp.NET/Assimp.NET/QuatKey.cpp b/port/Assimp.NET/Assimp.NET/QuatKey.cpp index 5214fadc0..6db361068 100644 --- a/port/Assimp.NET/Assimp.NET/QuatKey.cpp +++ b/port/Assimp.NET/Assimp.NET/QuatKey.cpp @@ -5,17 +5,23 @@ namespace AssimpNET QuatKey::QuatKey(void) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiQuatKey(); } -QuatKey::QuatKey(double time, const Quaternion^ value) +QuatKey::QuatKey(double time, Quaternion% value) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiQuatKey(time, *(value.getNative())); +} + +QuatKey::QuatKey(aiQuatKey* native) +{ + this->p_native = native; } QuatKey::~QuatKey() { - throw gcnew System::NotImplementedException(); + if(this->p_native) + delete this->p_native; } bool QuatKey::operator != (const QuatKey^ o) @@ -38,4 +44,9 @@ bool QuatKey::operator > (const QuatKey^ o) throw gcnew System::NotImplementedException(); } +aiQuatKey* QuatKey::getNative() +{ + return this->p_native; +} + } \ No newline at end of file diff --git a/port/Assimp.NET/Assimp.NET/QuatKey.h b/port/Assimp.NET/Assimp.NET/QuatKey.h index f3bb4a64b..58384b697 100644 --- a/port/Assimp.NET/Assimp.NET/QuatKey.h +++ b/port/Assimp.NET/Assimp.NET/QuatKey.h @@ -41,8 +41,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #pragma once +//managend includes #include "Quaternion.h" +//native includes +#include "aiAnim.h" + using namespace System; namespace AssimpNET @@ -51,7 +55,8 @@ namespace AssimpNET { public: QuatKey(); - QuatKey(double time, const Quaternion^ value); + QuatKey(double time, Quaternion% value); + QuatKey(aiQuatKey* native); ~QuatKey(); bool operator != (const QuatKey^ o); @@ -70,5 +75,9 @@ namespace AssimpNET Quaternion^ get() {throw gcnew System::NotImplementedException();} void set(Quaternion^ value){throw gcnew System::NotImplementedException();} } + + aiQuatKey* getNative(); + private: + aiQuatKey *p_native; }; } \ No newline at end of file diff --git a/port/Assimp.NET/Assimp.NET/Quaternion.cpp b/port/Assimp.NET/Assimp.NET/Quaternion.cpp index d369a393f..7a008226d 100644 --- a/port/Assimp.NET/Assimp.NET/Quaternion.cpp +++ b/port/Assimp.NET/Assimp.NET/Quaternion.cpp @@ -1,42 +1,49 @@ #include "Quaternion.h" +#include "Matrix3x3.h" namespace AssimpNET { Quaternion::Quaternion(void) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiQuaternion(); } Quaternion::Quaternion(Vector3D^ normalized) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiQuaternion(*(normalized->getNative())); } Quaternion::Quaternion(Vector3D^ axis, float angle) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiQuaternion(*(axis->getNative()), angle); } Quaternion::Quaternion(float rotx, float roty, float rotz) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiQuaternion(rotx, roty, rotz); } -Quaternion::Quaternion(const Matrix3x3^ rotMatrix) +Quaternion::Quaternion(Matrix3x3^ rotMatrix) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiQuaternion((*rotMatrix->getNative())); } Quaternion::Quaternion(float _w, float _x, float _y, float _z) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiQuaternion(_w, _x, _y, _z); +} + +Quaternion::Quaternion(aiQuaternion* native) +{ + this->p_native = native; } Quaternion::~Quaternion(void) { - throw gcnew System::NotImplementedException(); + if(this->p_native) + delete this->p_native; } Quaternion^ Quaternion::Conjugate() @@ -79,4 +86,9 @@ void Quaternion::Interpolate(Quaternion^ pOut, const Quaternion^ pStart, const Q throw gcnew System::NotImplementedException(); } +aiQuaternion* Quaternion::getNative() +{ + return this->p_native; +} + }//namespace \ No newline at end of file diff --git a/port/Assimp.NET/Assimp.NET/Quaternion.h b/port/Assimp.NET/Assimp.NET/Quaternion.h index d45cf1146..2d2a97d4e 100644 --- a/port/Assimp.NET/Assimp.NET/Quaternion.h +++ b/port/Assimp.NET/Assimp.NET/Quaternion.h @@ -41,9 +41,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #pragma once +//managed includes #include "Vector3D.h" -//#include "Matrix3x3.h" +//native includes +#include "aiTypes.h" +#include "aiQuaternion.h" using namespace System; @@ -59,8 +62,9 @@ namespace AssimpNET Quaternion(Vector3D^ normalized); Quaternion(Vector3D^ axis, float angle); Quaternion(float rotx, float roty, float rotz); - Quaternion(const Matrix3x3^ rotMatrix); + Quaternion(Matrix3x3^ rotMatrix); Quaternion(float _w, float _x, float _y, float _z); + Quaternion(aiQuaternion* native); ~Quaternion(void); Quaternion^ Conjugate(); @@ -97,5 +101,9 @@ namespace AssimpNET void set(float value) { throw gcnew System::NotImplementedException();} } + aiQuaternion* getNative(); + private: + aiQuaternion *p_native; + }; }//namespace \ No newline at end of file diff --git a/port/Assimp.NET/Assimp.NET/Scene.cpp b/port/Assimp.NET/Assimp.NET/Scene.cpp index 8e40e5bbd..83fb79ae4 100644 --- a/port/Assimp.NET/Assimp.NET/Scene.cpp +++ b/port/Assimp.NET/Assimp.NET/Scene.cpp @@ -6,12 +6,18 @@ namespace AssimpNET Scene::Scene(void) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiScene(); +} + +Scene::Scene(aiScene* native) +{ + this->p_native = native; } Scene::~Scene(void) { - throw gcnew System::NotImplementedException(); + if(this->p_native) + delete this->p_native; } bool Scene::HasAnimations() @@ -44,4 +50,9 @@ bool Scene::HasTextures() throw gcnew System::NotImplementedException(); } +aiScene* Scene::getNative() +{ + return this->p_native; +} + }//namespace \ No newline at end of file diff --git a/port/Assimp.NET/Assimp.NET/Scene.h b/port/Assimp.NET/Assimp.NET/Scene.h index ac926ae7f..6271c7e34 100644 --- a/port/Assimp.NET/Assimp.NET/Scene.h +++ b/port/Assimp.NET/Assimp.NET/Scene.h @@ -41,6 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #pragma once +//managend includes #include "Animation.h" #include "Camera.h" #include "Light.h" @@ -49,6 +50,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "Node.h" #include "Texture.h" +//native includes +#include "aiScene.h" + + using namespace System; namespace AssimpNET @@ -57,7 +62,9 @@ namespace AssimpNET { public: Scene(void); + Scene(aiScene* native); ~Scene(void); + bool HasAnimations(); bool HasCameras(); bool HasLights(); @@ -136,5 +143,9 @@ namespace AssimpNET void set(array^ value){throw gcnew System::NotImplementedException();} } + aiScene* getNative(); + private: + aiScene *p_native; + }; }//namespace \ No newline at end of file diff --git a/port/Assimp.NET/Assimp.NET/Texel.cpp b/port/Assimp.NET/Assimp.NET/Texel.cpp index 95e1150ea..b0a48ee23 100644 --- a/port/Assimp.NET/Assimp.NET/Texel.cpp +++ b/port/Assimp.NET/Assimp.NET/Texel.cpp @@ -6,12 +6,18 @@ namespace AssimpNET Texel::Texel(void) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiTexel(); +} + +Texel::Texel(aiTexel* native) +{ + this->p_native = native; } Texel::~Texel(void) { - throw gcnew System::NotImplementedException(); + if(this->p_native) + delete this->p_native; } Texel::operator Color4D() @@ -29,4 +35,9 @@ bool Texel::operator == (const Texel^ t) throw gcnew System::NotImplementedException(); } +aiTexel* Texel::getNative() +{ + return this->p_native; +} + } diff --git a/port/Assimp.NET/Assimp.NET/Texel.h b/port/Assimp.NET/Assimp.NET/Texel.h index 751540e75..0257694f6 100644 --- a/port/Assimp.NET/Assimp.NET/Texel.h +++ b/port/Assimp.NET/Assimp.NET/Texel.h @@ -1,7 +1,11 @@ #pragma once +//managend includes #include "Color4D.h" +//native includes +#include "aiTexture.h" + using namespace System; namespace AssimpNET @@ -11,6 +15,7 @@ public ref class Texel { public: Texel(void); + Texel(aiTexel* native); ~Texel(void); operator Color4D(); @@ -40,6 +45,10 @@ public ref class Texel unsigned char get(){throw gcnew System::NotImplementedException();} void set(unsigned char value){throw gcnew System::NotImplementedException();} } + + aiTexel* getNative(); + private: + aiTexel *p_native; }; }//namespace diff --git a/port/Assimp.NET/Assimp.NET/Texture.cpp b/port/Assimp.NET/Assimp.NET/Texture.cpp index daaae3f5d..02ab00f77 100644 --- a/port/Assimp.NET/Assimp.NET/Texture.cpp +++ b/port/Assimp.NET/Assimp.NET/Texture.cpp @@ -6,12 +6,18 @@ namespace AssimpNET Texture::Texture(void) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiTexture(); +} + +Texture::Texture(aiTexture* native) +{ + this->p_native = native; } Texture::~Texture(void) { - throw gcnew System::NotImplementedException(); + if(this->p_native) + delete this->p_native; } bool Texture::CheckFormat(array^ s) @@ -19,4 +25,9 @@ bool Texture::CheckFormat(array^ s) throw gcnew System::NotImplementedException(); } +aiTexture* Texture::getNative() +{ + return this->p_native; +} + }//namespace \ No newline at end of file diff --git a/port/Assimp.NET/Assimp.NET/Texture.h b/port/Assimp.NET/Assimp.NET/Texture.h index b98c35d21..03da8d841 100644 --- a/port/Assimp.NET/Assimp.NET/Texture.h +++ b/port/Assimp.NET/Assimp.NET/Texture.h @@ -41,8 +41,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #pragma once +//managend includes #include "Texel.h" +//native includs +#include "aiTexture.h" + using namespace System; namespace AssimpNET @@ -97,6 +101,7 @@ namespace AssimpNET { public: Texture(void); + Texture(aiTexture* native); ~Texture(void); bool CheckFormat(array^ s); @@ -120,5 +125,9 @@ namespace AssimpNET } property Texel^ pcData; + + aiTexture* getNative(); + private: + aiTexture *p_native; }; }//namespace \ No newline at end of file diff --git a/port/Assimp.NET/Assimp.NET/Vector2D.cpp b/port/Assimp.NET/Assimp.NET/Vector2D.cpp index ca4012707..30c9fa189 100644 --- a/port/Assimp.NET/Assimp.NET/Vector2D.cpp +++ b/port/Assimp.NET/Assimp.NET/Vector2D.cpp @@ -6,27 +6,33 @@ namespace AssimpNET Vector2D::Vector2D(void) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiVector2D(); } -Vector2D::Vector2D(const Vector2D^ o) +Vector2D::Vector2D(Vector2D% o) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiVector2D(*(o.getNative())); } Vector2D::Vector2D(float _xy) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiVector2D(_xy); } Vector2D::Vector2D(float _x, float _y) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiVector2D(_x, _y); +} + +Vector2D::Vector2D(aiVector2D* native) +{ + this->p_native = native; } Vector2D::~Vector2D(void) { - throw gcnew System::NotImplementedException(); + if(this->p_native) + delete this->p_native; } float Vector2D::Length() @@ -94,5 +100,10 @@ Vector2D^ Vector2D::SymMul(const Vector2D^ o) throw gcnew System::NotImplementedException(); } +aiVector2D* Vector2D::getNative() +{ + return this->p_native; +} + } \ No newline at end of file diff --git a/port/Assimp.NET/Assimp.NET/Vector2D.h b/port/Assimp.NET/Assimp.NET/Vector2D.h index 334f40e4f..d73ef9f30 100644 --- a/port/Assimp.NET/Assimp.NET/Vector2D.h +++ b/port/Assimp.NET/Assimp.NET/Vector2D.h @@ -41,6 +41,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #pragma once +//native includes +#include "aiTypes.h" namespace AssimpNET { @@ -49,9 +51,10 @@ namespace AssimpNET { public: Vector2D(void); - Vector2D(const Vector2D^ o); + Vector2D(Vector2D% o); Vector2D(float _xy); Vector2D(float _x, float _y); + Vector2D(aiVector2D* native); ~Vector2D(void); float Length(); Vector2D^ Normalize(); @@ -78,6 +81,10 @@ namespace AssimpNET float get(){throw gcnew System::NotImplementedException();} void set(float value){throw gcnew System::NotImplementedException();} } + + aiVector2D* getNative(); + private: + aiVector2D *p_native; }; }//namespace diff --git a/port/Assimp.NET/Assimp.NET/Vector3D.cpp b/port/Assimp.NET/Assimp.NET/Vector3D.cpp index ba9c6f1e5..ad0be509f 100644 --- a/port/Assimp.NET/Assimp.NET/Vector3D.cpp +++ b/port/Assimp.NET/Assimp.NET/Vector3D.cpp @@ -6,27 +6,33 @@ namespace AssimpNET Vector3D::Vector3D(void) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiVector3D(); } -Vector3D::Vector3D(const Vector3D^ o) +Vector3D::Vector3D(Vector3D% o) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiVector3D(*(o.getNative())); } Vector3D::Vector3D(float _xyz) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiVector3D(_xyz); } Vector3D::Vector3D(float _x, float _y, float _z) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiVector3D(_x, _y, _z); +} + +Vector3D::Vector3D(aiVector3D* native) +{ + this->p_native = native; } Vector3D::~Vector3D(void) { - throw gcnew System::NotImplementedException(); + if(this->p_native) + delete this->p_native; } float Vector3D::Length() @@ -99,4 +105,9 @@ Vector3D^ Vector3D::SymMul(const Vector3D^ o) throw gcnew System::NotImplementedException(); } +aiVector3D* Vector3D::getNative() +{ + return this->p_native; +} + } \ No newline at end of file diff --git a/port/Assimp.NET/Assimp.NET/Vector3D.h b/port/Assimp.NET/Assimp.NET/Vector3D.h index 805101206..c36b93ece 100644 --- a/port/Assimp.NET/Assimp.NET/Vector3D.h +++ b/port/Assimp.NET/Assimp.NET/Vector3D.h @@ -41,8 +41,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #pragma once - -//#include "Matrix4x4.h" +//native includes +#include "aiTypes.h" using namespace System; @@ -54,9 +54,10 @@ namespace AssimpNET { public: Vector3D(void); - Vector3D(const Vector3D^ o); + Vector3D(Vector3D% o); Vector3D(float _xyz); Vector3D(float _x, float _y, float _z); + Vector3D(aiVector3D* native); ~Vector3D(void); float Length(); Vector3D^ Normalize(); @@ -91,7 +92,9 @@ namespace AssimpNET void set(float value){throw gcnew System::NotImplementedException();} } - + aiVector3D* getNative(); + private: + aiVector3D *p_native; }; }//namespace diff --git a/port/Assimp.NET/Assimp.NET/VectorKey.cpp b/port/Assimp.NET/Assimp.NET/VectorKey.cpp index d37e649c9..3d17608c3 100644 --- a/port/Assimp.NET/Assimp.NET/VectorKey.cpp +++ b/port/Assimp.NET/Assimp.NET/VectorKey.cpp @@ -6,17 +6,23 @@ namespace AssimpNET VectorKey::VectorKey(void) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiVectorKey(); } -VectorKey::VectorKey(double time, const Vector3D^ value) +VectorKey::VectorKey(double time, Vector3D^ value) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiVectorKey(time, *(value->getNative())); +} + +VectorKey::VectorKey(aiVectorKey* native) +{ + this->p_native = native; } VectorKey::~VectorKey(void) { - throw gcnew System::NotImplementedException(); + if(this->p_native) + delete this->p_native; } bool VectorKey::operator != (const VectorKey^ o) @@ -39,4 +45,9 @@ bool VectorKey::operator > (const VectorKey^ o) throw gcnew System::NotImplementedException(); } +aiVectorKey* VectorKey::getNative() +{ + return this->p_native; +} + } diff --git a/port/Assimp.NET/Assimp.NET/VectorKey.h b/port/Assimp.NET/Assimp.NET/VectorKey.h index 8cb450685..25852d046 100644 --- a/port/Assimp.NET/Assimp.NET/VectorKey.h +++ b/port/Assimp.NET/Assimp.NET/VectorKey.h @@ -41,8 +41,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #pragma once +//managend includes #include "Vector3D.h" +//native includes +#include "aiAnim.h" + using namespace System; namespace AssimpNET @@ -52,7 +56,8 @@ namespace AssimpNET { public: VectorKey(); - VectorKey(double time, const Vector3D^ value); + VectorKey(double time, Vector3D^ value); + VectorKey(aiVectorKey* native); ~VectorKey(void); bool operator != (const VectorKey^ o); @@ -71,5 +76,9 @@ namespace AssimpNET Vector3D^ get() {throw gcnew System::NotImplementedException();} void set(Vector3D^ value){throw gcnew System::NotImplementedException();} } + + aiVectorKey* getNative(); + private: + aiVectorKey *p_native; }; } \ No newline at end of file diff --git a/port/Assimp.NET/Assimp.NET/VertexWeight.cpp b/port/Assimp.NET/Assimp.NET/VertexWeight.cpp index 37b87e076..588590179 100644 --- a/port/Assimp.NET/Assimp.NET/VertexWeight.cpp +++ b/port/Assimp.NET/Assimp.NET/VertexWeight.cpp @@ -6,17 +6,28 @@ namespace AssimpNET VertexWeight::VertexWeight(void) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiVertexWeight(); } VertexWeight::VertexWeight(unsigned int pID, float pWeight) { - throw gcnew System::NotImplementedException(); + this->p_native = new aiVertexWeight(pID, pWeight); +} + +VertexWeight::VertexWeight(aiVertexWeight *native) +{ + this->p_native = native; } VertexWeight::~VertexWeight(void) { - throw gcnew System::NotImplementedException(); + if(this->p_native) + delete this->p_native; +} + +aiVertexWeight* VertexWeight::getNative() +{ + return this->p_native; } }//namespace diff --git a/port/Assimp.NET/Assimp.NET/VertexWeight.h b/port/Assimp.NET/Assimp.NET/VertexWeight.h index ed85db1a6..b257ca97b 100644 --- a/port/Assimp.NET/Assimp.NET/VertexWeight.h +++ b/port/Assimp.NET/Assimp.NET/VertexWeight.h @@ -42,7 +42,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #pragma once -//#include "Matrix4x4.h" +//native includes +#include "aiMesh.h" using namespace System; @@ -53,6 +54,7 @@ namespace AssimpNET public: VertexWeight(void); VertexWeight(unsigned int pID, float pWeight); + VertexWeight(aiVertexWeight* native); ~VertexWeight(void); property unsigned int mVertexId @@ -66,6 +68,10 @@ namespace AssimpNET float get(){throw gcnew System::NotImplementedException();} void set(float value){throw gcnew System::NotImplementedException();} } + + aiVertexWeight* getNative(); + private: + aiVertexWeight *p_native; }; }//namespace diff --git a/port/Assimp.NET/Assimp.NET/DefaultLogger.h b/port/Assimp.NET/Assimp.NET/mDefaultLogger.h similarity index 87% rename from port/Assimp.NET/Assimp.NET/DefaultLogger.h rename to port/Assimp.NET/Assimp.NET/mDefaultLogger.h index 73ec76e32..4d9d61dcb 100644 --- a/port/Assimp.NET/Assimp.NET/DefaultLogger.h +++ b/port/Assimp.NET/Assimp.NET/mDefaultLogger.h @@ -41,9 +41,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #pragma once -#include "Logger.h" -#include "LogStream.h" -#include "IOSystem.h" +//Managed Includes +#include "mLogger.h" +#include "mLogStream.h" +#include "mIOSystem.h" + +//native includes +#include "DefaultLogger.h" using namespace System; @@ -53,6 +57,7 @@ namespace AssimpNET { public: DefaultLogger(void); + DefaultLogger(Assimp::DefaultLogger* native); ~DefaultLogger(void); virtual bool attachStream(LogStream^ stream, unsigned int severity) override; @@ -63,5 +68,9 @@ namespace AssimpNET static bool isNullLogger(); static void kill(); static void set(Logger^ logger); + + Assimp::DefaultLogger* getNative(); + private: + Assimp::DefaultLogger* p_native; }; }//namespace \ No newline at end of file diff --git a/port/Assimp.NET/Assimp.NET/IOStream.h b/port/Assimp.NET/Assimp.NET/mIOStream.h similarity index 100% rename from port/Assimp.NET/Assimp.NET/IOStream.h rename to port/Assimp.NET/Assimp.NET/mIOStream.h diff --git a/port/Assimp.NET/Assimp.NET/IOSystem.h b/port/Assimp.NET/Assimp.NET/mIOSystem.h similarity index 89% rename from port/Assimp.NET/Assimp.NET/IOSystem.h rename to port/Assimp.NET/Assimp.NET/mIOSystem.h index 814293886..359e816d8 100644 --- a/port/Assimp.NET/Assimp.NET/IOSystem.h +++ b/port/Assimp.NET/Assimp.NET/mIOSystem.h @@ -41,7 +41,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #pragma once -#include "IOStream.h" +//managed includes +#include "mIOStream.h" + +//native includes +#include "IOSystem.h" using namespace System; @@ -51,8 +55,9 @@ namespace AssimpNET { public: IOSystem(void); + IOSystem(Assimp::IOSystem* native); virtual ~IOSystem(void); - + virtual void Close (IOStream^ pFile) = 0; bool ComparePaths (const String^ one, const String^ second); virtual bool ComparePaths (array^ one, array^ second); @@ -61,6 +66,10 @@ namespace AssimpNET virtual char getOsSeperator() = 0; IOStream^ Open(const String^ pFile, const String^ pMode); virtual IOStream^ Open(array^ pFile, array^ pMode) = 0; + + Assimp::IOSystem* getNative(); + private: + Assimp::IOSystem *p_native; }; }//namespace diff --git a/port/Assimp.NET/Assimp.NET/Logger.h b/port/Assimp.NET/Assimp.NET/mLogger.h similarity index 91% rename from port/Assimp.NET/Assimp.NET/Logger.h rename to port/Assimp.NET/Assimp.NET/mLogger.h index acaf25802..9d57198a1 100644 --- a/port/Assimp.NET/Assimp.NET/Logger.h +++ b/port/Assimp.NET/Assimp.NET/mLogger.h @@ -41,7 +41,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #pragma once -#include "LogStream.h" +//managed includes +#include "mLogStream.h" + +//native includes +#include "Logger.h" using namespace System; @@ -69,6 +73,7 @@ namespace AssimpNET protected: Logger(LogSeverity); + Logger(Assimp::Logger* native); Logger(); virtual void OnDebug(array^ message) = 0; virtual void OnError(array^ message) = 0; @@ -81,5 +86,9 @@ namespace AssimpNET void set(LogSeverity value){throw gcnew System::NotImplementedException();} } + Assimp::Logger* getNative(); + private: + Assimp::Logger *p_native; + }; }//namespace \ No newline at end of file diff --git a/workspaces/vc9/assimp.sln b/workspaces/vc9/assimp.sln index 8f930a733..fb53f1ceb 100644 --- a/workspaces/vc9/assimp.sln +++ b/workspaces/vc9/assimp.sln @@ -19,6 +19,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "assimpcmd", "assimp_cmd.vcp EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Assimp.NET", "..\..\port\Assimp.NET\Assimp.NET\Assimp.NET.vcproj", "{4922D7BD-5E7A-44DD-BC1D-7F6F0BD82894}" + ProjectSection(ProjectDependencies) = postProject + {5691E159-2D9B-407F-971F-EA5C592DC524} = {5691E159-2D9B-407F-971F-EA5C592DC524} + EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution