Exemplo n.º 1
0
 def render(self, view, renderingSystem):
     modelToWorldTransform = lu.make_mat4_from_zAxis(
         self.position, self.heading, [0.0, 0.0, 1.0])
     rotationTransform = lu.make_rotation_y(self.rotation)
     renderingSystem.drawObjModel(self.model,
                                  modelToWorldTransform * rotationTransform,
                                  view)
Exemplo n.º 2
0
    def render(self, view, renderingSystem):
        #put switch statement here for each type of prop if ann where appropriate

        modelToWorldTransform = lu.make_mat4_from_zAxis(
            self.position, self.facing, vec3(0, 0, 1))
        rotationByRandAmount = lu.make_rotation_z(self.rotAmount)
        renderingSystem.drawObjModel(
            self.model, rotationByRandAmount * modelToWorldTransform, view)
Exemplo n.º 3
0
 def render(self, view, renderingSystem):
     getInfo = self.terrain.getInfoAt(self.position)
     self.position[2] = lu.mix(self.position[2], getInfo.height - self.zOffset,\
                               1)
     rotation = lu.make_rotation_z(self.randRot)
     modelToWorldTransform = lu.make_mat4_from_zAxis(self.position, self.heading, \
                                                     vec3(0,0,1))
     renderingSystem.drawObjModel(self.model,
                                  rotation * modelToWorldTransform, view)
Exemplo n.º 4
0
 def render(self, view, renderingSystem):
     # TODO 1.3: This is a good place to draw the racer model instead of the sphere
     #lu.drawSphere(self.position, 1.5, [1,0,0,1], view)
     #lu.make_mat4_from_zAxis(Translation, zAxis, yAxis)
     modelTransform = lu.make_mat4_from_zAxis(self.position, -self.heading, [0,0,1]) #set Z axis to heading
     renderingSystem.drawObjModel(self.model, modelTransform, view)
Exemplo n.º 5
0
 def render(self, view, renderingSystem):
     # TODO 1.3: This is a good place to draw the racer model instead of the sphere
     #lu.drawSphere(self.position, 1.5, [1,0,0,1], view)
     modelToWorldTransform = lu.make_mat4_from_zAxis(
         self.position, self.heading, [0.0, 0.0, 1.0])
     renderingSystem.drawObjModel(self.model, modelToWorldTransform, view)
Exemplo n.º 6
0
 def render(self, view, renderingSystem):
     # TODO 1.3: This is a good place to draw the racer model instead of the sphere
     modelToWorldTransform = lu.make_mat4_from_zAxis(
         self.position, self.heading, vec3(0, 0, 1))
     renderingSystem.drawObjModel(self.model, modelToWorldTransform, view)