//-------------------------------------------------------------- void testApp::update() { float t = fmodf(ofGetElapsedTimef(), abc.getMaxTime()); // update alemblic reader with time in sec abc.setTime(t); }
void update() { float abc_range = (abc.getMaxTime() - abc.getMinTime()); float t = fmodf(ofGetElapsedTimef(), abc_range) + abc.getMinTime(); abc.setTime(t); abc.get("ClonerShape", mesh); updateMesh(mesh); light0.orbit(ofGetElapsedTimef() * 10, 0, 2000); light1.orbit(ofGetElapsedTimef() * -20, 60, 2000); }
//-------------------------------------------------------------- void testApp::update() { float t = fmodf(ofGetElapsedTimef(), abc.getMaxTime()); abc.setTime(t); }
void ofApp::draw(){ #ifndef NO_ALEMBIC float t = currentFrame / 24.0; if (t > abc.getMaxTime()){ t = abc.getMaxTime(); } abc.setTime(t); #endif targetFbo.begin(); ofViewport(ofRectangle(0,0,1920, 1080)); ofClear(0,0,0,0); glClear(GL_DEPTH); CM.cameraStart(); CM.drawCameraInternals(frame.img, frame.mask, backgroundPlate); ofPushMatrix(); ofScale(-scaleFac,scaleFac,scaleFac); ofTranslate(ofVec3f(-adjustments->x,adjustments->y,adjustments->z)); drawMesh(frame.head, ofColor::darkGoldenRod); drawMesh(frame.rightEye, ofColor::red); drawMesh(frame.leftEye, ofColor::blue); ofPushStyle(); //ofScale(10,10,10); ofNoFill(); ofNode n; FDM.getOrientation(frame, n); n.draw(); ofSetColor(255); ofMatrix4x4 mat = n.getGlobalTransformMatrix(); ofMultMatrix(mat); if(drawFaceBox){ ofBoxPrimitive(100, 100, 100).draw(); } ofPopStyle(); ofPopMatrix(); ofPolyline curve; #ifndef NO_ALEMBIC vector<ofPolyline> curvesMe; abc.get("SplineSpline", curvesMe); #endif ofSetColor(ofColor::white); //////////////// ofDisableDepthTest(); CM.cameraEnd(); ofEnableAlphaBlending(); targetFbo.end(); targetFbo.getTextureReference().drawSubsection(0, 0, 1920/2, 1080/2, 0, targetFbo.getHeight() - 1080, 1920, 1080); gui.draw(); //FDM.maskStandIn.draw(mouseX, mouseY); }