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.
2048 2049 2050 2051 2052 2053 |
# File 'lib/kamelopard/classes.rb', line 2048 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.
2047 2048 2049 |
# File 'lib/kamelopard/classes.rb', line 2047 def maxfade @maxfade end |
#maxpixels ⇒ Object
Returns the value of attribute maxpixels.
2047 2048 2049 |
# File 'lib/kamelopard/classes.rb', line 2047 def maxpixels @maxpixels end |
#minfade ⇒ Object
Returns the value of attribute minfade.
2047 2048 2049 |
# File 'lib/kamelopard/classes.rb', line 2047 def minfade @minfade end |
#minpixels ⇒ Object
Returns the value of attribute minpixels.
2047 2048 2049 |
# File 'lib/kamelopard/classes.rb', line 2047 def minpixels @minpixels end |
Instance Method Details
#to_kml(elem = nil) ⇒ Object
2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 |
# File 'lib/kamelopard/classes.rb', line 2055 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 |