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.
1644 1645 1646 1647 1648 1649 |
# File 'lib/kamelopard/classes.rb', line 1644 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.
1643 1644 1645 |
# File 'lib/kamelopard/classes.rb', line 1643 def maxfade @maxfade end |
#maxpixels ⇒ Object
Returns the value of attribute maxpixels.
1643 1644 1645 |
# File 'lib/kamelopard/classes.rb', line 1643 def maxpixels @maxpixels end |
#minfade ⇒ Object
Returns the value of attribute minfade.
1643 1644 1645 |
# File 'lib/kamelopard/classes.rb', line 1643 def minfade @minfade end |
#minpixels ⇒ Object
Returns the value of attribute minpixels.
1643 1644 1645 |
# File 'lib/kamelopard/classes.rb', line 1643 def minpixels @minpixels end |
Instance Method Details
#to_kml(elem = nil) ⇒ Object
1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 |
# File 'lib/kamelopard/classes.rb', line 1651 def to_kml(elem = nil) k = REXML::Element.new 'Lod' m = REXML::Element.new 'minLodPixels' m.text = @minpixels k.elements << m m = REXML::Element.new 'maxLodPixels' m.text = @maxpixels k.elements << m m = REXML::Element.new 'minFadeExtent' m.text = @minfade k.elements << m m = REXML::Element.new 'maxFadeExtent' m.text = @maxfade k.elements << m elem.elements << k unless elem.nil? k end |