本文整理汇总了C++中ofxalembic::Reader::open方法的典型用法代码示例。如果您正苦于以下问题:C++ Reader::open方法的具体用法?C++ Reader::open怎么用?C++ Reader::open使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ofxalembic::Reader
的用法示例。
在下文中一共展示了Reader::open方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setup
//--------------------------------------------------------------
void testApp::setup()
{
ofSetVerticalSync(true);
ofSetFrameRate(60);
ofBackground(0);
string path = "perfume_global_site_003_sequence.abc";
abc.open(path);
shader.watch("shader.vert", "shader.frag");
}
示例2: setup
//--------------------------------------------------------------
void testApp::setup()
{
ofSetVerticalSync(true);
ofSetFrameRate(60);
ofBackground(0);
string path = "sample.abc";
// load allembic file
abc.open(path);
// show all drawable names
abc.dumpNames();
}
示例3: setup
void setup()
{
ofSetFrameRate(60);
ofSetVerticalSync(true);
ofBackground(0);
abc.open("sample.abc");
abc.dumpNames();
light0.setup();
light0.setDiffuseColor(ofFloatColor(0.4, 0.4, 0.8));
light1.setup();
light1.setDiffuseColor(ofFloatColor(0.4, 0.8, 0.4));
}
示例4: setup
//--------------------------------------------------------------
void testApp::setup()
{
ofSetVerticalSync(true);
ofSetFrameRate(60);
ofBackground(0);
glEnable(GL_DEPTH_TEST);
string path = "perfume_global_site_003_sequence.abc";
// load allembic file
abc.open(path);
// show all drawable names
abc.dumpNames();
// specular color, the highlight/shininess color //
pointLight.setSpecularColor( ofColor(255.f, 255.f, 255.f));
pointLight.setPosition(0, -100, 100);
material.setShininess( 64 );
}
示例5: setup
//--------------------------------------------------------------
void testApp::setup()
{
ofSetVerticalSync(true);
ofSetFrameRate(60);
ofBackground(0);
numTextured = 0;
string path = "3DCursor_Alembic.abc";
ofDisableArbTex();
texture.loadImage("textSphere_cursor.png");
// load allembic file
abc.open(path);
// show all drawable names
abc.dumpNames();
meshNames = abc.getNames();
}
示例6: setup
//.........这里部分代码省略.........
ofSetVerticalSync(true);
light.enable();
light.setPosition(+500, +500, +500);
string testSequenceFolder = dataPath + "aCam/";
CCM.loadCalibration(
testSequenceFolder + "matrices/rgbCalib.yml",
testSequenceFolder + "matrices/depthCalib.yml",
testSequenceFolder + "matrices/rotationDepthToRGB.yml",
testSequenceFolder + "matrices/translationDepthToRGB.yml");
int ppWidth = ofNextPow2(CCM.rgbCalibration.getDistortedIntrinsics().getImageSize().width);
int ppHeight = ofNextPow2(CCM.rgbCalibration.getDistortedIntrinsics().getImageSize().height);
targetFbo.allocate(CCM.rgbCalibration.getDistortedIntrinsics().getImageSize().width,
CCM.rgbCalibration.getDistortedIntrinsics().getImageSize().height,GL_RGBA32F);
CM.CCM = CCM;
CM.setup();
// // save head and tranform
//
// //CCM.extrinsics
//
//// ofxAlembic::Writer writer;
//// string path = "cam.abc";
//// writer.open(path, 24);
////
//// writer.addXform("/box", CCM.extrinsics);
//// //if (j == 0){
//// ofBoxPrimitive box;
//// box.set(40);
//// writer.addPolyMesh("/box/boxShape", box.getMesh());
//// //}
////
//// // draw the box of orientation using new alexmbic style
////
////
//// //}
//
//
//
// writer.close();
abc.open("SH04_Spline_01c.abc");
abc.dumpNames();
backgroundPlate.loadImage("../../../sharedData/Background Plates/A-Cam_BackgroundPlate_360p.png");
// ofxAlembic::Writer writer;
//
//
// string path = ofGetTimestampString() + ".abc";
// writer.open(path, 24);
// for (int j = 0; j < FDM.numFrames; j+=10){
//
// FDM.loadFrame(j, frame); // load frame 0
// ofMatrix4x4 mm;
// mm.glScale(scaleFac,scaleFac,scaleFac);
// mm.glTranslate(ofVec3f(-adjustments->x,adjustments->y,adjustments->z));
//
// ofMesh temp = frame.head;
// ofxAlembic::transform(temp, mm);
// writer.addPolyMesh("/head", temp);
//
// ofNode n;
// FDM.getOrientation(frame, n);
//
// mm.preMult(n.getGlobalTransformMatrix());
//
// writer.addXform("/box", mm);
// if (j == 0){
// ofBoxPrimitive a;
// a.set(100);
// writer.addPolyMesh("/box/boxShape", a.getMesh());
// }
//
// // draw the box of orientation using new alexmbic style
//
//
// }
//
// writer.close();
////
}
示例7: setup
//--------------------------------------------------------------
void testApp::setup()
{
ofSetVerticalSync(true);
ofSetFrameRate(60);
ofBackground(0);
string path = "sample.abc";
{
ofxAlembic::Writer writer;
if (writer.open(path, 30)) // export at 30fps
{
for (int f = 0; f < 60; f++)
{
// points
{
vector<ofVec3f> points;
for (int i = 0; i < 10; i++)
{
ofVec3f p;
p.x = ofRandom(-300, 300);
p.y = ofRandom(-300, 300);
p.z = ofRandom(-300, 300);
points.push_back(p);
}
writer.addPoints("/points", points);
}
// curves
{
vector<ofPolyline> curves;
for (int i = 0; i < 10; i++)
{
ofPolyline poly;
for (int n = 0; n < 100; n++)
{
ofVec3f v;
v.x = ofSignedNoise(1, 0, 0, n * 0.01 + f * 10 + i) * 300;
v.y = ofSignedNoise(0, 1, 0, n * 0.01 + f * 10 + i) * 300;
v.z = ofSignedNoise(0, 0, 1, n * 0.01 + f * 10 + i) * 300;
poly.addVertex(v);
}
curves.push_back(poly);
}
writer.addCurves("/curves", curves);
}
// mesh
{
ofMesh mesh;
int num = ofRandom(1, 10) * 3;
for (int i = 0; i < num; i++)
{
ofVec3f p;
p.x = ofRandom(-300, 300);
p.y = ofRandom(-300, 300);
p.z = ofRandom(-300, 300);
mesh.addVertex(p);
}
writer.addPolyMesh("/polymesh", mesh);
}
}
}
}
abc.open(path);
abc.dumpNames();
}