Added constructor for ObserverFrame that takes a generic ReferenceFrame.
parent
46b809ecf3
commit
6538111e75
|
@ -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,
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue