当前位置: 首页>>代码示例>>C++>>正文


C++ Reader::getMaxTime方法代码示例

本文整理汇总了C++中ofxalembic::Reader::getMaxTime方法的典型用法代码示例。如果您正苦于以下问题:C++ Reader::getMaxTime方法的具体用法?C++ Reader::getMaxTime怎么用?C++ Reader::getMaxTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ofxalembic::Reader的用法示例。


在下文中一共展示了Reader::getMaxTime方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: update

//--------------------------------------------------------------
void testApp::update()
{
	float t = fmodf(ofGetElapsedTimef(), abc.getMaxTime());
	
	// update alemblic reader with time in sec
	abc.setTime(t);
}
开发者ID:hanasaan,项目名称:ofxAlembic,代码行数:8,代码来源:testApp.cpp

示例2: update

	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);
	}
开发者ID:satoruhiga,项目名称:ofws20014,代码行数:13,代码来源:ofApp.cpp

示例3: draw

//--------------------------------------------------------------
void testApp::draw()
{
	cam.begin();

	glPointSize(4);
	
	// get meshes and draw
	
	{
		ofMesh mesh;
		abc.get("/Cloner/ClonerShape", mesh);
		
		ofSetColor(255, 0, 0);
		mesh.draw();
	}

	{
        std::vector<glm::vec3> points;
		abc.get("/Emitter/EmitterCloud", points);
		
		ofSetColor(0, 255, 0);
		glBegin(GL_POINTS);
		for (int i = 0; i < points.size(); i++)
			glVertex3fv(&points[i].x);
		glEnd();
	}

	{
		vector<ofPolyline> curves;
		abc.get("/Tracer/TracerSpline", curves);
		
		ofSetColor(0, 0, 255);
		for (int i = 0; i < curves.size(); i++)
			curves[i].draw();
	}
	
	// or simply, abc.draw();

	cam.end();
	
	ofSetColor(255);
	
	ofDrawBitmapString(ofToString(abc.getTime()) + "/" + ofToString(abc.getMaxTime()), 10, 20);
}
开发者ID:hanasaan,项目名称:ofxAlembic,代码行数:45,代码来源:testApp.cpp

示例4: draw

//--------------------------------------------------------------
void testApp::draw()
{
	cam.begin();

	glPointSize(4);
	
	{
		ofMesh mesh;
		abc.get("/polymesh")->get(mesh);
		
		ofSetColor(255, 0, 0);
		mesh.draw();
	}

	{
		vector<ofVec3f> points;
		abc.get("/points")->get(points);
		
		ofSetColor(0, 255, 0);
		glBegin(GL_POINTS);
		for (int i = 0; i < points.size(); i++)
			glVertex3fv(points[i].getPtr());
		glEnd();
	}

	{
		vector<ofPolyline> curves;
		abc.get("/curves")->get(curves);
		
		ofSetColor(0, 0, 255);
		for (int i = 0; i < curves.size(); i++)
			curves[i].draw();
	}

	// or simply, abc.draw();
	
	cam.end();
	
	ofSetColor(255);
	
	ofDrawBitmapString(ofToString(abc.getTime()) + "/" + ofToString(abc.getMaxTime()), 10, 20);
}
开发者ID:Tonsty,项目名称:ofxAlembic,代码行数:43,代码来源:testApp.cpp

示例5: draw

//--------------------------------------------------------------
void testApp::draw()
{
    ofEnableLighting();
    // the position of the light must be updated every frame,
    // call enable() so that it can update itself //
    pointLight.enable();
    material.begin();

	cam.begin();

	// get meshes and draw
	{
		ofMesh mesh;
		abc.get("/Aa-CHAN", mesh);
		ofSetColor(0, 0, 255);
		mesh.draw();
	}
	{
		ofMesh mesh;
		abc.get("/KASHIYUKA", mesh);
		ofSetColor(255, 0, 0);
		mesh.draw();
	}
	{
		ofMesh mesh;
		abc.get("/NOCCHi", mesh);
		ofSetColor(255, 255, 255);
		mesh.draw();
	}

	// or simply, abc.draw();

	cam.end();
	material.end();
	// turn off lighting //
    ofDisableLighting();
	
	ofSetColor(255);
	
	ofDrawBitmapString(ofToString(abc.getTime()) + "/" + ofToString(abc.getMaxTime()), 10, 20);
}
开发者ID:edy555,项目名称:ofxAlembic,代码行数:42,代码来源:testApp.cpp

示例6: update

//--------------------------------------------------------------
void testApp::update()
{
	float t = fmodf(ofGetElapsedTimef(), abc.getMaxTime());
	abc.setTime(t);
}
开发者ID:KazuyoshiUeno,项目名称:ofxAlembic,代码行数:6,代码来源:testApp.cpp

示例7: draw

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);
}
开发者ID:imclab,项目名称:fuelProduction,代码行数:77,代码来源:ofApp.cpp

示例8: draw


//.........这里部分代码省略.........
{
	ofFill();

	cam.begin();
	/*
	glPointSize(4);
	
	// get meshes and draw
	
	{
		ofMesh mesh;
		abc.get("/Cloner/ClonerShape", mesh);
		
		ofSetColor(255, 0, 0);
		mesh.draw();
	}

	{
		vector<ofVec3f> points;
		abc.get("/Emitter/EmitterCloud", points);
		
		ofSetColor(0, 255, 0);
		glBegin(GL_POINTS);
		for (int i = 0; i < points.size(); i++)
			glVertex3fv(points[i].getPtr());
		glEnd();
	}

	{
		vector<ofPolyline> curves;
		abc.get("/Tracer/TracerSpline", curves);
		
		ofSetColor(0, 0, 255);
		for (int i = 0; i < curves.size(); i++)
			curves[i].draw();
	}
	
	*/

	// or simply, abc.draw();
	
	//ofMesh mesh;
	//abc.get("/Null/Sphere/SphereShape", mesh);
	//cout << mesh.getNumNormals() << endl;

	//ofLight l;
	//l.setPosition(mesh.getCentroid() + ofVec3f(0,0,0));
	//l.enable();
	//ofSetColor(ofColor::white);
	//ofSetColor(255, 0, 0);
	/*
	ofEnableDepthTest();
	texture.getTextureReference().bind();
//	mesh.draw();
	abc.draw();
	texture.getTextureReference().unbind();
	ofDisableDepthTest();
	*/
	//glCullFace( GL_FRONT );

	//abc.draw();

	ofEnableDepthTest();

	glEnable( GL_CULL_FACE );

	glCullFace( GL_BACK );
	//*

	ofSetColor( 255, 255, 255, 255.0 * 0.5 );

	for( int i=0; i<meshNames.size(); i++ ){
		ofxAlembic::IGeom *geo = abc.get( meshNames[i] );
		if( i == numTextured ){
			geo->drawTextured( &texture );
		}else{
			geo->draw();
		}
	}
	//*/
	glCullFace( GL_FRONT );
	ofSetColor( 255, 255, 255, 255.0 * 0.5 );
	//*
	for( int i=0; i<meshNames.size(); i++ ){
		ofxAlembic::IGeom *geo = abc.get( meshNames[i] );
		if( i == numTextured ){
			geo->drawTextured( &texture );
		}else{
			geo->draw();
		}
	}
	//*/
	glDisable( GL_CULL_FACE );

	cam.end();
	
	ofSetColor(255);
	
	ofDrawBitmapString(ofToString(abc.getTime()) + "/" + ofToString(abc.getMaxTime()), 10, 20);
}
开发者ID:andreasmuller,项目名称:ofxAlembic,代码行数:101,代码来源:testApp.cpp


注:本文中的ofxalembic::Reader::getMaxTime方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。