FBTimeCode Class Reference
 
 
 
FBTimeCode Class Reference

This reference page is linked to from the following overview topics: MotionBuilder 2013, MotionBuilder 2014.


#include <fbtime.h>


Class Description

TimeCode data structure.

Definition at line 280 of file fbtime.h.

Public Member Functions

  FBTimeCode (float pRate=NTSC_DROP)
  Constructor.
void  SetTimeCode (int pHour, int pMinute=0, int pSecond=0, float pFrame=0)
  Set timecode.
FBString  GetTimeCodeString (FBTime::ETimeFormats pFormat=FBTime::eDefaultFormat)
  Get time as a string.
void  SetTimeCodeString (const char *pTime)
  Set time from string.
FBTime  GetTime () const
  Return a Time corresponding to the timecode.
void  SetTime (FBTime pTime)
  Set TimeCode according to the given time.
double  GetFrame () const
  Return a frame number corresponding to the timecode.
void  SetFrame (double pFrame)
  Set Frame according to the given time.
float  GetFrameRate () const
  Return the rate of the timecode.
double  GetRawSecond () const
  Get the raw value for the second.
double  GetRawFrame () const
  Get the raw value for the frame.
double  GetRawRate () const
  Get the raw value for the rate.
bool  operator== (const FBTimeCode &pTimeCode) const
  Equality operator.
bool  operator!= (const FBTimeCode &pTimeCode) const
  Inequality operator.

Static Public Attributes

static const float  NTSC_DROP
  Rates.
static const float  NTSC_FULL
static const float  PAL_25
static const float  MPAL_30
static const float  FILM_24
static const float  FILM_23976
static const float  FRAMES_30
static const float  FRAMES_5994

Constructor & Destructor Documentation

FBTimeCode::FBTimeCode ( float  pRate = NTSC_DROP )

Constructor.

Parameters:
pRate Framerate value.

Member Function Documentation

void FBTimeCode::SetTimeCode ( int  pHour,
int  pMinute = 0,
int  pSecond = 0,
float  pFrame = 0 
)

Set timecode.

Parameters:
pHour Hour value.
pMinute Minute value.
pSecond Second value.
pFrame Frame value.
FBString FBTimeCode::GetTimeCodeString ( FBTime::ETimeFormats  pFormat = FBTime::eDefaultFormat )

Get time as a string.

Parameters:
pFormat Format to use for the returned string(default=FBTime::eDefaultFormat).
Returns:
String value of time.
void FBTimeCode::SetTimeCodeString ( const char *  pTime )

Set time from string.

Parameters:
pTime String to set time from.
FBTime FBTimeCode::GetTime ( ) const

Return a Time corresponding to the timecode.

void FBTimeCode::SetTime ( FBTime  pTime )

Set TimeCode according to the given time.

Parameters:
pTime Time value to set.
double FBTimeCode::GetFrame ( ) const

Return a frame number corresponding to the timecode.

void FBTimeCode::SetFrame ( double  pFrame )

Set Frame according to the given time.

Parameters:
pFrame Frame value to set.
float FBTimeCode::GetFrameRate ( ) const

Return the rate of the timecode.

double FBTimeCode::GetRawSecond ( ) const

Get the raw value for the second.

Returns:
raw value for the second.
double FBTimeCode::GetRawFrame ( ) const

Get the raw value for the frame.

Returns:
raw value for the frame.
double FBTimeCode::GetRawRate ( ) const

Get the raw value for the rate.

Returns:
raw value for the rate.
bool FBTimeCode::operator== ( const FBTimeCode pTimeCode ) const

Equality operator.

Parameters:
pTimeCode time code to compare with.
Returns:
true if time codes are equal.
bool FBTimeCode::operator!= ( const FBTimeCode pTimeCode ) const

Inequality operator.

Parameters:
pTimeCode time code to compare with.
Returns:
true if time codes are not equal.

Member Data Documentation

const float FBTimeCode::NTSC_DROP [static]

Rates.

29.97f

Definition at line 363 of file fbtime.h.

const float FBTimeCode::NTSC_FULL [static]

-29.97f

Definition at line 364 of file fbtime.h.

const float FBTimeCode::PAL_25 [static]

-25.0f

Definition at line 365 of file fbtime.h.

const float FBTimeCode::MPAL_30 [static]

-29.971f Currently not supported : "1" is added just to differentiate from NTSC_FULL(-29.97f)

Definition at line 366 of file fbtime.h.

const float FBTimeCode::FILM_24 [static]

-24.0f

Definition at line 367 of file fbtime.h.

const float FBTimeCode::FILM_23976 [static]

-23.976f

Definition at line 368 of file fbtime.h.

const float FBTimeCode::FRAMES_30 [static]

-30.0f

Definition at line 369 of file fbtime.h.

const float FBTimeCode::FRAMES_5994 [static]

-59.94f

Definition at line 370 of file fbtime.h.


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