text
stringlengths 0
2.2M
|
---|
//define ray in screen space
|
ray[0] = glm::vec3(ofGetMouseX(), ofGetMouseY(), -1);
|
ray[1] = glm::vec3(ofGetMouseX(), ofGetMouseY(), 1);
|
//transform ray into world space
|
ray[0] = cameras[iMainCamera]->screenToWorld(ray[0], viewMain);
|
ray[1] = cameras[iMainCamera]->screenToWorld(ray[1], viewMain);
|
}
|
//--------------------------------------------------------------
|
void ofApp::keyPressed(int key){
|
if (key >= '1' && key <= '4')
|
iMainCamera = key - '1';
|
if (key == 'f')
|
ofToggleFullscreen();
|
if (key == 'p')
|
{
|
if (bCamParent)
|
{
|
camFront.clearParent();
|
camTop.clearParent();
|
camLeft.clearParent();
|
bCamParent = false;
|
} else {
|
camFront.setParent(nodeSwarm.light);
|
camTop.setParent(nodeSwarm.light);
|
camLeft.setParent(nodeSwarm.light);
|
bCamParent = true;
|
}
|
}
|
}
|
//--------------------------------------------------------------
|
void ofApp::keyReleased(int key){
|
}
|
//--------------------------------------------------------------
|
void ofApp::windowResized(int w, int h){
|
setupViewports();
|
}
|
//--------------------------------------------------------------
|
void ofApp::touchDown(int x, int y, int id){
|
}
|
//--------------------------------------------------------------
|
void ofApp::touchMoved(int x, int y, int id){
|
}
|
//--------------------------------------------------------------
|
void ofApp::touchUp(int x, int y, int id){
|
}
|
//--------------------------------------------------------------
|
void ofApp::touchDoubleTap(int x, int y, int id){
|
}
|
//--------------------------------------------------------------
|
void ofApp::touchCancelled(int x, int y, int id){
|
}
|
//--------------------------------------------------------------
|
void ofApp::swipe(ofxAndroidSwipeDir swipeDir, int id){
|
}
|
//--------------------------------------------------------------
|
void ofApp::pause(){
|
}
|
//--------------------------------------------------------------
|
void ofApp::stop(){
|
}
|
//--------------------------------------------------------------
|
void ofApp::resume(){
|
}
|
//--------------------------------------------------------------
|
void ofApp::reloadTextures(){
|
}
|
//--------------------------------------------------------------
|
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.