Class: RQuad::QuadTreePayload
- Inherits:
-
Object
- Object
- RQuad::QuadTreePayload
- Defined in:
- lib/rquad/quadtree.rb
Overview
A payload for a QuadTree. Hs accessors for vector, data, and node.
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#node ⇒ Object
Returns the value of attribute node.
-
#vector ⇒ Object
Returns the value of attribute vector.
Instance Method Summary collapse
-
#initialize(v, d, n = nil) ⇒ QuadTreePayload
constructor
Initialize a QuadTreePayload with a Vector, some data (any class).
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
#data ⇒ Object
Returns the value of attribute data.
39 40 41 |
# File 'lib/rquad/quadtree.rb', line 39 def data @data end |
#node ⇒ Object
Returns the value of attribute node.
39 40 41 |
# File 'lib/rquad/quadtree.rb', line 39 def node @node end |
#vector ⇒ Object
Returns the value of attribute vector.
39 40 41 |
# File 'lib/rquad/quadtree.rb', line 39 def vector @vector end |