Class: Disp3D::NodeTris

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

Constant Summary collapse

NORMAL_EACH_FACE =
0
NORMAL_EACH_VERTEX =
1

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(geom, name = nil) ⇒ NodeTris

Returns a new instance of NodeTris.



10
11
12
13
14
15
16
17
18
19
# File 'lib/node/node_tris.rb', line 10

def initialize(geom, name = nil)
  Util3D.check_arg_type(Symbol, name, true)
  geom_inner = geom
  if(geom.kind_of?(STL))
    geom_inner = geom.tri_mesh
  end
  Util3D.check_arg_type(GMath3D::TriMesh, geom_inner, false)
  super(geom_inner, name)
  @normal_mode = NORMAL_EACH_VERTEX
end