FBX C++ API Reference
FbxTimeSpan Class Reference

#include <fbxtime.h>

Class Description

Class to encapsulate time intervals.

See also
FbxTime
Examples:
ImportScene/DisplayGlobalSettings.cxx, and ViewScene/SceneContext.cxx.

Definition at line 508 of file fbxtime.h.

Public Member Functions

 FbxTimeSpan ()
 Constructor. More...
 
 FbxTimeSpan (FbxTime pStart, FbxTime pStop)
 Constructor. More...
 
void Set (FbxTime pStart, FbxTime pStop)
 Set start and stop time. More...
 
void SetStart (FbxTime pStart)
 Set start time. More...
 
void SetStop (FbxTime pStop)
 Set stop time. More...
 
FbxTime GetStart () const
 Get start time. More...
 
FbxTime GetStop () const
 Get stop time. More...
 
FbxTime GetDuration () const
 Get time interval in absolute value. More...
 
FbxTime GetSignedDuration () const
 Get time interval. More...
 
int GetDirection () const
 Get direction of the time interval. More...
 
bool IsInside (FbxTime pTime) const
 Return true if the time is inside the timespan. More...
 
FbxTimeSpan Intersect (const FbxTimeSpan &pTime) const
 Return the intersection of the two time spans. More...
 
bool operator!= (const FbxTimeSpan &pTime) const
 Inequality operator. More...
 
bool operator== (const FbxTimeSpan &pTime) const
 Equality operator. More...
 
void UnionAssignment (const FbxTimeSpan &pSpan, int pDirection=1)
 Unite with another FbxTimeSpan. More...
 

Constructor & Destructor Documentation

◆ FbxTimeSpan() [1/2]

FbxTimeSpan ( )
inline

Constructor.

Definition at line 512 of file fbxtime.h.

512 {}

◆ FbxTimeSpan() [2/2]

FbxTimeSpan ( FbxTime  pStart,
FbxTime  pStop 
)
inline

Constructor.

Parameters
pStartBeginning of the time interval.
pStopEnding of the time interval.

Definition at line 518 of file fbxtime.h.

518 { mStart = pStart; mStop = pStop; }

Member Function Documentation

◆ Set()

void Set ( FbxTime  pStart,
FbxTime  pStop 
)
inline

Set start and stop time.

Parameters
pStartBeginning of the time interval.
pStopEnding of the time interval.

Definition at line 524 of file fbxtime.h.

524 { mStart = pStart; mStop = pStop; }

◆ SetStart()

void SetStart ( FbxTime  pStart)
inline

Set start time.

Parameters
pStartBeginning of the time interval.

Definition at line 529 of file fbxtime.h.

529 { mStart = pStart; }

◆ SetStop()

void SetStop ( FbxTime  pStop)
inline

Set stop time.

Parameters
pStopEnding of the time interval.

Definition at line 534 of file fbxtime.h.

534 { mStop = pStop; }

◆ GetStart()

FbxTime GetStart ( ) const
inline

Get start time.

Returns
Beginning of time interval.
Examples:
ImportScene/DisplayGlobalSettings.cxx, and ViewScene/SceneContext.cxx.

Definition at line 539 of file fbxtime.h.

539 { return mStart; }

◆ GetStop()

FbxTime GetStop ( ) const
inline

Get stop time.

Returns
Ending of time interval.
Examples:
ImportScene/DisplayGlobalSettings.cxx, and ViewScene/SceneContext.cxx.

Definition at line 544 of file fbxtime.h.

544 { return mStop; }

◆ GetDuration()

FbxTime GetDuration ( ) const
inline

Get time interval in absolute value.

Returns
Time interval.

Definition at line 549 of file fbxtime.h.

549 { if( mStop > mStart ) return mStop - mStart; else return mStart - mStop; }

◆ GetSignedDuration()

FbxTime GetSignedDuration ( ) const
inline

Get time interval.

Returns
Signed time interval.

Definition at line 554 of file fbxtime.h.

554 { return mStop - mStart; }

◆ GetDirection()

int GetDirection ( ) const
inline

Get direction of the time interval.

Returns
FBXSDK_TIME_FORWARD if time interval is forward, FBXSDK_TIME_BACKWARD if backward.

Definition at line 559 of file fbxtime.h.

559 { if( mStop >= mStart ) return FBXSDK_TIME_FORWARD; else return FBXSDK_TIME_BACKWARD; }
#define FBXSDK_TIME_FORWARD
Definition: fbxtime.h:31
#define FBXSDK_TIME_BACKWARD
Definition: fbxtime.h:32

◆ IsInside()

bool IsInside ( FbxTime  pTime) const

Return true if the time is inside the timespan.

Parameters
pTimeJudge whether pTime is inside the timespan.
Returns
True if is, false otherwise.

◆ Intersect()

FbxTimeSpan Intersect ( const FbxTimeSpan pTime) const

Return the intersection of the two time spans.

Parameters
pTime
Returns
The intersection of pTime and this FbxTimeSpan.

◆ operator!=()

bool operator!= ( const FbxTimeSpan pTime) const

Inequality operator.

Parameters
pTimeFbxTimeSpan compared with this one.
Returns
True if unequal, false otherwise.

◆ operator==()

bool operator== ( const FbxTimeSpan pTime) const

Equality operator.

Parameters
pTimeFbxTimeSpan compared with this one.
Returns
True if equal, false otherwise.

◆ UnionAssignment()

void UnionAssignment ( const FbxTimeSpan pSpan,
int  pDirection = 1 
)

Unite with another FbxTimeSpan.

Parameters
pSpanThe FbxTimeSpan
pDirectionFBXSDK_TIME_FORWARD or FBXSDK_TIME_BACKWARD
Remarks
This function assumes both of the FbxTimeSpan objects are in the same direction. Use FBXSDK_TIME_FORWARD when start < stop in both timespan Use FBXSDK_TIME_BACKWARD when start > stop in both timespan

The documentation for this class was generated from the following file: