123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304 |
- //------------------------------------------------------------------------------
- // <auto-generated />
- //
- // This file was automatically generated by SWIG (http://www.swig.org).
- // Version 3.0.12
- //
- // Do not make changes to this file unless you know what you are doing--modify
- // the SWIG interface file instead.
- //------------------------------------------------------------------------------
- namespace Autodesk.Fbx {
- public class FbxQuaternion : global::System.IDisposable {
- private global::System.Runtime.InteropServices.HandleRef swigCPtr;
- protected bool swigCMemOwn;
- internal FbxQuaternion(global::System.IntPtr cPtr, bool cMemoryOwn) {
- swigCMemOwn = cMemoryOwn;
- swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- }
- internal static global::System.Runtime.InteropServices.HandleRef getCPtr(FbxQuaternion obj) {
- return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
- }
- ~FbxQuaternion() {
- Dispose();
- }
- public virtual void Dispose() {
- lock(this) {
- if (swigCPtr.Handle != global::System.IntPtr.Zero) {
- if (swigCMemOwn) {
- swigCMemOwn = false;
- NativeMethods.delete_FbxQuaternion(swigCPtr);
- }
- swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
- }
- global::System.GC.SuppressFinalize(this);
- }
- }
- public FbxQuaternion() : this(NativeMethods.new_FbxQuaternion__SWIG_0(), true) {
- }
- public FbxQuaternion(FbxQuaternion pV) : this(NativeMethods.new_FbxQuaternion__SWIG_1(FbxQuaternion.getCPtr(pV)), true) {
- if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve();
- }
- public FbxQuaternion(double pX, double pY, double pZ, double pW) : this(NativeMethods.new_FbxQuaternion__SWIG_2(pX, pY, pZ, pW), true) {
- }
- public FbxQuaternion(double pX, double pY, double pZ) : this(NativeMethods.new_FbxQuaternion__SWIG_3(pX, pY, pZ), true) {
- }
- public FbxQuaternion(FbxVector4 pAxis, double pDegree) : this(NativeMethods.new_FbxQuaternion__SWIG_4(pAxis, pDegree), true) {
- }
- private double GetAtUnchecked(int pIndex) {
- double ret = NativeMethods.FbxQuaternion_GetAtUnchecked(swigCPtr, pIndex);
- if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve();
- return ret;
- }
- private void SetAtUnchecked(int pIndex, double pValue) {
- NativeMethods.FbxQuaternion_SetAtUnchecked(swigCPtr, pIndex, pValue);
- if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve();
- }
- public void Set(double pX, double pY, double pZ, double pW) {
- NativeMethods.FbxQuaternion_Set__SWIG_0(swigCPtr, pX, pY, pZ, pW);
- if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve();
- }
- public void Set(double pX, double pY, double pZ) {
- NativeMethods.FbxQuaternion_Set__SWIG_1(swigCPtr, pX, pY, pZ);
- if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve();
- }
- private FbxQuaternion operator_Add(double pValue) {
- FbxQuaternion ret = new FbxQuaternion(NativeMethods.FbxQuaternion_operator_Add__SWIG_0(swigCPtr, pValue), true);
- if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve();
- return ret;
- }
- private FbxQuaternion operator_Sub(double pValue) {
- FbxQuaternion ret = new FbxQuaternion(NativeMethods.FbxQuaternion_operator_Sub__SWIG_0(swigCPtr, pValue), true);
- if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve();
- return ret;
- }
- private FbxQuaternion operator_Mul(double pValue) {
- FbxQuaternion ret = new FbxQuaternion(NativeMethods.FbxQuaternion_operator_Mul__SWIG_0(swigCPtr, pValue), true);
- if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve();
- return ret;
- }
- private FbxQuaternion operator_Div(double pValue) {
- FbxQuaternion ret = new FbxQuaternion(NativeMethods.FbxQuaternion_operator_Div__SWIG_0(swigCPtr, pValue), true);
- if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve();
- return ret;
- }
- private FbxQuaternion operator_Negate() {
- FbxQuaternion ret = new FbxQuaternion(NativeMethods.FbxQuaternion_operator_Negate(swigCPtr), true);
- if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve();
- return ret;
- }
- private FbxQuaternion operator_Add(FbxQuaternion pQuaternion) {
- FbxQuaternion ret = new FbxQuaternion(NativeMethods.FbxQuaternion_operator_Add__SWIG_1(swigCPtr, FbxQuaternion.getCPtr(pQuaternion)), true);
- if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve();
- return ret;
- }
- private FbxQuaternion operator_Sub(FbxQuaternion pQuaternion) {
- FbxQuaternion ret = new FbxQuaternion(NativeMethods.FbxQuaternion_operator_Sub__SWIG_1(swigCPtr, FbxQuaternion.getCPtr(pQuaternion)), true);
- if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve();
- return ret;
- }
- private FbxQuaternion operator_Mul(FbxQuaternion pOther) {
- FbxQuaternion ret = new FbxQuaternion(NativeMethods.FbxQuaternion_operator_Mul__SWIG_1(swigCPtr, FbxQuaternion.getCPtr(pOther)), true);
- if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve();
- return ret;
- }
- private FbxQuaternion operator_Div(FbxQuaternion pOther) {
- FbxQuaternion ret = new FbxQuaternion(NativeMethods.FbxQuaternion_operator_Div__SWIG_1(swigCPtr, FbxQuaternion.getCPtr(pOther)), true);
- if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve();
- return ret;
- }
- public FbxQuaternion Product(FbxQuaternion pOther) {
- FbxQuaternion ret = new FbxQuaternion(NativeMethods.FbxQuaternion_Product(swigCPtr, FbxQuaternion.getCPtr(pOther)), true);
- if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve();
- return ret;
- }
- public double DotProduct(FbxQuaternion pQuaternion) {
- double ret = NativeMethods.FbxQuaternion_DotProduct(swigCPtr, FbxQuaternion.getCPtr(pQuaternion));
- if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve();
- return ret;
- }
- public void Normalize() {
- NativeMethods.FbxQuaternion_Normalize(swigCPtr);
- if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve();
- }
- public void Conjugate() {
- NativeMethods.FbxQuaternion_Conjugate(swigCPtr);
- if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve();
- }
- public double Length() {
- double ret = NativeMethods.FbxQuaternion_Length(swigCPtr);
- if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve();
- return ret;
- }
- public void Inverse() {
- NativeMethods.FbxQuaternion_Inverse(swigCPtr);
- if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve();
- }
- public void SetAxisAngle(FbxVector4 pAxis, double pDegree) {
- NativeMethods.FbxQuaternion_SetAxisAngle(swigCPtr, pAxis, pDegree);
- if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve();
- }
- public FbxQuaternion Slerp(FbxQuaternion pOther, double pWeight) {
- FbxQuaternion ret = new FbxQuaternion(NativeMethods.FbxQuaternion_Slerp(swigCPtr, FbxQuaternion.getCPtr(pOther), pWeight), true);
- if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve();
- return ret;
- }
- public void ComposeSphericalXYZ(FbxVector4 pEuler) {
- NativeMethods.FbxQuaternion_ComposeSphericalXYZ(swigCPtr, pEuler);
- if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve();
- }
- public FbxVector4 DecomposeSphericalXYZ() {
- var ret = NativeMethods.FbxQuaternion_DecomposeSphericalXYZ(swigCPtr);
- if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve();
- return ret;
- }
- private bool _equals(FbxQuaternion pV) {
- bool ret = NativeMethods.FbxQuaternion__equals(swigCPtr, FbxQuaternion.getCPtr(pV));
- if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve();
- return ret;
- }
- public int Compare(FbxQuaternion pQ2, double pThreshold) {
- int ret = NativeMethods.FbxQuaternion_Compare__SWIG_0(swigCPtr, FbxQuaternion.getCPtr(pQ2), pThreshold);
- if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve();
- return ret;
- }
- public int Compare(FbxQuaternion pQ2) {
- int ret = NativeMethods.FbxQuaternion_Compare__SWIG_1(swigCPtr, FbxQuaternion.getCPtr(pQ2));
- if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve();
- return ret;
- }
- public double GetAt(int index) { return this[index]; }
- public void SetAt(int index, double value) { this[index] = value; }
- public double this[int index] {
- get {
- if (index < 0 || index >= 4) { throw new System.ArgumentOutOfRangeException("index"); }
- return GetAtUnchecked(index);
- }
- set {
- if (index < 0 || index >= 4) { throw new System.ArgumentOutOfRangeException("index"); }
- SetAtUnchecked(index, value);
- }
- }
- public double X { get { return GetAtUnchecked(0); } set { SetAtUnchecked(0, value); } }
- public double Y { get { return GetAtUnchecked(1); } set { SetAtUnchecked(1, value); } }
- public double Z { get { return GetAtUnchecked(2); } set { SetAtUnchecked(2, value); } }
- public double W { get { return GetAtUnchecked(3); } set { SetAtUnchecked(3, value); } }
-
- public static FbxQuaternion operator * (FbxQuaternion a, FbxQuaternion b) {
- return a.operator_Mul(b);
- }
- public static FbxQuaternion operator * (FbxQuaternion a, double b) {
- return a.operator_Mul(b);
- }
- public static FbxQuaternion operator * (double a, FbxQuaternion b) {
- return b.operator_Mul(a);
- }
- public static FbxQuaternion operator / (FbxQuaternion a, FbxQuaternion b) {
- return a.operator_Div(b);
- }
- public static FbxQuaternion operator / (FbxQuaternion a, double b) {
- return a.operator_Div(b);
- }
- public static FbxQuaternion operator + (FbxQuaternion a, FbxQuaternion b) {
- return a.operator_Add(b);
- }
- public static FbxQuaternion operator - (FbxQuaternion a, FbxQuaternion b) {
- return a.operator_Sub(b);
- }
- public static FbxQuaternion operator + (FbxQuaternion a, double b) {
- return a.operator_Add(b);
- }
- public static FbxQuaternion operator - (FbxQuaternion a, double b) {
- return a.operator_Sub(b);
- }
- public static FbxQuaternion operator - (FbxQuaternion a) {
- return a.operator_Negate();
- }
- public bool Equals(FbxQuaternion other) {
- if (object.ReferenceEquals(other, null)) { return false; }
- return _equals(other);
- }
- public override bool Equals(object obj){
- if (object.ReferenceEquals(obj, null)) { return false; }
- /* is obj a subclass of this type; if so use our Equals */
- var typed = obj as FbxQuaternion;
- if (!object.ReferenceEquals(typed, null)) {
- return this.Equals(typed);
- }
- /* are we a subclass of the other type; if so use their Equals */
- if (typeof(FbxQuaternion).IsSubclassOf(obj.GetType())) {
- return obj.Equals(this);
- }
- /* types are unrelated; can't be a match */
- return false;
- }
- public static bool operator == (FbxQuaternion a, FbxQuaternion b) {
- if (object.ReferenceEquals(a, b)) { return true; }
- if (object.ReferenceEquals(a, null) || object.ReferenceEquals(b, null)) { return false; }
- return a.Equals(b);
- }
- public static bool operator != (FbxQuaternion a, FbxQuaternion b) {
- return !(a == b);
- }
- public override int GetHashCode() {
- int ret = NativeMethods.FbxQuaternion_GetHashCode(swigCPtr);
- if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve();
- return ret;
- }
- public override string ToString() {
- return string.Format("<{0},{1},{2},{3}>", X, Y, Z, W);
- }
- }
- }
|