Class: Kamelopard::ViewVolume
- Inherits:
-
Object
- Object
- Kamelopard::ViewVolume
- Defined in:
- lib/kamelopard/classes.rb
Overview
Supporting object for the PhotoOverlay class
Instance Attribute Summary collapse
-
#bottomFov ⇒ Object
Returns the value of attribute bottomFov.
-
#leftFov ⇒ Object
Returns the value of attribute leftFov.
-
#near ⇒ Object
Returns the value of attribute near.
-
#rightFov ⇒ Object
Returns the value of attribute rightFov.
-
#topFov ⇒ Object
Returns the value of attribute topFov.
Instance Method Summary collapse
-
#initialize(near, leftFov = -45,, rightFov = 45, bottomFov = -45,, topFov = 45) ⇒ ViewVolume
constructor
A new instance of ViewVolume.
- #to_kml(elem = nil) ⇒ Object
Constructor Details
#initialize(near, leftFov = -45,, rightFov = 45, bottomFov = -45,, topFov = 45) ⇒ ViewVolume
Returns a new instance of ViewVolume.
1445 1446 1447 1448 1449 1450 1451 |
# File 'lib/kamelopard/classes.rb', line 1445 def initialize(near, leftFov = -45, rightFov = 45, bottomFov = -45, topFov = 45) @leftFov = leftFov @rightFov = rightFov @bottomFov = bottomFov @topFov = topFov @near = near end |
Instance Attribute Details
#bottomFov ⇒ Object
Returns the value of attribute bottomFov.
1444 1445 1446 |
# File 'lib/kamelopard/classes.rb', line 1444 def bottomFov @bottomFov end |
#leftFov ⇒ Object
Returns the value of attribute leftFov.
1444 1445 1446 |
# File 'lib/kamelopard/classes.rb', line 1444 def leftFov @leftFov end |
#near ⇒ Object
Returns the value of attribute near.
1444 1445 1446 |
# File 'lib/kamelopard/classes.rb', line 1444 def near @near end |
#rightFov ⇒ Object
Returns the value of attribute rightFov.
1444 1445 1446 |
# File 'lib/kamelopard/classes.rb', line 1444 def rightFov @rightFov end |
#topFov ⇒ Object
Returns the value of attribute topFov.
1444 1445 1446 |
# File 'lib/kamelopard/classes.rb', line 1444 def topFov @topFov end |
Instance Method Details
#to_kml(elem = nil) ⇒ Object
1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 |
# File 'lib/kamelopard/classes.rb', line 1453 def to_kml(elem = nil) p = REXML::Element.new 'ViewVolume' { :near => @near, :leftFov => @leftFov, :rightFov => @rightFov, :topFov => @topFov, :bottomFov => @bottomFov }.each do |k, v| d = REXML::Element.new k.to_s d.text = v p << d end elem << p unless elem.nil? p end |