本文整理汇总了C++中Tracker::setTrackerLength方法的典型用法代码示例。如果您正苦于以下问题:C++ Tracker::setTrackerLength方法的具体用法?C++ Tracker::setTrackerLength怎么用?C++ Tracker::setTrackerLength使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tracker
的用法示例。
在下文中一共展示了Tracker::setTrackerLength方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: resetCam
FFTTracer::FFTTracer(){
fft_size = ((testApp*)ofGetAppPtr())->fft_size;
magnitude = new float[fft_size];
for (int i = 0; i < fft_size; i++) {
ofVec3f p = ofVec3f(0, 0, 0);
pos.push_back(p);
ofVec3f v = ofVec3f(0, 0, 0);
vel.push_back(v);
Tracker *t = new Tracker;
t->setup();
t->setTrackerLength(10);
trackers.push_back(t);
}
//ばねパラメータ
/*
stiffness = 1.0;
damping = 0.9;
mass = 100.0;
*/
stiffness = 2.0;
damping = 0.92;
mass = 200;
//((testApp*)ofGetAppPtr())->cam.setPosition(0, 0, -200);
//((testApp*)ofGetAppPtr())->cam.lookAt(ofVec3f(0,0,0));
//camStart = ofPoint(0,0,-200);
//camEnd = camStart;
resetCam();
}
示例2: setup
//--------------------------------------------------------------
void ofApp::setup() {
ofSetFrameRate(60);
ofSetVerticalSync(true);
rotate = 0;
// setup bvh
bvh[0].load("bvhfiles/kashiyuka.bvh");
bvh[1].load("bvhfiles/nocchi.bvh");
bvh[2].load("bvhfiles/aachan.bvh");
for (int i = 0; i < 3; i++) {
bvh[i].play();
}
track.loadSound("Perfume_globalsite_sound.wav");
track.play();
track.setLoop(true);
// setup tracker and drawer
for (int i = 0; i < 3; i++)
{
ofxBvh &b = bvh[i];
Drawer *d = new Drawer;
for (int n = 0; n < b.getNumJoints(); n++) {
const ofxBvhJoint *o = b.getJoint(n);
Tracker *t = new Tracker;
t->setup(o);
t->setTrackerLength(trackerLength);
trackers.push_back(t);
d->add(o);
}
drawers.push_back(d);
}
ofPushMatrix();
ofTranslate(0, -100);
ofScale(1, 1, 1);
ofRotateX(90);
camera.setFov(90);
camera.lookAt(ofVec3f(0,0,0));
camera.setPosition(300, 30, 300);
//camera.disableMouseInput();
ofPopMatrix();
background.loadImage("background.png");
}
示例3: setup
//--------------------------------------------------------------
void ofApp::setup() {
ofSetFrameRate(60);
ofSetVerticalSync(true);
rotate = 0;
// setup bvh
bvh[0].load("bvhfiles/kashiyuka.bvh");
bvh[1].load("bvhfiles/nocchi.bvh");
bvh[2].load("bvhfiles/aachan.bvh");
for (int i = 0; i < 3; i++) {
bvh[i].play();
}
track.load("Perfume_globalsite_sound.wav");
track.play();
track.setLoop(true);
// setup tracker
for (int i = 0; i < 3; i++)
{
ofxBvh &b = bvh[i];
for (int n = 0; n < b.getNumJoints(); n++) {
const ofxBvhJoint *o = b.getJoint(n);
Tracker *t = new Tracker;
t->setup(o);
t->setTrackerLength(trackerLength);
trackers.push_back(t);
}
}
camera.setFov(45);
camera.setDistance(360);
camera.disableMouseInput();
background.load("background.png");
}