Added constructor for ObserverFrame that takes a generic ReferenceFrame.

ver1_6_1
Chris Laurel 2008-02-22 23:28:51 +00:00
parent 46b809ecf3
commit 6538111e75
2 changed files with 19 additions and 1 deletions

View File

@ -1416,6 +1416,10 @@ ObserverFrame::ObserverFrame() :
}
/*! Create a new frame with the specified coordinate system and
* reference object. The targetObject is only needed for phase
* lock frames; the argument is ignored for other frames.
*/
ObserverFrame::ObserverFrame(CoordinateSystem _coordSys,
const Selection& _refObject,
const Selection& _targetObject) :
@ -1428,6 +1432,18 @@ ObserverFrame::ObserverFrame(CoordinateSystem _coordSys,
}
/*! Create a new ObserverFrame with the specified reference frame.
* The coordinate system of this frame will be marked as unknown.
*/
ObserverFrame::ObserverFrame(const ReferenceFrame &f) :
coordSys(Unknown),
frame(&f)
{
frame->addRef();
}
/*! Copy constructor. */
ObserverFrame::ObserverFrame(const ObserverFrame& f) :
coordSys(f.coordSys),
frame(f.frame),
@ -1603,3 +1619,4 @@ ObserverFrame::createFrame(CoordinateSystem _coordSys,
}
}

View File

@ -52,6 +52,7 @@ public:
const Selection& _refObject,
const Selection& _targetObj = Selection());
ObserverFrame(const ObserverFrame&);
ObserverFrame(const ReferenceFrame& f);
~ObserverFrame();
@ -84,7 +85,7 @@ private:
private:
CoordinateSystem coordSys;
ReferenceFrame* frame;
const ReferenceFrame* frame;
Selection targetObject;
};