This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//-------------------------------------------------------------- | |
/** | |
* @brief Returns Cardan = roll/pitch/yaw angles for the given | |
* rotation. | |
* | |
* @param q_ an ofQuaternion (unit quaternion) denoting a rotation. | |
* | |
* @details Cardan Angles == Tail-Bryan-A. == Nautical-A. == Euler | |
* Angle Sequence 1,2,3. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void ofApp::pollKeys(){ | |
HANDLE hStdInput = GetStdHandle(STD_INPUT_HANDLE); | |
DWORD events = 0; // how many events took place | |
INPUT_RECORD input_record; // a record of input events | |
DWORD input_size = 1; // how many characters to read | |
// we use peek so that this is non-blocking. | |
BOOL peek = PeekConsoleInput(hStdInput, &input_record, input_size, &events); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//-------------------------------------------------------------- | |
void ofMesh::load(string path){ | |
ofFile is(path, ofFile::ReadOnly); | |
ofMesh& data = *this; | |
string line; | |
string error; | |
ofBuffer buffer(is); | |
ofMesh backup = data; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "ofMain.h" | |
class ofApp : public ofBaseApp{ | |
ofCamera mCam1; | |
ofTexture mTex1; | |
public: | |
void setup() { | |
//mTex1.enableMipmap(); ///< auto-generate mipmap whenever ofTexture updates it's image data. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "ofMain.h" | |
class ofApp : public ofBaseApp{ | |
ofEasyCam mCam1; | |
ofVboMesh mMshBackground; | |
public: | |
void setup(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void generateMesh () { | |
int cMeshWidth = 200; // mesh dimensions | |
int cMeshHeight = 200; | |
// setup mesh | |
vector<ofVec3f> vertices; | |
vector<ofIndexType> indices; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "ofMain.h" | |
class ofApp : public ofBaseApp{ | |
ofVboMesh mMshSphere; | |
ofCamera mCam1; | |
public: | |
void setup(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "ofMain.h" | |
class ofApp : public ofBaseApp{ | |
ofMesh box; | |
public: | |
void setup(){ | |
box = ofBoxPrimitive().getMesh(); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "ofMain.h" | |
class ofApp : public ofBaseApp{ | |
public: | |
ofFbo mFbo; | |
ofFbo mFbo1; | |
ofFbo mFbo2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "ofMain.h" | |
class ofApp : public ofBaseApp{ | |
ofVboMesh testMesh; | |
ofEasyCam mCam1; | |
public: |
OlderNewer