Changeset 13041 for OpenSceneGraph/trunk/include/osg/CoordinateSystemNode
- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/include/osg/CoordinateSystemNode
r10536 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 */ … … 25 25 26 26 /** EllipsoidModel encapsulates the ellipsoid used to model astronomical bodies, 27 * such as sun, planets, moon etc. 27 * such as sun, planets, moon etc. 28 28 * All distance quantities (i.e. heights + radius) are in meters, 29 29 * and latitude and longitude are in radians.*/ … … 88 88 }; 89 89 90 /** CoordinateFrame encapsulates the orientation of east, north and up.*/ 90 /** CoordinateFrame encapsulates the orientation of east, north and up.*/ 91 91 typedef Matrixd CoordinateFrame; 92 92 … … 103 103 /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ 104 104 CoordinateSystemNode(const CoordinateSystemNode&,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); 105 105 106 106 META_Node(osg,CoordinateSystemNode); 107 108 107 108 109 109 /** Set the coordinate system node up by copying the format, coordinate system string, and ellipsoid model of another coordinate system node.*/ 110 110 void set(const CoordinateSystemNode& csn); 111 111 112 112 /** Set the coordinate system format string. Typical values would be WKT, PROJ4, USGS etc.*/ 113 113 void setFormat(const std::string& format) { _format = format; } 114 114 115 115 /** Get the coordinate system format string.*/ 116 116 const std::string& getFormat() const { return _format; } … … 118 118 /** Set the CoordinateSystem reference string, should be stored in a form consistent with the Format.*/ 119 119 void setCoordinateSystem(const std::string& cs) { _cs = cs; } 120 120 121 121 /** Get the CoordinateSystem reference string.*/ 122 122 const std::string& getCoordinateSystem() const { return _cs; } 123 124 123 124 125 125 /** Set EllipsoidModel to describe the model used to map lat, long and height into geocentric XYZ and back. */ 126 126 void setEllipsoidModel(EllipsoidModel* ellipsode) { _ellipsoidModel = ellipsode; } 127 127 128 128 /** Get the EllipsoidModel.*/ 129 129 EllipsoidModel* getEllipsoidModel() { return _ellipsoidModel.get(); } 130 130 131 131 /** Get the const EllipsoidModel.*/ 132 132 const EllipsoidModel* getEllipsoidModel() const { return _ellipsoidModel.get(); } 133 133 134 134 /** Compute the local coordinate frame for specified point.*/ 135 135 CoordinateFrame computeLocalCoordinateFrame(const Vec3d& position) const; 136 136 137 137 /** Compute the local up-vector for specified point.*/ 138 138 osg::Vec3d computeLocalUpVector(const Vec3d& position) const; … … 141 141 142 142 virtual ~CoordinateSystemNode() {} 143 143 144 144 std::string _format; 145 145 std::string _cs;
