Rev | Line | |
---|
[262] | 1 | #pragma once |
---|
| 2 | |
---|
| 3 | #include "terrainModificationTechnique.h" |
---|
| 4 | |
---|
| 5 | |
---|
| 6 | terrainModificationTechnique::terrainModificationTechnique() |
---|
| 7 | { |
---|
| 8 | |
---|
| 9 | } |
---|
| 10 | |
---|
| 11 | terrainModificationTechnique::~terrainModificationTechnique() |
---|
| 12 | { |
---|
| 13 | |
---|
| 14 | } |
---|
| 15 | |
---|
[269] | 16 | |
---|
[270] | 17 | |
---|
| 18 | region::region(osg::HeightField& h) |
---|
[269] | 19 | { |
---|
[270] | 20 | _lat_min = h.getOrigin()[1]; |
---|
| 21 | _lat_max = _lat_min + h.getNumRows() * h.getYInterval(); |
---|
| 22 | _lon_min = h.getOrigin()[0]; |
---|
| 23 | _lon_max = _lon_min + h.getNumColumns() * h.getXInterval(); |
---|
[269] | 24 | } |
---|
| 25 | |
---|
| 26 | bool region::isInside(region& outsider) |
---|
| 27 | { |
---|
[270] | 28 | if( outsider._lat_min <= _lat_min && _lat_max <= outsider._lat_max && |
---|
| 29 | outsider._lon_min <= _lon_min && _lon_max <= outsider._lon_max ) |
---|
[269] | 30 | return true; |
---|
| 31 | else |
---|
| 32 | return false; |
---|
| 33 | } |
---|
| 34 | |
---|
| 35 | bool region::isFullOrPartiallyInside(region& outsider) |
---|
| 36 | { |
---|
[270] | 37 | if( outsider._lat_min < _lat_max && _lat_min < outsider._lat_max && |
---|
| 38 | outsider._lon_min < _lon_max && _lon_min < outsider._lon_max ) |
---|
[269] | 39 | return true; |
---|
| 40 | else |
---|
| 41 | return false; |
---|
[270] | 42 | } |
---|
| 43 | |
---|
Note: See
TracBrowser
for help on using the repository browser.