From f75a7c6294a9815b4b2188f4657ac3e217165929 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 9 Jun 2004 15:11:27 +0000 Subject: [PATCH] Added CoordinateSystemNode::set(const CoordinateSystemNode&) method to conviniently set up a coordindate system. --- include/osg/CoordinateSystemNode | 3 +++ src/osg/CoordinateSystemNode.cpp | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/include/osg/CoordinateSystemNode b/include/osg/CoordinateSystemNode index 727f4a649..e6ed8b0ea 100644 --- a/include/osg/CoordinateSystemNode +++ b/include/osg/CoordinateSystemNode @@ -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; } diff --git a/src/osg/CoordinateSystemNode.cpp b/src/osg/CoordinateSystemNode.cpp index e234fbace..c44d9d26c 100644 --- a/src/osg/CoordinateSystemNode.cpp +++ b/src/osg/CoordinateSystemNode.cpp @@ -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())