Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please help If the project builds and runs successfully, the OpenGL window will display two planes being rendered. Module Three starting 3 D scene. Two

please help
If the project builds and runs successfully, the OpenGL window will display two planes being rendered.
Module Three starting 3D scene. Two white planes rendered on a black background.
One plane serves as the background for the scene, and one serves as the floor. The goal of the assignment is to add basic 3D shapes to the scene that match the scale, position, and orientation shown in one of the 2D scenes below. You may choose any one of the 2D scenes for your 3D scene replication. Make sure that transformations are being applied to the basic 3D shapes to match the selected 2D scene. You may apply your own colors to the different 3D shapes to improve the look of the scene.
Cylinder, sphere, box, pyramid, and cone
Use transformations like scaling, rotation, and translation to make the replicated shapes look as close to the scene as possible in terms of scale, position, and orientation. You may also apply colors to the replicated shapes. The colors do not have to look exactly like those in the selected 2D image.
Specifically, you must address the following rubric criteria:
Create code to address the required functionality. The coding you complete in the project source code must meet the required functionality and visual representation outlined for this assignment. This result may require multiple attempts and programming strategies to get it right, but that is okay! Working in stages is an important part of any coding project.
Apply logic and proper syntax to code. Source code should be free of logical or syntax errors that prevent the application from running as expected. You will be given credit for code that is set up to meet specifications or solve the problem.
Apply commenting and formatting standards to facilitate understanding of the code. All code should be well commented. Commenting is a practiced art. Your comments should be as clear and brief as possible. Your comments should explain the purpose of lines or sections of the code. You may also include the method you used to achieve a specific task in the code. Be sure to document any sections of code that produce errors. Organize all code to meet formatting standards.
* PrepareScene()
void SceneManager::PrepareScene()
{
// only one instance of a particular mesh needs to be loaded in memory no matter
// how many times it is drawn in the rendered 3D scene
m_basicMeshes->LoadPlaneMesh();
}
* RenderScene()
void SceneManager::RenderScene()
{
// declare the variables for the transformations
glm::vec3 scaleXYZ;
float XrotationDegrees =0.0f;
float YrotationDegrees =0.0f;
float ZrotationDegrees =0.0f;
glm::vec3 positionXYZ;
/*** Set needed transformations
// set the XYZ scale for the mesh
scaleXYZ = glm::vec3(20.0f,1.0f,10.0f);
// set the XYZ rotation for the mesh
XrotationDegrees =0.0f;
YrotationDegrees =0.0f;
ZrotationDegrees =0.0f;
// set the XYZ position for the mesh
positionXYZ = glm::vec3(0.0f,0.0f,0.0f);
// set the transformations into memory to be used on the drawn meshes
SetTransformations(
scaleXYZ,
XrotationDegrees,
YrotationDegrees,
ZrotationDegrees,
positionXYZ);
// set the color values into the shader
SetShaderColor(1,1,1,1);
// draw the mesh with transformation values
m_basicMeshes->DrawPlaneMesh();
/*** Set needed transformations
// set the XYZ scale for the mesh
scaleXYZ = glm::vec3(20.0f,1.0f,10.0f);
// set the XYZ rotation for the mesh
XrotationDegrees =90.0f;
YrotationDegrees =0.0f;
ZrotationDegrees =0.0f;
// set the XYZ position for the mesh
positionXYZ = glm::vec3(0.0f,9.0f,-10.0f);
// set the transformations into memory to be used on the drawn meshes
SetTransformations(
scaleXYZ,
XrotationDegrees,
YrotationDegrees,
ZrotationDegrees,
positionXYZ);
// set the color values into the shader
SetShaderColor(1,1,1,1);
// draw the mesh with transformation values
m_basicMeshes->DrawPlaneMesh();
}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

1 2 3 Data Base Techniques

Authors: Dick Andersen

1st Edition

0880223464, 978-0880223461

More Books

Students also viewed these Databases questions

Question

Prepare an electronic rsum.

Answered: 1 week ago

Question

Strengthen your personal presence.

Answered: 1 week ago

Question

Identify the steps to follow in preparing an oral presentation.

Answered: 1 week ago