Class: Kamelopard::Lod
- Inherits:
-
Object
- Object
- Kamelopard::Lod
- Defined in:
- lib/kamelopard/classes.rb
Overview
Corresponds to the LOD (Level of Detail) object
Instance Attribute Summary collapse
-
#maxfade ⇒ Object
Returns the value of attribute maxfade.
-
#maxpixels ⇒ Object
Returns the value of attribute maxpixels.
-
#minfade ⇒ Object
Returns the value of attribute minfade.
-
#minpixels ⇒ Object
Returns the value of attribute minpixels.
Instance Method Summary collapse
-
#initialize(minpixels, maxpixels, minfade, maxfade) ⇒ Lod
constructor
A new instance of Lod.
- #to_kml(elem = nil) ⇒ Object
Constructor Details
#initialize(minpixels, maxpixels, minfade, maxfade) ⇒ Lod
Returns a new instance of Lod.
1712 1713 1714 1715 1716 1717 |
# File 'lib/kamelopard/classes.rb', line 1712 def initialize(minpixels, maxpixels, minfade, maxfade) @minpixels = minpixels @maxpixels = maxpixels @minfade = minfade @maxfade = maxfade end |
Instance Attribute Details
#maxfade ⇒ Object
Returns the value of attribute maxfade.
1711 1712 1713 |
# File 'lib/kamelopard/classes.rb', line 1711 def maxfade @maxfade end |
#maxpixels ⇒ Object
Returns the value of attribute maxpixels.
1711 1712 1713 |
# File 'lib/kamelopard/classes.rb', line 1711 def maxpixels @maxpixels end |
#minfade ⇒ Object
Returns the value of attribute minfade.
1711 1712 1713 |
# File 'lib/kamelopard/classes.rb', line 1711 def minfade @minfade end |
#minpixels ⇒ Object
Returns the value of attribute minpixels.
1711 1712 1713 |
# File 'lib/kamelopard/classes.rb', line 1711 def minpixels @minpixels end |
Instance Method Details
#to_kml(elem = nil) ⇒ Object
1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 |
# File 'lib/kamelopard/classes.rb', line 1719 def to_kml(elem = nil) k = XML::Node.new 'Lod' m = XML::Node.new 'minLodPixels' m << @minpixels.to_s k << m m = XML::Node.new 'maxLodPixels' m << @maxpixels.to_s k << m m = XML::Node.new 'minFadeExtent' m << @minfade.to_s k << m m = XML::Node.new 'maxFadeExtent' m << @maxfade.to_s k << m elem << k unless elem.nil? k end |