Class: Disp3D::NodeText

Inherits:
NodeLeaf show all
Defined in:
lib/node/node_text.rb

Instance Attribute Summary

Attributes inherited from Node

#instance_id, #name, #parents

Instance Method Summary collapse

Methods inherited from NodeLeaf

#box, #draw, #update_for_display

Methods inherited from Node

#ancestors, #post_draw, #pre_draw

Constructor Details

#initialize(position, name = nil, text = nil) ⇒ NodeText

Returns a new instance of NodeText.



8
9
10
11
12
13
14
15
16
# 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