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.
2099 2100 2101 2102 2103 2104 |
# File 'lib/kamelopard/classes.rb', line 2099 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.
2098 2099 2100 |
# File 'lib/kamelopard/classes.rb', line 2098 def maxfade @maxfade end |
#maxpixels ⇒ Object
Returns the value of attribute maxpixels.
2098 2099 2100 |
# File 'lib/kamelopard/classes.rb', line 2098 def maxpixels @maxpixels end |
#minfade ⇒ Object
Returns the value of attribute minfade.
2098 2099 2100 |
# File 'lib/kamelopard/classes.rb', line 2098 def minfade @minfade end |
#minpixels ⇒ Object
Returns the value of attribute minpixels.
2098 2099 2100 |
# File 'lib/kamelopard/classes.rb', line 2098 def minpixels @minpixels end |
Instance Method Details
#to_kml(elem = nil) ⇒ Object
2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 |
# File 'lib/kamelopard/classes.rb', line 2106 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 |