Public Member Functions

KTimeSpan Class Reference

This reference page is linked to from the following overview topics: List of Python FBX classes.


Search for all occurrences

Detailed Description

Class to encapsulate time intervals.

See also:
KTime
Examples:

ImportScene/DisplayGlobalSettings.cxx, and ViewScene/main.cxx.

Definition at line 549 of file ktime.h.

#include <ktime.h>

List of all members.

Public Member Functions

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

Constructor & Destructor Documentation

KTimeSpan ( ) [inline]

Constructor.

Definition at line 553 of file ktime.h.

{}
KTimeSpan ( KTime  pStart,
KTime  pStop 
) [inline]

Constructor.

Parameters:
pStart Beginning of the time interval.
pStop Ending of the time interval.

Definition at line 559 of file ktime.h.

{mStart=pStart; mStop=pStop;}

Member Function Documentation

void Set ( KTime  pStart,
KTime  pStop 
) [inline]

Set start and stop time.

Parameters:
pStart Beginning of the time interval.
pStop Ending of the time interval.

Definition at line 565 of file ktime.h.

{mStart=pStart; mStop=pStop;}
void SetStart ( KTime  pStart ) [inline]

Set start time.

Parameters:
pStart Beginning of the time interval.

Definition at line 570 of file ktime.h.

{mStart=pStart;}
void SetStop ( KTime  pStop ) [inline]

Set stop time.

Parameters:
pStop Ending of the time interval.

Definition at line 575 of file ktime.h.

{mStop=pStop;}
KTime GetStart ( ) const [inline]

Get start time.

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

Definition at line 580 of file ktime.h.

{return mStart;}
KTime GetStop ( ) const [inline]

Get stop time.

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

Definition at line 585 of file ktime.h.

{return mStop;}
KTime GetDuration ( ) const [inline]

Get time interval in absolute value.

Returns:
Time interval.

Definition at line 590 of file ktime.h.

{if (mStop>mStart)return mStop-mStart; else return mStart-mStop;}
KTime GetSignedDuration ( ) const [inline]

Get time interval.

Returns:
Signed time interval.

Definition at line 595 of file ktime.h.

{return mStop-mStart;}
int GetDirection ( ) const [inline]

Get direction of the time interval.

Returns:
KTS_FORWARD if time interval is forward, KTS_BACKWARD if backward.

Definition at line 600 of file ktime.h.

{if (mStop>=mStart)return KTS_FORWARD; else return KTS_BACKWARD;}
bool IsInside ( KTime  pTime ) const

Return true if the time is inside the timespan.

Parameters:
pTime Judge whether pTime is inside the timespan.
Returns:
True if is, false otherwise.
KTimeSpan Intersect ( const KTimeSpan pTime ) const

Return the intersection of the two time spans.

Parameters:
pTime
Returns:
The intersection of pTime and this KTimeSpan.
bool operator!= ( const KTimeSpan pTime ) const

Inequality operator.

Parameters:
pTime KTimeSpan compared with this one.
Returns:
True if unequal, false otherwise.
bool operator== ( const KTimeSpan pTime ) const

Equality operator.

Parameters:
pTime KTimeSpan compared with this one.
Returns:
True if equal, false otherwise.
void UnionAssignment ( const KTimeSpan pSpan )

Unite with another KTimeSpan.

Parameters:
pSpan The KTimeSpan
Remarks:
This function assumes both of the KTimeSpan objects are in the forward direction.

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

KTimeSpan KTimeSpan KTimeSpan KTimeSpan KTimeSpan KTimeSpan KTimeSpan KTimeSpan KTimeSpan KTimeSpan
KTimeSpan KTimeSpan KTimeSpan KTimeSpan KTimeSpan KTimeSpan KTimeSpan KTimeSpan KTimeSpan KTimeSpan