Mathematics for Game Programming and Computer Graphics by Penny de Byl

Mathematics for Game Programming and Computer Graphics by Penny de Byl

Author:Penny de Byl
Language: eng
Format: epub
Publisher: Packt
Published: 2022-11-15T00:00:00+00:00


Let’s do it…

So far, the polygons we have been rendering have had textures on both sides, unbeknownst to you. Now it’s time to take a look at what’s going on both sides:

From GitHub, download a copy of plane2.obj from the Chapter 11/models folder and place it in your project’s model folder.

Make the following changes to ExploreNormals.py:from Cube import *

..

objects_3d = []

objects_2d = []

cube = Object("Cube")

cube.add_component(Transform((0, 0, -3)))

cube.add_component(Cube(GL_POLYGON,

"images/wall.tif"))

mesh = Object("Plane")

mesh.add_component(Transform((0, 0, -1.5)))

mesh.add_component(LoadMesh(GL_TRIANGLES,

"models/plane2.obj"))

objects_3d.append(cube)

objects_3d.append(mesh)



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.