Changeset 13041 for OpenSceneGraph/trunk/src/osgTerrain/Locator.cpp
- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
-
OpenSceneGraph/trunk/src/osgTerrain/Locator.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osgTerrain/Locator.cpp
r12292 r13041 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 2 2 * 3 * This library is open source and may be redistributed and/or modified under 4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 3 * This library is open source and may be redistributed and/or modified under 4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 5 5 * (at your option) any later version. The full license is in LICENSE file 6 6 * included with this distribution, and on the openscenegraph.org website. 7 * 7 * 8 8 * This library is distributed in the hope that it will be useful, 9 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 11 * OpenSceneGraph Public License for more details. 12 12 */ … … 52 52 0.0, maxY-minY, 0.0, 0.0, 53 53 0.0, 0.0, 1.0, 0.0, 54 minX, minY, 0.0, 1.0); 54 minX, minY, 0.0, 1.0); 55 55 56 56 _inverse.invert(_transform); … … 102 102 topRight.y() = osg::maximum( topRight.y(), itr->y()); 103 103 } 104 104 105 105 return true; 106 106 } … … 118 118 { 119 119 osg::Vec3d geographic = local * _transform; 120 120 121 121 _ellipsoidModel->convertLatLongHeightToXYZ(geographic.y(), geographic.x(), geographic.z(), 122 122 world.x(), world.y(), world.z()); 123 return true; 123 return true; 124 124 } 125 125 case(GEOGRAPHIC): 126 { 126 { 127 127 world = local * _transform; 128 return true; 128 return true; 129 129 } 130 130 case(PROJECTED): 131 { 131 { 132 132 world = local * _transform; 133 return true; 133 return true; 134 134 } 135 } 135 } 136 136 137 137 return false; … … 143 143 { 144 144 case(GEOCENTRIC): 145 { 145 { 146 146 double longitude, latitude, height; 147 147 … … 151 151 local = osg::Vec3d(longitude, latitude, height) * _inverse; 152 152 153 return true; 153 return true; 154 154 } 155 155 case(GEOGRAPHIC): 156 { 156 { 157 157 local = world * _inverse; 158 158 159 return true; 159 return true; 160 160 } 161 161 case(PROJECTED): 162 { 162 { 163 163 local = world * _inverse; 164 return true; 164 return true; 165 165 } 166 } 166 } 167 167 168 168 return false;
