Answered step by step
Verified Expert Solution
Question
1 Approved Answer
After opening the 2 - 2 _ Assignment project in Visual Studio 2 0 2 2 , try to build and run the project. If
After opening the Assignment project in Visual Studio try to build and run the project. If the project builds and runs successfully, the OpenGL window should display two foursided pyramids side by side. If you do not see the image below, reach out to your instructor for help.
Black background with two identical white triangles. Each triangle has bottom corner cut off.
The above image shows two foursided pyramids. The goal of this assignment is to change the transformation code in the SceneManager::RenderScene method for each pyramid to make the two pyramids match the following picture:
A white triangle inverted above another white triangle so their tips meet form an hourglass shape.
Specifically, you must address the following rubric criteria:
Create code to address the required functionality. The code you add must meet the required functionality and visual representation outlined for this assignment. This result may require multiple attempts and 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 or incorrect results. Organize all code to meet formatting standards.
Here is the code i have so far
RenderScene
This method is used for rendering the D scene by
transforming and drawing the basic D shapes
void SceneManager::RenderScene
declare the variables for the transformations
glm::vec scaleXYZ;
float XrotationDegrees f;
float YrotationDegrees f;
float ZrotationDegrees f;
glm::vec positionXYZ;
Set needed transformations before drawing the basic mesh.
This same ordering of code should be used for transforming
and drawing all the basic D shapes.
set the XYZ scale for the mesh
scaleXYZ glm::vecfff;
set the XYZ rotation for the mesh
XrotationDegrees f; no rotation around xaxis
YrotationDegrees f; no rotation around yaxis
ZrotationDegrees f; no rotation around zaxis
set the XYZ position for the mesh
positionXYZ glm::vecfff;
set the transformations into memory to be used on the drawn meshes
SetTransformations
scaleXYZ glm::vecfff;
XrotationDegrees f;Rotates around Xaxis degrees to invert the pyramid
YrotationDegrees f; no rotation around yaxis
ZrotationDegrees f; no rotation around zaxis
positionXYZ glm::vecfff;
SetShaderColor;sets shading color to white
draw the mesh with transformation values
mbasicMeshesDrawPyramidMesh;
SetShaderColor;sets shading color to white
draw the mesh with transformation values
mbasicMeshesDrawPyramidMeshLines;
Set needed transformations before drawing the basic mesh.
This same ordering of code should be used for transforming
and drawing all the basic D shapes.
set the XYZ scale for the mesh
scaleXYZ glm::vecfff;
set the XYZ rotation for the mesh
XrotationDegrees f; no rotation on xaxis
YrotationDegrees f; no rotation on yaxis
ZrotationDegrees f; no rotation on zaxis
set the XYZ position for the mesh
positionXYZ glm::vecfff;
set the transformations into memory to be used on the drawn meshes
SetTransformations
scaleXYZ glm::vecfff;
XrotationDegrees f; no rotation on xaxis
YrotationDegrees f; no rotation on yaxis
ZrotationDegrees f; no rotation on zaxis
positionXYZ glm::vecfff;
SetShaderColor;
draw the mesh with transformation values
mbasicMeshesDrawPyramidMesh;
SetShaderColor;
draw the mesh with transformation values
mbasicMeshesDrawPyramidMeshLines;
Please help
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started