Class: RQuad::QuadTreePayload

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

Overview

A payload for a QuadTree. Hs accessors for vector, data, and node.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(v, d, n = nil) ⇒ QuadTreePayload

Initialize a QuadTreePayload with a Vector, some data (any class).



42
43
44
45
46
# File 'lib/rquad/quadtree.rb', line 42

def initialize(v, d, n = nil)
  self.node = n
  self.vector = v
  self.data = d
end

Instance Attribute Details

#dataObject

Returns the value of attribute data.



39
40
41
# File 'lib/rquad/quadtree.rb', line 39

def data
  @data
end

#nodeObject

Returns the value of attribute node.



39
40
41
# File 'lib/rquad/quadtree.rb', line 39

def node
  @node
end

#vectorObject

Returns the value of attribute vector.



39
40
41
# File 'lib/rquad/quadtree.rb', line 39

def vector
  @vector
end