Example #1
0
	def draw(self):
		lower = - np.array([1, 1, 1]) * self.duration * 2.0
		upper = + np.array([1, 1, 1]) * self.duration * 2.0
		link.glPushMatrix()
		link.glTranslatef(*self.xyz)
		link.draw_box([lower[0], upper[0], lower[1], upper[1], lower[2], upper[2]], "data/lava_n4pgamer.png")
		link.glPopMatrix()
Example #2
0
	def draw(self):
		if self.is_actively_controlled_player:
			return
		link.glPushMatrix()
		self.geom.convertIntoReferenceFrame()
		link.set_color(1, 1, 1, 1)
		render.get_model("player_model").render()
		link.glPopMatrix()
Example #3
0
	def _draw(self):
		obj = self.geom
		x, y, z = obj.getPos()
		t1, t2, t3 = obj.bounds[0]/2.0, obj.bounds[1]/2.0, obj.bounds[2]/2.0
		link.glPushMatrix()
		obj.convertIntoReferenceFrame()
		bounds = [-t1, +t1, -t2, +t2, -t3, +t3]
		link.draw_box(bounds, obj.texture)
		link.glPopMatrix()
Example #4
0
	def draw(self):
		xyz = self.beginning_of_step_position.copy()
		while compgeom.l2(xyz, self.xyz) > 0.5:
			lower = - np.array([1, 1, 1]) * 0.1
			upper = + np.array([1, 1, 1]) * 0.1
			link.glPushMatrix()
			link.glTranslatef(*xyz)
			link.draw_box([lower[0], upper[0], lower[1], upper[1], lower[2], upper[2]], "data/lava_n4pgamer.png")
			link.glPopMatrix()
			xyz += 0.5 * self.direction
Example #5
0
	def draw(self):
		link.glPushMatrix()
		self.geom.convertIntoReferenceFrame()
		link.glScalef(self.gl_scale, self.gl_scale, self.gl_scale)
		if self.damage_state % 12 >= 6:
			link.set_color(0, 0, 0, 1)
		else:
			link.set_color(1, 1, 1, 1)
		render.get_model("jumper").render()
		link.glPopMatrix()
Example #6
0
	def draw(self):
		obj = self.geom
		x, y, z = obj.getPos()
		#t1, t2, t3 = obj.bounds[0]/2.0, obj.bounds[1]/2.0, obj.bounds[2]/2.0
		t1, t2, t3 = self.radius, self.radius, self.radius
		link.glPushMatrix()
		obj.convertIntoReferenceFrame()
#		bounds = [-t1, +t1, -t2, +t2, -t3, +t3]
#		link.draw_box(bounds, "data/crate.png")
		link.set_color(1, 1, 1, 1)
		render.get_model("boulder").render()
		link.glPopMatrix()
Example #7
0
	def draw(self):
		link.glPushMatrix()
		self.geom.convertIntoReferenceFrame()
		link.set_color(1, 1, 1, 1)
		render.get_model("cart").render()
		link.glPopMatrix()
Example #8
0
	def draw(self):
		link.glPushMatrix()
		self.geom.convertIntoReferenceFrame()
		link.draw_triangles(self.arrays, self.texture.index)
		link.glPopMatrix()