// print to output window void MaterialBase::PrintMaterial(int num) const { // material name cout << "Material " << num << ": " << name << endl; cout << " " << MaterialType() << " with:" << endl; // call class to list mechanical properties PrintMechanicalProperties(); // properties in common base class (differs for MPM and FEA) PrintCommonProperties(); #ifdef MPM_CODE // Transport Properties PrintTransportProperties(); #endif }
bool GraphicsInit() { graphicsEngine = new Renderer(); scene1 = new Scene("MeshScene", graphicsEngine); scene1->addLight(new Light(Material(MaterialWhite),glm::vec4(0.0, 0.0, 10.0, 1.0))); for(int j = 0.0; j<NUM_OF_PARENT; j++){ parents[j] = new DummyModel( scene1, NULL, None, "" ); scene1->addModel( parents[j]); for(int i = 0.0; i<BASE_ELEMENT*j; i++){ Cube = new ObjLoader ( scene1, parents[j], CUBE, None ); Cube->SetMaterial(Material(MaterialType((j%7)+1))); Cube->SetName(std::string("Cube")); if(i == 0.0){ Cube->Rotate(ANGLE*i, 0.0, 1.0, 0.0); } else{ Cube->Rotate(45.0*i/(2.0*j), 0.0, 1.0, 0.0); } Cube->Translate(6.0*j, 0.0, 0.0); } } graphicsEngine->initializeScenes(); return true; }