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)
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)
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)
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)
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)
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)