summaryrefslogtreecommitdiffstats
path: root/qtruby/rubylib/examples/ruboids/ruboids/Camera.rb
blob: 787fc4af3abb1c19b79bbe9212ab13b9d297ed14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#
# Copyright (c) 2001 by Jim Menard <jimm@io.com>
#
# Released under the same license as Ruby. See
# http://www.ruby-lang.org/en/LICENSE.txt.
#

require 'Params'

class Camera

    attr_accessor :position, :rotation, :zoom

    def initialize
	@position = Point.new($PARAMS['camera_x'],
			      $PARAMS['camera_y'],
			      $PARAMS['camera_z'])
	@rotation = Point.new($PARAMS['camera_rot_x'],
			      $PARAMS['camera_rot_y'],
			      $PARAMS['camera_rot_z'])
	@zoom = $PARAMS['camera_zoom']
    end
end