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.

aiVector2D.cs 4.4 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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 aiVector2D : IDisposable {
  11. private HandleRef swigCPtr;
  12. protected bool swigCMemOwn;
  13. internal aiVector2D(IntPtr cPtr, bool cMemoryOwn) {
  14. swigCMemOwn = cMemoryOwn;
  15. swigCPtr = new HandleRef(this, cPtr);
  16. }
  17. internal static HandleRef getCPtr(aiVector2D obj) {
  18. return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
  19. }
  20. ~aiVector2D() {
  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_aiVector2D(swigCPtr);
  29. }
  30. swigCPtr = new HandleRef(null, IntPtr.Zero);
  31. }
  32. GC.SuppressFinalize(this);
  33. }
  34. }
  35. public aiVector2D() : this(AssimpPINVOKE.new_aiVector2D__SWIG_0(), true) {
  36. }
  37. public aiVector2D(float _x, float _y) : this(AssimpPINVOKE.new_aiVector2D__SWIG_1(_x, _y), true) {
  38. }
  39. public aiVector2D(float _xyz) : this(AssimpPINVOKE.new_aiVector2D__SWIG_2(_xyz), true) {
  40. }
  41. public aiVector2D(aiVector2D o) : this(AssimpPINVOKE.new_aiVector2D__SWIG_3(aiVector2D.getCPtr(o)), true) {
  42. if (AssimpPINVOKE.SWIGPendingException.Pending) throw AssimpPINVOKE.SWIGPendingException.Retrieve();
  43. }
  44. public void Set(float pX, float pY) {
  45. AssimpPINVOKE.aiVector2D_Set(swigCPtr, pX, pY);
  46. }
  47. public float SquareLength() {
  48. float ret = AssimpPINVOKE.aiVector2D_SquareLength(swigCPtr);
  49. return ret;
  50. }
  51. public float Length() {
  52. float ret = AssimpPINVOKE.aiVector2D_Length(swigCPtr);
  53. return ret;
  54. }
  55. public aiVector2D Normalize() {
  56. aiVector2D ret = new aiVector2D(AssimpPINVOKE.aiVector2D_Normalize(swigCPtr), false);
  57. return ret;
  58. }
  59. public aiVector2D __addnset__(aiVector2D o) {
  60. aiVector2D ret = new aiVector2D(AssimpPINVOKE.aiVector2D___addnset__(swigCPtr, aiVector2D.getCPtr(o)), false);
  61. if (AssimpPINVOKE.SWIGPendingException.Pending) throw AssimpPINVOKE.SWIGPendingException.Retrieve();
  62. return ret;
  63. }
  64. public aiVector2D __subnset__(aiVector2D o) {
  65. aiVector2D ret = new aiVector2D(AssimpPINVOKE.aiVector2D___subnset__(swigCPtr, aiVector2D.getCPtr(o)), false);
  66. if (AssimpPINVOKE.SWIGPendingException.Pending) throw AssimpPINVOKE.SWIGPendingException.Retrieve();
  67. return ret;
  68. }
  69. public aiVector2D __mulnset__(float f) {
  70. aiVector2D ret = new aiVector2D(AssimpPINVOKE.aiVector2D___mulnset__(swigCPtr, f), false);
  71. return ret;
  72. }
  73. public aiVector2D __divnset__(float f) {
  74. aiVector2D ret = new aiVector2D(AssimpPINVOKE.aiVector2D___divnset__(swigCPtr, f), false);
  75. return ret;
  76. }
  77. public float __idx__(uint i) {
  78. float ret = AssimpPINVOKE.aiVector2D___idx____SWIG_0(swigCPtr, i);
  79. return ret;
  80. }
  81. public bool __equal__(aiVector2D other) {
  82. bool ret = AssimpPINVOKE.aiVector2D___equal__(swigCPtr, aiVector2D.getCPtr(other));
  83. if (AssimpPINVOKE.SWIGPendingException.Pending) throw AssimpPINVOKE.SWIGPendingException.Retrieve();
  84. return ret;
  85. }
  86. public bool __nequal__(aiVector2D other) {
  87. bool ret = AssimpPINVOKE.aiVector2D___nequal__(swigCPtr, aiVector2D.getCPtr(other));
  88. if (AssimpPINVOKE.SWIGPendingException.Pending) throw AssimpPINVOKE.SWIGPendingException.Retrieve();
  89. return ret;
  90. }
  91. public aiVector2D __set__(float f) {
  92. aiVector2D ret = new aiVector2D(AssimpPINVOKE.aiVector2D___set__(swigCPtr, f), false);
  93. return ret;
  94. }
  95. public aiVector2D SymMul(aiVector2D o) {
  96. aiVector2D ret = new aiVector2D(AssimpPINVOKE.aiVector2D_SymMul(swigCPtr, aiVector2D.getCPtr(o)), true);
  97. if (AssimpPINVOKE.SWIGPendingException.Pending) throw AssimpPINVOKE.SWIGPendingException.Retrieve();
  98. return ret;
  99. }
  100. public float x {
  101. set {
  102. AssimpPINVOKE.aiVector2D_x_set(swigCPtr, value);
  103. }
  104. get {
  105. float ret = AssimpPINVOKE.aiVector2D_x_get(swigCPtr);
  106. return ret;
  107. }
  108. }
  109. public float y {
  110. set {
  111. AssimpPINVOKE.aiVector2D_y_set(swigCPtr, value);
  112. }
  113. get {
  114. float ret = AssimpPINVOKE.aiVector2D_y_get(swigCPtr);
  115. return ret;
  116. }
  117. }
  118. }