text
stringlengths 0
2.2M
|
---|
} break;
|
default: {
|
fprintf(stderr, "WARNING: CASE `%d' NOT FOUND.\n", test);
|
testStatus = -1;
|
}
|
}
|
if (testStatus > 0) {
|
fprintf(stderr, "Error, non-zero test status = %d.\n", testStatus);
|
}
|
return testStatus;
|
}
|
// ----------------------------------------------------------------------------
|
// Copyright 201 Bloomberg Finance L.P.
|
//
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
// you may not use this file except in compliance with the License.
|
// You may obtain a copy of the License at
|
//
|
// http://www.apache.org/licenses/LICENSE-2.0
|
//
|
// Unless required by applicable law or agreed to in writing, software
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// See the License for the specific language governing permissions and
|
// limitations under the License.
|
// ----------------------------- END-OF-FILE ----------------------------------
|
#include "ofApp.h"
|
///////////////////////////////////////////////////
|
///////////////////////////////////////////////
|
///////////////////////////////////////////
|
///////////////////////////////////////
|
///////////////////////////////////
|
//
|
//
|
// ADVANCED 3D EXAMPLE
|
// ofNode3d, ofCamera, ofEasyCam
|
//
|
//
|
///////////////////////////////////
|
///////////////////////////////////////
|
///////////////////////////////////////////
|
///////////////////////////////////////////////
|
///////////////////////////////////////////////////
|
//
|
// SUGGESTED EXERCISES
|
//
|
// 0. Run and understand the example
|
//
|
// 1. Change number of particles in the swarm.
|
// 2. Change the dynamic properties of the swarm (speed, orbit radius)
|
// 3. Change the near and far clipping planes of camEasyCam
|
//
|
// 4. Add another camera to the existing 4.
|
// Have all parts of the example working with all 5 cameras.
|
//
|
// 6. Create your own custom node class and add an instance of it
|
// to the scene.
|
//
|
// 7. Understand how the 'frustrum preview' works
|
//
|
///////////////////////////////////////////////////
|
//--------------------------------------------------------------
|
void ofApp::setup(){
|
ofSetVerticalSync(true);
|
ofBackground(70, 70, 70);
|
ofEnableSmoothing();
|
ofEnableDepthTest();
|
/////////////////////
|
// SETUP CAMERAS
|
/////////////////////
|
//
|
iMainCamera = 0;
|
bCamParent = false;
|
// user camera
|
camEasyCam.setTarget(nodeSwarm);
|
camEasyCam.setDistance(100);
|
cameras[0] = &camEasyCam;
|
// front
|
camFront.scale = 20;
|
cameras[1] = &camFront;
|
// top
|
camTop.scale = 20;
|
camTop.tilt(-90);
|
cameras[2] = &camTop;
|
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.