Example #1
0
void ofxRotate(ofQuaternion q) {
	//rotation
	float angle;
	ofVec3f axis;
	q.getRotate(angle, axis);
	ofRotate(angle/TWO_PI*360,axis.x,axis.y,axis.z);
}
Example #2
0
ofVec3f ofxToCartesian(ofQuaternion q) {
    float angle;
    ofVec3f vec;
    q.getRotate(angle, vec);
    return ofVec3f(0,0,1).rotated(angle, vec);
}