class Disp3D::NodeText
Public Class Methods
new(position, name = nil, text = nil)
click to toggle source
Calls superclass method
Disp3D::NodeLeaf::new
# File lib/node/node_text.rb, line 8 def initialize(position, name = nil, text = nil) Util3D.check_arg_type(Vector3, position) Util3D.check_arg_type(Symbol, name, true) Util3D.check_arg_type(String, text, true) super(nil, name) @text = text @position = position end
Protected Instance Methods
draw_element()
click to toggle source
# File lib/node/node_text.rb, line 19 def draw_element if(@text and @position) draw_color GL.RasterPos(@position.x, @position.y, @position.z) @text.bytes.to_a.each do |ascii| GLUT.BitmapCharacter(GLUT::BITMAP_HELVETICA_18, ascii) end end end