#if UNITY_EDITOR || FBXSDK_RUNTIME //------------------------------------------------------------------------------ // // // 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 FbxTime : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; internal FbxTime(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(FbxTime obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } ~FbxTime() { Dispose(); } public virtual void Dispose() { lock(this) { if (swigCPtr.Handle != global::System.IntPtr.Zero) { if (swigCMemOwn) { swigCMemOwn = false; NativeMethods.delete_FbxTime(swigCPtr); } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } global::System.GC.SuppressFinalize(this); } } public FbxTime() : this(NativeMethods.new_FbxTime(), true) { } public static void SetGlobalTimeMode(FbxTime.EMode pTimeMode) { NativeMethods.FbxTime_SetGlobalTimeMode((int)pTimeMode); } public static FbxTime.EMode GetGlobalTimeMode() { FbxTime.EMode ret = (FbxTime.EMode)NativeMethods.FbxTime_GetGlobalTimeMode(); return ret; } public static void SetGlobalTimeProtocol(FbxTime.EProtocol pTimeProtocol) { NativeMethods.FbxTime_SetGlobalTimeProtocol((int)pTimeProtocol); } public static FbxTime.EProtocol GetGlobalTimeProtocol() { FbxTime.EProtocol ret = (FbxTime.EProtocol)NativeMethods.FbxTime_GetGlobalTimeProtocol(); return ret; } public static double GetFrameRate(FbxTime.EMode pTimeMode) { double ret = NativeMethods.FbxTime_GetFrameRate((int)pTimeMode); return ret; } public static FbxTime.EMode ConvertFrameRateToTimeMode(double pFrameRate, double pPrecision) { FbxTime.EMode ret = (FbxTime.EMode)NativeMethods.FbxTime_ConvertFrameRateToTimeMode__SWIG_0(pFrameRate, pPrecision); return ret; } public static FbxTime.EMode ConvertFrameRateToTimeMode(double pFrameRate) { FbxTime.EMode ret = (FbxTime.EMode)NativeMethods.FbxTime_ConvertFrameRateToTimeMode__SWIG_1(pFrameRate); return ret; } public long GetRaw() { long ret = NativeMethods.FbxTime_GetRaw(swigCPtr); if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve(); return ret; } public long GetMilliSeconds() { long ret = NativeMethods.FbxTime_GetMilliSeconds(swigCPtr); if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve(); return ret; } public double GetSecondDouble() { double ret = NativeMethods.FbxTime_GetSecondDouble(swigCPtr); if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve(); return ret; } public bool GetTime(out int pHour, out int pMinute, out int pSecond, out int pFrame, out int pField, out int pResidual, FbxTime.EMode pTimeMode) { bool ret = NativeMethods.FbxTime_GetTime__SWIG_0(swigCPtr, out pHour, out pMinute, out pSecond, out pFrame, out pField, out pResidual, (int)pTimeMode); if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve(); return ret; } public bool GetTime(out int pHour, out int pMinute, out int pSecond, out int pFrame, out int pField, out int pResidual) { bool ret = NativeMethods.FbxTime_GetTime__SWIG_1(swigCPtr, out pHour, out pMinute, out pSecond, out pFrame, out pField, out pResidual); if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve(); return ret; } public FbxTime GetFramedTime(bool pRound) { FbxTime ret = new FbxTime(NativeMethods.FbxTime_GetFramedTime__SWIG_0(swigCPtr, pRound), true); if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve(); return ret; } public FbxTime GetFramedTime() { FbxTime ret = new FbxTime(NativeMethods.FbxTime_GetFramedTime__SWIG_1(swigCPtr), true); if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve(); return ret; } public int GetHourCount() { int ret = NativeMethods.FbxTime_GetHourCount(swigCPtr); if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve(); return ret; } public int GetMinuteCount() { int ret = NativeMethods.FbxTime_GetMinuteCount(swigCPtr); if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve(); return ret; } public int GetSecondCount() { int ret = NativeMethods.FbxTime_GetSecondCount(swigCPtr); if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve(); return ret; } public long GetFrameCount(FbxTime.EMode pTimeMode) { long ret = NativeMethods.FbxTime_GetFrameCount__SWIG_0(swigCPtr, (int)pTimeMode); if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve(); return ret; } public long GetFrameCount() { long ret = NativeMethods.FbxTime_GetFrameCount__SWIG_1(swigCPtr); if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve(); return ret; } public double GetFrameCountPrecise(FbxTime.EMode pTimeMode) { double ret = NativeMethods.FbxTime_GetFrameCountPrecise__SWIG_0(swigCPtr, (int)pTimeMode); if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve(); return ret; } public double GetFrameCountPrecise() { double ret = NativeMethods.FbxTime_GetFrameCountPrecise__SWIG_1(swigCPtr); if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve(); return ret; } public long GetFieldCount(FbxTime.EMode pTimeMode) { long ret = NativeMethods.FbxTime_GetFieldCount__SWIG_0(swigCPtr, (int)pTimeMode); if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve(); return ret; } public long GetFieldCount() { long ret = NativeMethods.FbxTime_GetFieldCount__SWIG_1(swigCPtr); if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve(); return ret; } public int GetResidual(FbxTime.EMode pTimeMode) { int ret = NativeMethods.FbxTime_GetResidual__SWIG_0(swigCPtr, (int)pTimeMode); if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve(); return ret; } public int GetResidual() { int ret = NativeMethods.FbxTime_GetResidual__SWIG_1(swigCPtr); if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve(); return ret; } public static bool IsDropFrame(FbxTime.EMode pTimeMode) { bool ret = NativeMethods.FbxTime_IsDropFrame__SWIG_0((int)pTimeMode); return ret; } public static bool IsDropFrame() { bool ret = NativeMethods.FbxTime_IsDropFrame__SWIG_1(); return ret; } public char GetFrameSeparator(FbxTime.EMode pTimeMode) { byte ret = NativeMethods.FbxTime_GetFrameSeparator__SWIG_0(swigCPtr, (int)pTimeMode); if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve(); return System.Convert.ToChar(ret); } public char GetFrameSeparator() { byte ret = NativeMethods.FbxTime_GetFrameSeparator__SWIG_1(swigCPtr); if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve(); return System.Convert.ToChar(ret); } private string GetTimeStringNoOptionalArgs(FbxTime.EElement pStart, FbxTime.EElement pEnd, FbxTime.EMode pTimeMode, FbxTime.EProtocol pTimeFormat) { string ret = NativeMethods.FbxTime_GetTimeStringNoOptionalArgs(swigCPtr, (int)pStart, (int)pEnd, (int)pTimeMode, (int)pTimeFormat); if (NativeMethods.SWIGPendingException.Pending) throw NativeMethods.SWIGPendingException.Retrieve(); return ret; } public static long GetOneFrameValue(FbxTime.EMode pTimeMode) { long ret = NativeMethods.FbxTime_GetOneFrameValue__SWIG_0((int)pTimeMode); return ret; } public static long GetOneFrameValue() { long ret = NativeMethods.FbxTime_GetOneFrameValue__SWIG_1(); return ret; } public override bool Equals(object obj) { if (object.ReferenceEquals(obj, null)) { return false; } if (! (obj is FbxTime)) { return false; } return CompareTo((FbxTime)obj) == 0; } public int CompareTo(object other) { if (object.ReferenceEquals(other, null)) { return 1; } if (! (other is FbxTime)) { throw new System.ArgumentException("other is not the same type as this instance of FbxTime"); } return CompareTo((FbxTime)other); } static int _compare(FbxTime a, FbxTime b) { if (object.ReferenceEquals(a, b)) { return 0; } if (object.ReferenceEquals(a, null)) { return -1; } if (object.ReferenceEquals(b, null)) { return 1; } return a.CompareTo(b); } public static bool operator < (FbxTime a, FbxTime b) { return _compare(a, b) < 0; } public static bool operator <= (FbxTime a, FbxTime b) { return _compare(a, b) <= 0; } public static bool operator == (FbxTime a, FbxTime b) { return _compare(a, b) == 0; } public static bool operator != (FbxTime a, FbxTime b) { return _compare(a, b) != 0; } public static bool operator >= (FbxTime a, FbxTime b) { return _compare(a, b) >= 0; } public static bool operator > (FbxTime a, FbxTime b) { return _compare(a, b) > 0; } public bool Equals(FbxTime other) { return CompareTo(other) == 0; } public override int GetHashCode() { return GetRaw().GetHashCode(); } public int CompareTo(FbxTime other) { if (object.ReferenceEquals(other, null)) { return 1; } return GetRaw().CompareTo(other.GetRaw()); } public static FbxTime FromRaw(long pTime) { FbxTime ret = new FbxTime(NativeMethods.FbxTime_FromRaw(pTime), true); return ret; } public static FbxTime FromMilliSeconds(long pMilliSeconds) { FbxTime ret = new FbxTime(NativeMethods.FbxTime_FromMilliSeconds(pMilliSeconds), true); return ret; } public static FbxTime FromSecondDouble(double pTime) { FbxTime ret = new FbxTime(NativeMethods.FbxTime_FromSecondDouble(pTime), true); return ret; } private static FbxTime FromTimeNoOptionalArgs(int pHour, int pMinute, int pSecond, int pFrame, int pField, int pResidual, FbxTime.EMode pTimeMode) { FbxTime ret = new FbxTime(NativeMethods.FbxTime_FromTimeNoOptionalArgs(pHour, pMinute, pSecond, pFrame, pField, pResidual, (int)pTimeMode), true); return ret; } public static FbxTime FromTime(int pHour, int pMinute, int pSecond, int pFrame=0, int pField=0, int pResidual=0, EMode pTimeMode=EMode.eDefaultMode) { return FromTimeNoOptionalArgs(pHour, pMinute, pSecond, pFrame, pField, pResidual, pTimeMode); } public static FbxTime FromFrame(long pFrames, FbxTime.EMode pTimeMode) { FbxTime ret = new FbxTime(NativeMethods.FbxTime_FromFrame__SWIG_0(pFrames, (int)pTimeMode), true); return ret; } public static FbxTime FromFrame(long pFrames) { FbxTime ret = new FbxTime(NativeMethods.FbxTime_FromFrame__SWIG_1(pFrames), true); return ret; } public static FbxTime FromFramePrecise(double pFrames, FbxTime.EMode pTimeMode) { FbxTime ret = new FbxTime(NativeMethods.FbxTime_FromFramePrecise__SWIG_0(pFrames, (int)pTimeMode), true); return ret; } public static FbxTime FromFramePrecise(double pFrames) { FbxTime ret = new FbxTime(NativeMethods.FbxTime_FromFramePrecise__SWIG_1(pFrames), true); return ret; } private static FbxTime FromTimeStringNoOptionalArgs(string pTime, FbxTime.EMode pTimeMode, FbxTime.EProtocol pTimeFormat) { FbxTime ret = new FbxTime(NativeMethods.FbxTime_FromTimeStringNoOptionalArgs(pTime, (int)pTimeMode, (int)pTimeFormat), true); return ret; } public static FbxTime FromTimeString(string pTime, EMode pTimeMode=EMode.eDefaultMode, EProtocol pTimeFormat=EProtocol.eDefaultProtocol) { return FbxTime.FromTimeStringNoOptionalArgs(pTime, pTimeMode, pTimeFormat); } public string GetTimeString( EElement pStart = EElement.eHours, EElement pEnd = EElement.eResidual, EMode pTimeMode = EMode.eDefaultMode, EProtocol pTimeFormat = EProtocol.eDefaultProtocol) { return GetTimeStringNoOptionalArgs(pStart, pEnd, pTimeMode, pTimeFormat); } public enum EMode { eDefaultMode, eFrames120, eFrames100, eFrames60, eFrames50, eFrames48, eFrames30, eFrames30Drop, eNTSCDropFrame, eNTSCFullFrame, ePAL, eFrames24, eFrames1000, eFilmFullFrame, eCustom, eFrames96, eFrames72, eFrames59dot94, eFrames119dot88, eModesCount } public enum EProtocol { eSMPTE, eFrameCount, eDefaultProtocol } public enum EElement { eHours, eMinutes, eSeconds, eFrames, eField, eResidual } } } #endif // UNITY_EDITOR || FBXSDK_RUNTIME