Surface::Surface(Seed seed){ this->seed = seed; // TODO: DENSITY switch (seed.getSurfaceShape()){ case Seed::SPHERE: rawShape = ofSpherePrimitive(seed.shapeSize, 64); break; case Seed::PLANE: rawShape = ofPlanePrimitive(seed.shapeSize, seed.shapeSize, seed.numCols, seed.numCols); // rawShape =ofBoxPrimitive(seed.shapeSize, seed.shapeSize, seed.shapeSize); break; default: rawShape = ofSpherePrimitive(1,1); } if ((seed.numCols % 2) != 0){ even = false; } else even = true; vboMesh = rawShape.getMesh(); };
void MatrixScene::setup(){ name = "MatrixScene"; oscAddress = "/ma"; plane = ofPlanePrimitive(OUTWIDTH, OUTHEIGHT, 10*10,6*10); plane.setPosition(OUTWIDTH/2, OUTHEIGHT/2, 0); filter.setQ(0.5); filter.setFc(0.05); }
//-------------------------------------------------------------- void ofApp::setup(){ // 画面の設定 ofBackground(0); ofEnableDepthTest(); cam.setDistance(100); // メッシュの幅と高さ w = 200; h = 200; plane = ofPlanePrimitive(400,400,20,20); mesh = plane.getMesh(); //createMesh(); }