Units Class Reference

#include <units.h>


Public Member Functions

 Units ()

Static Public Member Functions

static int timeformat_totype (char *tcf)
static float toframes (int64_t samples, int sample_rate, float framerate)
static int64_t toframes_round (int64_t samples, int sample_rate, float framerate)
static double fix_framerate (double value)
static double atoframerate (char *text)
static void punctuate (char *string)
static char * format_to_separators (int time_format)
static int64_t tosamples (float frames, int sample_rate, float framerate)
static char * totext (char *text, int64_t samples, int time_format, int samplerate, float frame_rate=0, float frames_per_foot=0)
static char * totext (char *text, double seconds, int time_format, int sample_rate=0, float frame_rate=0, float frames_per_foot=0)
static int64_t fromtext (char *text, int samplerate, int time_format, float frame_rate, float frames_per_foot)
static double text_to_seconds (char *text, int samplerate, int time_format, float frame_rate, float frames_per_foot)
static char * print_time_format (int time_format, char *string)
static float xy_to_polar (int x, int y)
static void polar_to_xy (float angle, int radius, int &x, int &y)
static int64_t round (double result)
static int64_t to_int64 (double result)
static float quantize10 (float value)
static float quantize (float value, float precision)
static void * int64_to_ptr (uint64_t value)
static uint64_t ptr_to_int64 (void *ptr)
static void fix_double (double *x)


Detailed Description

Definition at line 103 of file units.h.


Constructor & Destructor Documentation

Units::Units (  )  [inline]

Definition at line 106 of file units.h.


Member Function Documentation

int Units::timeformat_totype ( char *  tcf  )  [static]

float Units::toframes ( int64_t  samples,
int  sample_rate,
float  framerate 
) [static]

int64_t Units::toframes_round ( int64_t  samples,
int  sample_rate,
float  framerate 
) [static]

Definition at line 431 of file units.C.

double Units::fix_framerate ( double  value  )  [static]

double Units::atoframerate ( char *  text  )  [static]

Definition at line 453 of file units.C.

References fix_framerate().

Referenced by InterpolateVideoRate::handle_event(), DecimateRate::handle_event(), SetFrameRateTextBox::handle_event(), and NewFrameRate::handle_event().

Here is the call graph for this function:

void Units::punctuate ( char *  string  )  [static]

Definition at line 655 of file units.C.

Referenced by AssetEditWindow::create_objects().

char * Units::format_to_separators ( int  time_format  )  [static]

int64_t Units::tosamples ( float  frames,
int  sample_rate,
float  framerate 
) [static]

Definition at line 460 of file units.C.

Referenced by RecordEngine::initialize(), and VRender::run().

char * Units::totext ( char *  text,
int64_t  samples,
int  time_format,
int  samplerate,
float  frame_rate = 0,
float  frames_per_foot = 0 
) [static]

char * Units::totext ( char *  text,
double  seconds,
int  time_format,
int  sample_rate = 0,
float  frame_rate = 0,
float  frames_per_foot = 0 
) [static]

Definition at line 160 of file units.C.

References TIME_FEET_FRAMES, TIME_FRAMES, TIME_HMS, TIME_HMS2, TIME_HMS3, TIME_HMSF, TIME_SAMPLES, TIME_SAMPLES_HEX, TIME_SECONDS, and to_int64().

Here is the call graph for this function:

int64_t Units::fromtext ( char *  text,
int  samplerate,
int  time_format,
float  frame_rate,
float  frames_per_foot 
) [static]

double Units::text_to_seconds ( char *  text,
int  samplerate,
int  time_format,
float  frame_rate,
float  frames_per_foot 
) [static]

Definition at line 396 of file units.C.

References fromtext().

Referenced by FileMOV::format_to_asset(), TimeTextBox::handle_event(), and ZoomBar::set_selection().

Here is the call graph for this function:

char * Units::print_time_format ( int  time_format,
char *  string 
) [static]

Definition at line 544 of file units.C.

Referenced by MWindow::time_format_common().

float Units::xy_to_polar ( int  x,
int  y 
) [static]

Definition at line 469 of file units.C.

References M_PI.

Referenced by SetChannelsCanvas::button_press_event(), and SetChannelsCanvas::cursor_motion_event().

void Units::polar_to_xy ( float  angle,
int  radius,
int &  x,
int &  y 
) [static]

Definition at line 510 of file units.C.

References M_PI.

Referenced by SetChannelsCanvas::get_dimensions().

int64_t Units::round ( double  result  )  [static]

int64_t Units::to_int64 ( double  result  )  [static]

float Units::quantize10 ( float  value  )  [static]

Definition at line 523 of file units.C.

Referenced by BC_Pan::stick_to_values().

float Units::quantize ( float  value,
float  precision 
) [static]

void * Units::int64_to_ptr ( uint64_t  value  )  [static]

Definition at line 563 of file units.C.

References BYTE_ORDER.

Referenced by RenderFarmFSClient::fopen(), and RenderFarmFSServer::handle_request().

uint64_t Units::ptr_to_int64 ( void *  ptr  )  [static]

Definition at line 601 of file units.C.

References BYTE_ORDER.

Referenced by RenderFarmFSClient::get_64(), and RenderFarmFSServer::handle_request().

void Units::fix_double ( double *  x  )  [static]

Definition at line 671 of file units.C.

Referenced by MWindow::next_edit_handle(), and MWindow::prev_edit_handle().


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

Generated on Mon Apr 28 14:48:06 2008 for Cinelerra by  doxygen 1.5.5