You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

149 regels
4.8 KiB

  1. /* ----------------------------------------------------------------------------
  2. * This file was automatically generated by SWIG (http://www.swig.org).
  3. * Version 2.0.8
  4. *
  5. * Do not make changes to this file unless you know what you are doing--modify
  6. * the SWIG interface file instead.
  7. * ----------------------------------------------------------------------------- */
  8. using System;
  9. using System.Runtime.InteropServices;
  10. public class aiQuaternion : IDisposable {
  11. private HandleRef swigCPtr;
  12. protected bool swigCMemOwn;
  13. internal aiQuaternion(IntPtr cPtr, bool cMemoryOwn) {
  14. swigCMemOwn = cMemoryOwn;
  15. swigCPtr = new HandleRef(this, cPtr);
  16. }
  17. internal static HandleRef getCPtr(aiQuaternion obj) {
  18. return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
  19. }
  20. ~aiQuaternion() {
  21. Dispose();
  22. }
  23. public virtual void Dispose() {
  24. lock(this) {
  25. if (swigCPtr.Handle != IntPtr.Zero) {
  26. if (swigCMemOwn) {
  27. swigCMemOwn = false;
  28. AssimpPINVOKE.delete_aiQuaternion(swigCPtr);
  29. }
  30. swigCPtr = new HandleRef(null, IntPtr.Zero);
  31. }
  32. GC.SuppressFinalize(this);
  33. }
  34. }
  35. public aiQuaternion() : this(AssimpPINVOKE.new_aiQuaternion__SWIG_0(), true) {
  36. }
  37. public aiQuaternion(float w, float x, float y, float z) : this(AssimpPINVOKE.new_aiQuaternion__SWIG_1(w, x, y, z), true) {
  38. }
  39. public aiQuaternion(aiMatrix3x3 pRotMatrix) : this(AssimpPINVOKE.new_aiQuaternion__SWIG_2(aiMatrix3x3.getCPtr(pRotMatrix)), true) {
  40. if (AssimpPINVOKE.SWIGPendingException.Pending) throw AssimpPINVOKE.SWIGPendingException.Retrieve();
  41. }
  42. public aiQuaternion(float rotx, float roty, float rotz) : this(AssimpPINVOKE.new_aiQuaternion__SWIG_3(rotx, roty, rotz), true) {
  43. }
  44. public aiQuaternion(aiVector3D axis, float angle) : this(AssimpPINVOKE.new_aiQuaternion__SWIG_4(aiVector3D.getCPtr(axis), angle), true) {
  45. if (AssimpPINVOKE.SWIGPendingException.Pending) throw AssimpPINVOKE.SWIGPendingException.Retrieve();
  46. }
  47. public aiQuaternion(aiVector3D normalized) : this(AssimpPINVOKE.new_aiQuaternion__SWIG_5(aiVector3D.getCPtr(normalized)), true) {
  48. if (AssimpPINVOKE.SWIGPendingException.Pending) throw AssimpPINVOKE.SWIGPendingException.Retrieve();
  49. }
  50. public aiMatrix3x3 GetMatrix() {
  51. aiMatrix3x3 ret = new aiMatrix3x3(AssimpPINVOKE.aiQuaternion_GetMatrix(swigCPtr), true);
  52. return ret;
  53. }
  54. public bool __equal__(aiQuaternion o) {
  55. bool ret = AssimpPINVOKE.aiQuaternion___equal__(swigCPtr, aiQuaternion.getCPtr(o));
  56. if (AssimpPINVOKE.SWIGPendingException.Pending) throw AssimpPINVOKE.SWIGPendingException.Retrieve();
  57. return ret;
  58. }
  59. public bool __nequal__(aiQuaternion o) {
  60. bool ret = AssimpPINVOKE.aiQuaternion___nequal__(swigCPtr, aiQuaternion.getCPtr(o));
  61. if (AssimpPINVOKE.SWIGPendingException.Pending) throw AssimpPINVOKE.SWIGPendingException.Retrieve();
  62. return ret;
  63. }
  64. public aiQuaternion Normalize() {
  65. aiQuaternion ret = new aiQuaternion(AssimpPINVOKE.aiQuaternion_Normalize(swigCPtr), false);
  66. return ret;
  67. }
  68. public aiQuaternion Conjugate() {
  69. aiQuaternion ret = new aiQuaternion(AssimpPINVOKE.aiQuaternion_Conjugate(swigCPtr), false);
  70. return ret;
  71. }
  72. public aiVector3D Rotate(aiVector3D arg0) {
  73. aiVector3D ret = new aiVector3D(AssimpPINVOKE.aiQuaternion_Rotate(swigCPtr, aiVector3D.getCPtr(arg0)), true);
  74. if (AssimpPINVOKE.SWIGPendingException.Pending) throw AssimpPINVOKE.SWIGPendingException.Retrieve();
  75. return ret;
  76. }
  77. public aiQuaternion __mul__(aiQuaternion two) {
  78. aiQuaternion ret = new aiQuaternion(AssimpPINVOKE.aiQuaternion___mul__(swigCPtr, aiQuaternion.getCPtr(two)), true);
  79. if (AssimpPINVOKE.SWIGPendingException.Pending) throw AssimpPINVOKE.SWIGPendingException.Retrieve();
  80. return ret;
  81. }
  82. public static void Interpolate(aiQuaternion pOut, aiQuaternion pStart, aiQuaternion pEnd, float pFactor) {
  83. AssimpPINVOKE.aiQuaternion_Interpolate(aiQuaternion.getCPtr(pOut), aiQuaternion.getCPtr(pStart), aiQuaternion.getCPtr(pEnd), pFactor);
  84. if (AssimpPINVOKE.SWIGPendingException.Pending) throw AssimpPINVOKE.SWIGPendingException.Retrieve();
  85. }
  86. public float w {
  87. set {
  88. AssimpPINVOKE.aiQuaternion_w_set(swigCPtr, value);
  89. }
  90. get {
  91. float ret = AssimpPINVOKE.aiQuaternion_w_get(swigCPtr);
  92. return ret;
  93. }
  94. }
  95. public float x {
  96. set {
  97. AssimpPINVOKE.aiQuaternion_x_set(swigCPtr, value);
  98. }
  99. get {
  100. float ret = AssimpPINVOKE.aiQuaternion_x_get(swigCPtr);
  101. return ret;
  102. }
  103. }
  104. public float y {
  105. set {
  106. AssimpPINVOKE.aiQuaternion_y_set(swigCPtr, value);
  107. }
  108. get {
  109. float ret = AssimpPINVOKE.aiQuaternion_y_get(swigCPtr);
  110. return ret;
  111. }
  112. }
  113. public float z {
  114. set {
  115. AssimpPINVOKE.aiQuaternion_z_set(swigCPtr, value);
  116. }
  117. get {
  118. float ret = AssimpPINVOKE.aiQuaternion_z_get(swigCPtr);
  119. return ret;
  120. }
  121. }
  122. }