/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.0 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ using System; using System.Runtime.InteropServices; public class aiQuaternion : IDisposable { private HandleRef swigCPtr; protected bool swigCMemOwn; internal aiQuaternion(IntPtr cPtr, bool cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = new HandleRef(this, cPtr); } internal static HandleRef getCPtr(aiQuaternion obj) { return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; } ~aiQuaternion() { Dispose(); } public virtual void Dispose() { lock(this) { if (swigCPtr.Handle != IntPtr.Zero) { if (swigCMemOwn) { swigCMemOwn = false; AssimpPINVOKE.delete_aiQuaternion(swigCPtr); } swigCPtr = new HandleRef(null, IntPtr.Zero); } GC.SuppressFinalize(this); } } public aiQuaternion() : this(AssimpPINVOKE.new_aiQuaternion__SWIG_0(), true) { } public aiQuaternion(float _w, float _x, float _y, float _z) : this(AssimpPINVOKE.new_aiQuaternion__SWIG_1(_w, _x, _y, _z), true) { } public aiQuaternion(aiMatrix3x3 pRotMatrix) : this(AssimpPINVOKE.new_aiQuaternion__SWIG_2(aiMatrix3x3.getCPtr(pRotMatrix)), true) { if (AssimpPINVOKE.SWIGPendingException.Pending) throw AssimpPINVOKE.SWIGPendingException.Retrieve(); } public aiQuaternion(float rotx, float roty, float rotz) : this(AssimpPINVOKE.new_aiQuaternion__SWIG_3(rotx, roty, rotz), true) { } public aiQuaternion(aiVector3D axis, float angle) : this(AssimpPINVOKE.new_aiQuaternion__SWIG_4(aiVector3D.getCPtr(axis), angle), true) { if (AssimpPINVOKE.SWIGPendingException.Pending) throw AssimpPINVOKE.SWIGPendingException.Retrieve(); } public aiQuaternion(aiVector3D normalized) : this(AssimpPINVOKE.new_aiQuaternion__SWIG_5(aiVector3D.getCPtr(normalized)), true) { if (AssimpPINVOKE.SWIGPendingException.Pending) throw AssimpPINVOKE.SWIGPendingException.Retrieve(); } public aiMatrix3x3 GetMatrix() { aiMatrix3x3 ret = new aiMatrix3x3(AssimpPINVOKE.aiQuaternion_GetMatrix(swigCPtr), true); return ret; } public bool __equal__(aiQuaternion o) { bool ret = AssimpPINVOKE.aiQuaternion___equal__(swigCPtr, aiQuaternion.getCPtr(o)); if (AssimpPINVOKE.SWIGPendingException.Pending) throw AssimpPINVOKE.SWIGPendingException.Retrieve(); return ret; } public bool __nequal__(aiQuaternion o) { bool ret = AssimpPINVOKE.aiQuaternion___nequal__(swigCPtr, aiQuaternion.getCPtr(o)); if (AssimpPINVOKE.SWIGPendingException.Pending) throw AssimpPINVOKE.SWIGPendingException.Retrieve(); return ret; } public aiQuaternion Normalize() { aiQuaternion ret = new aiQuaternion(AssimpPINVOKE.aiQuaternion_Normalize(swigCPtr), false); return ret; } public aiQuaternion Conjugate() { aiQuaternion ret = new aiQuaternion(AssimpPINVOKE.aiQuaternion_Conjugate(swigCPtr), false); return ret; } public aiVector3D Rotate(aiVector3D arg0) { aiVector3D ret = new aiVector3D(AssimpPINVOKE.aiQuaternion_Rotate(swigCPtr, aiVector3D.getCPtr(arg0)), true); if (AssimpPINVOKE.SWIGPendingException.Pending) throw AssimpPINVOKE.SWIGPendingException.Retrieve(); return ret; } public aiQuaternion __mul__(aiQuaternion two) { aiQuaternion ret = new aiQuaternion(AssimpPINVOKE.aiQuaternion___mul__(swigCPtr, aiQuaternion.getCPtr(two)), true); if (AssimpPINVOKE.SWIGPendingException.Pending) throw AssimpPINVOKE.SWIGPendingException.Retrieve(); return ret; } public static void Interpolate(aiQuaternion pOut, aiQuaternion pStart, aiQuaternion pEnd, float pFactor) { AssimpPINVOKE.aiQuaternion_Interpolate(aiQuaternion.getCPtr(pOut), aiQuaternion.getCPtr(pStart), aiQuaternion.getCPtr(pEnd), pFactor); if (AssimpPINVOKE.SWIGPendingException.Pending) throw AssimpPINVOKE.SWIGPendingException.Retrieve(); } public float w { set { AssimpPINVOKE.aiQuaternion_w_set(swigCPtr, value); } get { float ret = AssimpPINVOKE.aiQuaternion_w_get(swigCPtr); return ret; } } public float x { set { AssimpPINVOKE.aiQuaternion_x_set(swigCPtr, value); } get { float ret = AssimpPINVOKE.aiQuaternion_x_get(swigCPtr); return ret; } } public float y { set { AssimpPINVOKE.aiQuaternion_y_set(swigCPtr, value); } get { float ret = AssimpPINVOKE.aiQuaternion_y_get(swigCPtr); return ret; } } public float z { set { AssimpPINVOKE.aiQuaternion_z_set(swigCPtr, value); } get { float ret = AssimpPINVOKE.aiQuaternion_z_get(swigCPtr); return ret; } } }