Class: ViewVolume

Inherits:
Object
  • Object
show all
Defined in:
lib/kamelopard/classes.rb

Overview

Supporting object for the PhotoOverlay class

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(near, leftFov = -45,, rightFov = 45, bottomFov = -45,, topFov = 45) ⇒ ViewVolume

Returns a new instance of ViewVolume.



1340
1341
1342
1343
1344
1345
1346
# File 'lib/kamelopard/classes.rb', line 1340

def initialize(near, leftFov = -45, rightFov = 45, bottomFov = -45, topFov = 45)
    @leftFov = leftFov
    @rightFov = rightFov
    @bottomFov = bottomFov
    @topFov = topFov
    @near = near
end

Instance Attribute Details

#bottomFovObject

Returns the value of attribute bottomFov.



1339
1340
1341
# File 'lib/kamelopard/classes.rb', line 1339

def bottomFov
  @bottomFov
end

#leftFovObject

Returns the value of attribute leftFov.



1339
1340
1341
# File 'lib/kamelopard/classes.rb', line 1339

def leftFov
  @leftFov
end

#nearObject

Returns the value of attribute near.



1339
1340
1341
# File 'lib/kamelopard/classes.rb', line 1339

def near
  @near
end

#rightFovObject

Returns the value of attribute rightFov.



1339
1340
1341
# File 'lib/kamelopard/classes.rb', line 1339

def rightFov
  @rightFov
end

#topFovObject

Returns the value of attribute topFov.



1339
1340
1341
# File 'lib/kamelopard/classes.rb', line 1339

def topFov
  @topFov
end

Instance Method Details

#to_kml(indent = 0) ⇒ Object



1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
# File 'lib/kamelopard/classes.rb', line 1348

def to_kml(indent = 0)

    <<-viewvolume
#{ ' ' * indent }<ViewVolume>
#{ ' ' * indent }    <near>#{@near}</near>
#{ ' ' * indent }    <leftFov>#{@leftFov}</leftFov>
#{ ' ' * indent }    <rightFov>#{@rightFov}</rightFov>
#{ ' ' * indent }    <bottomFov>#{@bottomFov}</bottomFov>
#{ ' ' * indent }    <topFov>#{@topFov}</topFov>
#{ ' ' * indent }</ViewVolume>
    viewvolume
end