topical media & game development
lib-of-vs-libs-openFrameworks-utils-ofUtils.h / h
ifndef _OF_UTIL
define _OF_UTIL
include <ofConstants.h>
ifdef TARGET_WIN32 // for ofLaunchBrowser
#include <shellapi.h>
endif
int ofNextPow2(int input);
void ofResetElapsedTimeCounter(); // this happens on the first frame
float ofGetElapsedTimef();
int ofGetElapsedTimeMillis();
int ofGetFrameNum();
int ofGetSeconds();
int ofGetMinutes();
int ofGetHours();
unsigned long ofGetSystemTime( ); // system time in milliseconds;
int ofGetYear();
int ofGetMonth();
int ofGetDay();
int ofGetWeekday();
void ofLaunchBrowser(string url);
void ofEnableDataPath();
void ofDisableDataPath();
string ofToDataPath(string path, bool absolute=false);
//set the root path that ofToDataPath will use to search for files relative to the app
//the path must have a trailing slash (/) !!!!
void ofSetDataPathRoot( string root );
string ofToString(double value, int precision = 7);
string ofToString(int value);
string ofGetVersionInfo();
void ofSaveScreen(string filename);
void ofSaveFrame();
vector<string> ofSplitString(const string & text, const string & delimiter);
//--------------------------------------------------
void ofSetLogLevel(int logLevel);
void ofLog(int logLevel, string message);
void ofLog(int logLevel, const char* format, ...);
void ofSetConsoleColor(int color);
void ofRestoreConsoleColor();
endif
(C) Æliens
04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.