Class: Disp3D::Compass
- Inherits:
-
Object
- Object
- Disp3D::Compass
- Defined in:
- lib/compass.rb
Instance Method Summary collapse
- #gl_display(current_view) ⇒ Object
-
#initialize(camera) ⇒ Compass
constructor
A new instance of Compass.
- #update ⇒ Object
Constructor Details
Instance Method Details
#gl_display(current_view) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/compass.rb', line 10 def gl_display current_view GL.PushMatrix() GL.LoadIdentity() GL.Translate(coord_pos.x, coord_pos.y, coord_pos.z) @camera.apply_rotate @coord_node.draw current_view GL.PopMatrix() end |
#update ⇒ Object
19 20 21 |
# File 'lib/compass.rb', line 19 def update @coord_node.length = coord_size end |