To integrate the new Transform class, we need to add it as a component in the Helloobject. py script first as follows:
from Mesh3D import *
from Transform import *
.
class object:
glEnable (GL_DEPTH_TEST)
cube $=$ object ("Cube")
cube.add_component (Transform $((0,0,-1)))$
cube.add_component (Cube (GL_POLYGON,
"images/wall.tif"))
By including the cube.add_component $(\operatorname{Transform}((0,0,-1)))$ line, you are setting the location of the cube to $(0,0,-1)$-however, you must remember that earlier in the code from step 4 we set the following:
glTranslatef $(0.0,0.0,-3)$
This is already offsetting whatever is drawn by $z=-3$. Therefore, by adding the Transform component with $z=-1$, the total offset for the cube will be the addition of these, which equates to $\mathrm{z}=-4$.