void Model::updateModelMatrix() { model_matrix_ = glm::translate(glm::mat4(1.0f), glm::vec3(gl_x_pos(), gl_z_pos(), gl_y_pos())); model_matrix_ = glm::rotate(model_matrix_, radsToDegrees(-xFacing_+(3.0f/2.0f)*M_PI), glm::vec3(0.0f, 1.0f, 0.0f)); model_matrix_ = glm::scale(model_matrix_, glm::vec3(getScale(), getScale(), getScale())); }
//This function is the last to get called every cycle, and is responsible //for generating all screen artifacts void bitmapManipulation::draw(){ ofBackground(ofColor(169,169,169)); float height1 = logo1_dimensions.height; float width1 = logo1_dimensions.width; float rotation1 = logo1_dimensions.rotation; float x1 = logo1_dimensions.x; float y1 = logo1_dimensions.y; float scale1 = logo1_dimensions.scale; float draw_x1 = getDrawingCoordX(width1, height1, x1, y1, rotation1, scale1); float draw_y1 = getDrawingCoordY(width1, height1, x1, y1, rotation1, scale1); float height2 = logo2_dimensions.height; float width2 = logo2_dimensions.width; float rotation2 = logo2_dimensions.rotation; float x2 = logo2_dimensions.x; float y2 = logo2_dimensions.y; float scale2 = logo2_dimensions.scale; float draw_x2 = getDrawingCoordX(width2, height2, x2, y2, rotation2, scale2); float draw_y2 = getDrawingCoordY(width2, height2, x2, y2, rotation2, scale2); ofTranslate(draw_x2, draw_y2); ofRotate(radsToDegrees(rotation2)); logo.draw(0, 0, width2 * scale2, height2 * scale2); ofRotate(radsToDegrees(-rotation2)); ofTranslate(-draw_x2, -draw_y2); ofTranslate(draw_x1, draw_y1); ofRotate(radsToDegrees(rotation1)); logo.draw(0, 0, width1 * scale1, height1 * scale1); ofRotate(radsToDegrees(-rotation1)); ofTranslate(-draw_x1, -draw_y1); }