Added tree and biped (humanoid), can now pass x,y,z coordinance to Model

This commit is contained in:
2018-03-16 23:06:09 -05:00
parent 4f4fb7b7ca
commit b35edcc7aa
6 changed files with 2400 additions and 7 deletions

View File

@@ -9,7 +9,8 @@ class IMICFPS
super(window_width, window_height, fullscreen)
# super(Gosu.screen_width, Gosu.screen_height, true)
$window = self
@model = Wavefront::Model.new("objects/cube.obj")
@model = Wavefront::Model.new("objects/biped.obj")
@model2 = Wavefront::Model.new("objects/tree.obj")
# @model = Wavefront::Model.new("objects/sponza.obj")
@camera = Wavefront::Model::Vertex.new(0,-1,0)
@camera_target = Wavefront::Model::Vertex.new(0,-1,0)
@@ -68,7 +69,8 @@ class IMICFPS
gluLookAt(@camera.x,@camera.y,@camera.z, @angle_x,@angle_y,0, 0,1,0)
color = [@c1, @c2, @c3]
@model.draw(1)
@model.draw(0, 0, 0, 0.005)
@model2.draw(5, 0, 0, 0.005)
end