Question: * RenderScene ( ) void SceneManager::RenderScene ( ) { / / declare the variables for the transformations glm::vec 3 scaleXYZ; float XrotationDegrees = 0 .

* 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 before drawing the basic mesh. ***/
scaleXYZ = glm::vec3(20.0f,1.0f,10.0f); // set the XYZ scale for the mesh
// 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);
SetTransformations(// set the transformations into memory
scaleXYZ,
XrotationDegrees,
YrotationDegrees,
ZrotationDegrees,
positionXYZ);
SetShaderColor(1,1,1,1); // set the color values into the shader
m_basicMeshes->DrawPlaneMesh(); // draw the mesh with transformation values
/*** Set needed transformations
scaleXYZ = glm::vec3(20.0f,1.0f,10.0f); // set the XYZ scale for the mesh
XrotationDegrees =90.0f; // set the XYZ rotation for the mesh
YrotationDegrees =0.0f;
ZrotationDegrees =0.0f;
positionXYZ = glm::vec3(0.0f,9.0f,-10.0f); // set the XYZ position for the mesh
SetTransformations(// set the transformations into memory
scaleXYZ,
XrotationDegrees,
YrotationDegrees,
ZrotationDegrees,
positionXYZ);
SetShaderColor(1,1,1,1); // set the color values into the shader
m_basicMeshes->DrawPlaneMesh(); // draw the mesh with transformation values
//CylinderMesh
scaleXYZ = glm::vec3(1.0f,2.0f,1.0f); // set the XYZ scale for the mesh
XrotationDegrees =0.0f; // set the XYZ rotation for the mesh
YrotationDegrees =0.0f;
ZrotationDegrees =0.0f;
// set the XYZ position for the mesh
positionXYZ = glm::vec3(-2.0f,1.0f,0.0f);
to be used on the drawn meshes
SetTransformations(// set the transformations into memory
scaleXYZ,
XrotationDegrees,
YrotationDegrees,
ZrotationDegrees,
positionXYZ);
SetShaderColor(0.639,0.286,1,0.639); // set the color values into the shader
m_basicMeshes->DrawCylinderMesh(); // draw the mesh with
//SphereMesh // set the XYZ scale for the mesh
scaleXYZ = glm::vec3(1.5f,1.5f,1.5f); // Set scale for the sphere
XrotationDegrees =0.0f; // set the XYZ rotation for the mesh
YrotationDegrees =0.0f;
ZrotationDegrees =0.0f;
positionXYZ = glm::vec3(2.0f,1.0f,-3.0f); // Position the sphere
SetTransformations(// set the transformations into memory
scaleXYZ,
XrotationDegrees,
YrotationDegrees,
ZrotationDegrees,
positionXYZ);
SetShaderColor(0.0f,0.5f,1.0f,1.0f); // Blue color
m_basicMeshes->DrawSphereMesh(); // draw the mesh with transformation values
//BoxMesh
scaleXYZ = glm::vec3(3.0f,2.0f,3.0f); // Set scale for the box
XrotationDegrees =45.0f; // Rotate to add some dynamics
YrotationDegrees =45.0f;
ZrotationDegrees =0.0f;
positionXYZ = glm::vec3(-3.0f,1.0f,5.0f); // Position the box
// set the transformations into memory to be used on the drawn meshes
SetTransformations(
scaleXYZ,
XrotationDegrees,
YrotationDegrees,
ZrotationDegrees,
positionXYZ);
SetShaderColor(1.0f,0.0f,0.0f,1.0f); // Red color
m_basicMeshes->DrawBoxMesh(); // draw the mesh with transformation values
//Pyramid3Mesh
scaleXYZ = glm::vec3(2.0f,3.0f,2.0f); // Set scale for the pyramid
XrotationDegrees =0.0f; // set the XYZ rotation for the mesh
YrotationDegrees =0.0f;
ZrotationDegrees =30.0f; // Rotate for better visualization
positionXYZ = glm::vec3(4.0f,1.5f,-6.0f); // Position the pyramid
SetTransformations(// set the transformations into memory
scaleXYZ,
XrotationDegrees,
YrotationDegrees,
ZrotationDegrees,
positionXYZ);
SetShaderColor(1.0f,1.0f,0.0f,1.0f); // Yellow color
m_basicMeshes->DrawPyramid3Mesh(); // draw the mesh with
//ConeMesh
scaleXYZ = glm::vec3(1.0f,3.0f,1.0f); // Set scale for the cone
// set the XYZ rotation for the mesh
XrotationDegrees =0.0f;
YrotationDegrees =180.0f; // Rotate the cone
ZrotationDegrees =0.0f;
positionXYZ = glm::vec3(-5.0f,1.5f,0.0f); // Position the cone
SetTransformations(// set the transformations into memory
scaleXYZ,
XrotationDegrees,
YrotationDegrees,
ZrotationDegrees,
positionXYZ);
SetShaderColor(0.0f,1.0f,0.0f,1.0f); // Green color
m_basicMeshes->DrawConeMesh();}// draw the mesh with
my shapes do not show up when i run the code. please help.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!