Beispiel #1
0
	def update_sub(self, time_dif):
		d = vec(
			Stupid.key_state(K_h) - Stupid.key_state(K_f),
			Stupid.key_state(K_r) - Stupid.key_state(K_z),
			Stupid.key_state(K_g) - Stupid.key_state(K_t),
		) * time_dif * 5

		self.q = (self.q + Stupid.key_state(K_c, True)) % 3
		[self.eye, self.target, self.up][self.q] += d
Beispiel #2
0
	def update_sub(self, time_dif):

		if Stupid.key_state(K_p, True):
			self.obj.save("tmp.obj")

		if Stupid.key_state(K_y, True):
			self.volume = self.obj.calc_volume()
		if Stupid.key_state(K_x, True):
			self.surface = self.obj.calc_surface()

		if Stupid.key_state(K_c, True):
			self.obj.noise(self.sigma)
		if Stupid.key_state(K_v, True):
			self.obj.smooth(self.alpha)

		if Stupid.key_state(K_b, True):
			self.silhouette = not self.silhouette

		self.sigma += (Stupid.key_state(K_r, True) - Stupid.key_state(K_f, True)) * 0.01
		self.alpha += (Stupid.key_state(K_t, True) - Stupid.key_state(K_g, True)) * 0.01
Beispiel #3
0
	def update_sub(self, dt):
		self.switch ^= Stupid.key_state(K_c, True)
		self.blinn ^= Stupid.key_state(K_b, True)
		self.sections += Stupid.key_state(K_r, True)
		self.sections -= Stupid.key_state(K_f, True)
		self.shininess += Stupid.key_state(K_t, True)
		self.shininess -= Stupid.key_state(K_g, True)
Beispiel #4
0
	def update_sub(self, time_dif):
		self.p.x += (Stupid.key_state(K_r) - Stupid.key_state(K_f)) * time_dif
		self.p.y += (Stupid.key_state(K_t) - Stupid.key_state(K_g)) * time_dif
		self.p.z += (Stupid.key_state(K_z) - Stupid.key_state(K_h)) * time_dif
		if Stupid.key_state(K_b, True): self.bfc = not self.bfc
		if Stupid.key_state(K_i, True): self.inverse = not self.inverse