This reference page is linked to from the following overview topics: Animating a Node, FBX SDK 2014, FBX SDK 2013, Differences between FBX SDK and Python FBX, List of Python Fbx classes, Transformation Data, Evaluating the Animation in a Scene.
#include <fbxtime.h>
Class to encapsulate time units.
FbxTime can measure time in hour, minute, second, frame, field, residual and also combination of these units. It is recommended to use FbxTime for all time related operations. For example, currently it is used in FbxGlobalSettings, FbxGlobalTimeSettings, FbxCache, all curve filters and all animation-related classes, etc. FbxTime is just used to represent a moment, to represent a period of time, FbxTimeSpan should be used.
Animation/main.cxx, ExportScene01/main.cxx, ExportScene02/main.cxx, ExportScene03/main.cxx, ExportScene04/main.cxx, ImportScene/DisplayAnimation.cxx, ImportScene/DisplayGlobalSettings.cxx, Instances/main.cxx, Pivot/main.cxx, UI_Examples/CubeCreator/SDK_Utility.cxx, UserProperties/main.cxx, ViewScene/DrawScene.cxx, ViewScene/DrawScene.h, ViewScene/GetPosition.cxx, ViewScene/GetPosition.h, ViewScene/SceneCache.cxx, ViewScene/SceneCache.h, ViewScene/SceneContext.cxx, ViewScene/SceneContext.h, ViewScene/SetCamera.cxx, and ViewScene/SetCamera.h.
Public Member Functions |
|
| FbxTime (const FbxLongLong pTime=0) | |
| Long long constructor. |
|
Static Public Member Functions |
|
| static FbxLongLong | GetOneFrameValue (EMode pTimeMode=eDefaultMode) |
| One frame value for a specified time mode.
|
|
Time Modes and Protocols |
|
| enum | EMode
{ eDefaultMode, eFrames120, eFrames100, eFrames60, eFrames50, eFrames48, eFrames30, eFrames30Drop, eNTSCDropFrame, eNTSCFullFrame, ePAL, eFrames24, eFrames1000, eFilmFullFrame, eCustom, eFrames96, eFrames72, eFrames59dot94, eModesCount } |
| Time modes. More... |
|
| enum | EProtocol { eSMPTE, eFrameCount, eDefaultProtocol } |
| Time protocols enumaration. More... |
|
| static void | SetGlobalTimeMode (EMode pTimeMode, double pFrameRate=0.0) |
| Set default time mode. |
|
| static EMode | GetGlobalTimeMode () |
| Get default time mode. |
|
| static void | SetGlobalTimeProtocol (EProtocol pTimeProtocol) |
| Set default time protocol. |
|
| static EProtocol | GetGlobalTimeProtocol () |
| Get default time protocol. |
|
| static double | GetFrameRate (EMode pTimeMode) |
| Get frame rate associated with time mode, in
frames per second. |
|
| static EMode | ConvertFrameRateToTimeMode (double pFrameRate, double pPrecision=0.00000001) |
| Get time mode associated with frame rate.
|
|
Time Conversion |
|
| void | Set (FbxLongLong pTime) |
| Set time in internal format. |
|
| FbxLongLong | Get () const |
| Get time in internal format. |
|
| void | SetMilliSeconds (FbxLongLong pMilliSeconds) |
| Set time in milliseconds. |
|
| FbxLongLong | GetMilliSeconds () const |
| Get time in milliseconds. |
|
| void | SetSecondDouble (double pTime) |
| Set time in seconds. |
|
| double | GetSecondDouble () const |
| Get time in seconds. |
|
| void | SetTime (int pHour, int pMinute, int pSecond, int pFrame=0, int pField=0, EMode pTimeMode=eDefaultMode) |
| Set time in hour/minute/second/frame/field
format. |
|
| void | SetTime (int pHour, int pMinute, int pSecond, int pFrame, int pField, int pResidual, EMode pTimeMode) |
| Set time in
hour/minute/second/frame/field/residual format. |
|
| bool | GetTime (int &pHour, int &pMinute, int &pSecond, int &pFrame, int &pField, int &pResidual, EMode pTimeMode=eDefaultMode) const |
| Get time in
hour/minute/second/frame/field/residual format. |
|
| FbxTime | GetFramedTime (bool pRound=true) |
| Snaps a time value to the time value
associated with the nearest frame. |
|
| void | SetFrame (FbxLongLong pFrames, EMode pTimeMode=eDefaultMode) |
| Set time in frame format. |
|
| int | GetHourCount () const |
| Get number of hours in time. |
|
| int | GetMinuteCount () const |
| Get number of minutes in time. |
|
| int | GetSecondCount () const |
| Get number of seconds in time. |
|
| FbxLongLong | GetFrameCount (EMode pTimeMode=eDefaultMode) const |
| Get number of frames in time. |
|
| FbxLongLong | GetFieldCount (EMode pTimeMode=eDefaultMode) const |
| Get number of fields in time. |
|
| int | GetResidual (EMode pTimeMode=eDefaultMode) const |
| Get residual time exceeding last full field.
|
|
| char | GetFrameSeparator (EMode pTimeMode=eDefaultMode) const |
| Separator char between second and frame.
|
|
| FBX_DEPRECATED char * | GetTimeString (char *pTimeString, int pInfo=5, EMode pTimeMode=eDefaultMode, EProtocol pTimeFormat=eDefaultProtocol) const |
| Get time in a human readable format.
|
|
| char * | GetTimeString (char *pTimeString, const FbxUShort &pTimeStringSize, int pInfo=5, EMode pTimeMode=eDefaultMode, EProtocol pTimeFormat=eDefaultProtocol) const |
| Get time in a human readable format.
|
|
| bool | SetTimeString (const char *pTime, EMode pTimeMode=eDefaultMode, EProtocol pTimeFormat=eDefaultProtocol) |
| Set time in a human readable format.
|
|
| static bool | IsDropFrame (EMode pTimeMode=eDefaultMode) |
| Test for Drop Frame mode. |
|
Time Operators |
|
| bool | operator== (const FbxTime &pTime) const |
| Equality operator. |
|
| bool | operator!= (const FbxTime &pTime) const |
| Inequality operator. |
|
| bool | operator>= (const FbxTime &pTime) const |
| Superior or equal to operator. |
|
| bool | operator<= (const FbxTime &pTime) const |
| Inferior or equal to operator. |
|
| bool | operator> (const FbxTime &pTime) const |
| Superior to operator. |
|
| bool | operator< (const FbxTime &pTime) const |
| Inferior to operator. |
|
| FbxTime & | operator= (const FbxTime &pTime) |
| Assignment operator. |
|
| FbxTime & | operator+= (const FbxTime &pTime) |
| Addition operator. |
|
| FbxTime & | operator-= (const FbxTime &pTime) |
| Subtraction operator. |
|
| FbxTime | operator+ (const FbxTime &pTime) const |
| Addition operator. |
|
| FbxTime | operator- (const FbxTime &pTime) const |
| Subtraction operator. |
|
| FbxTime | operator* (const int Mult) const |
| Multiplication operator. |
|
| FbxTime | operator/ (const FbxTime &pTime) const |
| Division operator. |
|
| FbxTime | operator* (const FbxTime &pTime) const |
| Multiplication operator. |
|
| enum EMode |
Time modes.
eNTSCDropFrame is used for broadcasting
operations where clock time must be (almost) in sync with time
code. To bring back color NTSC time code with clock time, this mode
drops 2 frames per minute except for every 10 minutes (00, 10, 20,
30, 40, 50). 108 frames are dropped per hour. Over 24 hours the
error is 2 frames and 1/4 of a frame. A time-code of 01:00:03:18
equals a clock time of 01:00:00:00eNTSCFullFrame represents a time address and
therefore is NOT IN SYNC with clock time. A time code of
01:00:00:00 equals a clock time of 01:00:03:18.| enum EProtocol |
Time protocols enumaration.
| FbxTime | ( | const FbxLongLong | pTime = 0 |
) | [inline] |
| static void SetGlobalTimeMode | ( | EMode | pTimeMode, |
| double | pFrameRate =
0.0 |
||
| ) | [static] |
Set default time mode.
| pTimeMode | Time mode identifier. |
| pFrameRate | Custom framerate, only have effect in case of pTimeMode = FbxTime::eCustom |
eDefaultMode.| static EMode GetGlobalTimeMode | ( | ) | [static] |
Get default time mode.
| static void SetGlobalTimeProtocol | ( | EProtocol | pTimeProtocol | ) | [static] |
Set default time protocol.
| pTimeProtocol | Time protocol identifier. |
eDefaultProtocol.| static EProtocol GetGlobalTimeProtocol | ( | ) | [static] |
Get default time protocol.
| static double GetFrameRate | ( | EMode | pTimeMode | ) | [static] |
Get frame rate associated with time mode, in frames per second.
| pTimeMode | Time mode identifier. |
| static EMode ConvertFrameRateToTimeMode | ( | double | pFrameRate, |
| double | pPrecision =
0.00000001 |
||
| ) | [static] |
Get time mode associated with frame rate.
| pFrameRate | The frame rate value. |
| lPrecision | The tolerance value. |
eDefaultMode if no time mode associated to the given
frame rate is found.| void Set | ( | FbxLongLong | pTime | ) | [inline] |
| FbxLongLong Get | ( | ) | const [inline] |
Get time in internal format.
Definition at line 169 of file fbxtime.h.
{ return mTime; }
| void SetMilliSeconds | ( | FbxLongLong | pMilliSeconds | ) | [inline] |
Set time in milliseconds.
| pMilliSeconds | Time value to set. |
Definition at line 174 of file fbxtime.h.
{ mTime = pMilliSeconds * FBXSDK_TC_MILLISECOND; }
| FbxLongLong GetMilliSeconds | ( | ) | const [inline] |
Get time in milliseconds.
Definition at line 179 of file fbxtime.h.
{ return mTime / FBXSDK_TC_MILLISECOND; }
| void SetSecondDouble | ( | double | pTime | ) |
Set time in seconds.
| pTime | Time value to set. |
| double GetSecondDouble | ( | ) | const |
| void SetTime | ( | int | pHour, |
| int | pMinute, | ||
| int | pSecond, | ||
| int | pFrame = 0, |
||
| int | pField = 0, |
||
| EMode | pTimeMode =
eDefaultMode |
||
| ) |
Set time in hour/minute/second/frame/field format.
| pHour | The hours value. |
| pMinute | The minutes value. |
| pSecond | The seconds value. |
| pFrame | The frames values. |
| pField | The field value. |
| pTimeMode | Time mode identifier. |
| void SetTime | ( | int | pHour, |
| int | pMinute, | ||
| int | pSecond, | ||
| int | pFrame, | ||
| int | pField, | ||
| int | pResidual, | ||
| EMode | pTimeMode | ||
| ) |
Set time in hour/minute/second/frame/field/residual format.
| pHour | The hours value. |
| pMinute | The minutes value. |
| pSecond | The seconds value. |
| pFrame | The frames values. |
| pField | The field value. |
| pResidual | The hundredths of frame value. |
| pTimeMode | Time mode identifier. |
| bool GetTime | ( | int & | pHour, |
| int & | pMinute, | ||
| int & | pSecond, | ||
| int & | pFrame, | ||
| int & | pField, | ||
| int & | pResidual, | ||
| EMode | pTimeMode =
eDefaultMode |
||
| ) | const |
Get time in hour/minute/second/frame/field/residual format.
| pHour | The returned hours value. |
| pMinute | The returned minutes value. |
| pSecond | The returned seconds value. |
| pFrame | The returned frames values. |
| pField | The returned field value. |
| pResidual | The returned hundredths of frame value. |
| pTimeMode | The time mode identifier which will dictate the extraction algorithm. |
true if the pTimeMode parameter is a valid
identifier and thus the extraction succeeded. If the function
returns false, all the values are set to 0.| FbxTime GetFramedTime | ( | bool | pRound = true |
) |
Snaps a time value to the time value associated with the nearest frame.
| pRound | If true the return value is rounded to the nearest
integer. |
| void SetFrame | ( | FbxLongLong | pFrames, |
| EMode | pTimeMode =
eDefaultMode |
||
| ) |
Set time in frame format.
| pFrames | The number of frames. |
| pTimeMode | The time mode identifier which will dictate the extraction algorithm. |
| int GetHourCount | ( | ) | const |
| int GetMinuteCount | ( | ) | const |
| int GetSecondCount | ( | ) | const |
| FbxLongLong GetFrameCount | ( | EMode | pTimeMode =
eDefaultMode |
) | const |
Get number of frames in time.
frames exceeding last full second.
| pTimeMode | Time mode identifier. |
| FbxLongLong GetFieldCount | ( | EMode | pTimeMode =
eDefaultMode |
) | const |
Get number of fields in time.
| pTimeMode | Time mode identifier. |
| int GetResidual | ( | EMode | pTimeMode =
eDefaultMode |
) | const |
Get residual time exceeding last full field.
| pTimeMode | Time mode identifier. |
| static bool IsDropFrame | ( | EMode | pTimeMode =
eDefaultMode |
) | [static] |
Test for Drop Frame mode.
| pTimeMode | Time mode identifier. |
| char GetFrameSeparator | ( | EMode | pTimeMode =
eDefaultMode |
) | const |
Separator char between second and frame.
| pTimeMode | Time mode identifier. |
| FBX_DEPRECATED char* GetTimeString | ( | char * | pTimeString, |
| int | pInfo = 5, |
||
| EMode | pTimeMode =
eDefaultMode, |
||
| EProtocol | pTimeFormat =
eDefaultProtocol |
||
| ) | const |
Get time in a human readable format.
| pTimeString | An array large enough to contain a minimum of 19 characters. |
| pInfo | The amount of information if time protocol is
eSMPTE:
|
| pTimeMode | Requested time mode. |
| pTimeFormat | Requested time protocol. |
| char* GetTimeString | ( | char * | pTimeString, |
| const FbxUShort & | pTimeStringSize, | ||
| int | pInfo = 5, |
||
| EMode | pTimeMode =
eDefaultMode, |
||
| EProtocol | pTimeFormat =
eDefaultProtocol |
||
| ) | const |
Get time in a human readable format.
| pTimeString | An array large enough to contain a minimum of 19 characters. |
| pTimeStringSize | Size of the pTimeString buffer used with secure functions. |
| pInfo | The amount of information if time protocol is
eSMPTE:
|
| pTimeMode | Requested time mode. |
| pTimeFormat | Requested time protocol. |
| bool SetTimeString | ( | const char * | pTime, |
| EMode | pTimeMode =
eDefaultMode, |
||
| EProtocol | pTimeFormat =
eDefaultProtocol |
||
| ) |
Set time in a human readable format.
| pTime | An array of a maximum of 18 characters. If time protocol is
eSMPTE, pTimeString must be formatted this way:
"[hours:]minutes[:seconds[.frames[.fields]]]". Hours, minutes,
seconds, frames and fields are parsed as integers and brackets
indicate optional parts. If time protocol is eFRAME,
pTimeString must be formatted this way: "frames". Frames is parsed
as a 64 bits integer. |
| pTimeMode | Given time mode. |
| pTimeFormat | Given time protocol. |
| bool operator== | ( | const FbxTime & | pTime | ) | const [inline] |
| bool operator!= | ( | const FbxTime & | pTime | ) | const [inline] |
| bool operator>= | ( | const FbxTime & | pTime | ) | const [inline] |
| bool operator<= | ( | const FbxTime & | pTime | ) | const [inline] |
| bool operator> | ( | const FbxTime & | pTime | ) | const [inline] |
| bool operator< | ( | const FbxTime & | pTime | ) | const [inline] |
| FbxTime operator* | ( | const int | Mult | ) | const |
| static FbxLongLong GetOneFrameValue | ( | EMode | pTimeMode =
eDefaultMode |
) | [static] |
One frame value for a specified time mode.
| pTimeMode | Time mode identifier. |