Added CoordinateSystemNode::set(const CoordinateSystemNode&) method to conviniently

set up a coordindate system.
This commit is contained in:
Robert Osfield 2004-06-09 15:11:27 +00:00
parent 84c66b7c2e
commit f75a7c6294
2 changed files with 10 additions and 0 deletions

View File

@ -91,6 +91,9 @@ class SG_EXPORT CoordinateSystemNode : public Group
META_Node(osg,CoordinateSystemNode);
/** Set the coodinate system node up by copy the format, coordindate system string, and ellipsoid model of another coordindate system node.*/
void set(const CoordinateSystemNode& csn);
/** Set the coordinate system format string. Typical values would be WKT, PROJ4, USGS etc.*/
void setFormat(const std::string& format) { _format = format; }

View File

@ -35,6 +35,13 @@ CoordinateSystemNode::CoordinateSystemNode(const CoordinateSystemNode& csn,const
{
}
void CoordinateSystemNode::set(const CoordinateSystemNode& csn)
{
_format = csn._format;
_cs = csn._cs;
_ellipsoidModel = csn._ellipsoidModel;
}
CoordinateFrame CoordinateSystemNode::computeLocalCoordinateFrame(const Vec3d& position) const
{
if (_ellipsoidModel.valid())