Vertices relative coordinates, 3 floats per vertex

Property definitions

gamnit $ Mesh :: vertices
	# Vertices relative coordinates, 3 floats per vertex
	var vertices = new Array[Float] is lazy, writable
lib/gamnit/depth/depth_core.nit:191,2--192,50

gamnit $ Plane :: vertices
	redef var vertices is lazy do
		var a = [-0.5, 0.0, -0.5]
		var b = [ 0.5, 0.0, -0.5]
		var c = [-0.5, 0.0,  0.5]
		var d = [ 0.5, 0.0,  0.5]

		var vertices = new Array[Float]
		for v in [c, d, a, b] do vertices.add_all v
		return vertices
	end
lib/gamnit/depth/more_meshes.nit:44,2--53,4

gamnit $ Cuboid :: vertices
	redef var vertices is lazy do
		var a = [-0.5*width, -0.5*height, -0.5*depth]
		var b = [ 0.5*width, -0.5*height, -0.5*depth]
		var c = [-0.5*width,  0.5*height, -0.5*depth]
		var d = [ 0.5*width,  0.5*height, -0.5*depth]

		var e = [-0.5*width, -0.5*height,  0.5*depth]
		var f = [ 0.5*width, -0.5*height,  0.5*depth]
		var g = [-0.5*width,  0.5*height,  0.5*depth]
		var h = [ 0.5*width,  0.5*height,  0.5*depth]

		var vertices = new Array[Float]
		for v in [a, c, d, a, d, b, # front
		          f, h, g, f, g, e, # back
		          b, d, h, b, h, f, # right
		          e, g, c, e, c, a, # left
		          e, a, b, e, b, f, # bottom
		          c, g, h, c, h, d  # top
				  ] do vertices.add_all v
		return vertices
	end
lib/gamnit/depth/more_meshes.nit:97,2--117,4