Class: VisiLibity::BoundingBox

Inherits:
Object
  • Object
show all
Defined in:
lib/visilibity.rb

Overview

C++ structs only get 0-arg constructors in swig. Trickery to override that.

Class Method Summary collapse

Class Method Details

.new(x_min, x_max, y_min, y_max) ⇒ Object



32
33
34
35
36
37
38
# File 'lib/visilibity.rb', line 32

def self.new(x_min, x_max, y_min, y_max)
  bb = allocate
  bb.send(:initialize)
  bb.x_min, bb.x_max = x_min, x_max
  bb.y_min, bb.y_max = y_min, y_max
  bb
end