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.
2267 2268 2269 2270 2271 2272 |
# File 'lib/kamelopard/classes.rb', line 2267 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.
2266 2267 2268 |
# File 'lib/kamelopard/classes.rb', line 2266 def maxfade @maxfade end |
#maxpixels ⇒ Object
Returns the value of attribute maxpixels.
2266 2267 2268 |
# File 'lib/kamelopard/classes.rb', line 2266 def maxpixels @maxpixels end |
#minfade ⇒ Object
Returns the value of attribute minfade.
2266 2267 2268 |
# File 'lib/kamelopard/classes.rb', line 2266 def minfade @minfade end |
#minpixels ⇒ Object
Returns the value of attribute minpixels.
2266 2267 2268 |
# File 'lib/kamelopard/classes.rb', line 2266 def minpixels @minpixels end |
Instance Method Details
#to_kml(elem = nil) ⇒ Object
2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 |
# File 'lib/kamelopard/classes.rb', line 2274 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 |