Commit b6739e56 authored by Jan Möbius's avatar Jan Möbius

Dennis:

Core 

Move View object marker to viewerproperties


git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@6652 383ad7c9-94d9-4d36-a494-682f7c89f535
parent b4b3b104
......@@ -94,12 +94,6 @@ static Viewer::ViewerProperties dummyProperties;
*/
static ViewObjectMarker* defaultMarker_ = 0;
/** \brief DONT USE DIRECTLY!!
*
* This pointer is used internally
*/
static ViewObjectMarker* currentMarker_ = 0;
/** \brief DONT USE DIRECTLY!!
*
* This pointer is used internally
......@@ -595,15 +589,10 @@ ACG::Vec3d upVector(int _viewer) {
return viewerProperties().glState().up();
}
void setViewObjectMarker(ViewObjectMarker * _marker)
{
currentMarker_ = _marker;
}
ViewObjectMarker * currentViewObjectMarker()
{
return currentMarker_;
for ( uint i = 0 ; i < examiner_widgets_.size(); ++i )
PluginFunctions::viewerProperties(i).objectMarker(_marker);
}
void setDefaultViewObjectMarker(ViewObjectMarker * _marker)
......
......@@ -310,10 +310,6 @@ QPoint mapToLocal( const QPoint _point );
DLLEXPORT
void setViewObjectMarker (ViewObjectMarker *_marker);
/// Get the current ViewObjectMarker
DLLEXPORT
ViewObjectMarker* currentViewObjectMarker ();
/** Set the default ViewObjectMarker
*
* @param _marker Object marker
......
......@@ -55,6 +55,9 @@
#include <ACG/Scenegraph/SceneGraph.hh>
#include <ACG/GL/GLState.hh>
// forward declaration
class ViewObjectMarker;
namespace Viewer {
/// How to react on mouse events?
......@@ -325,6 +328,20 @@ namespace Viewer {
/// Pointer to the glState of the Viewer
ACG::GLState* glState_;
//===========================================================================
public slots:
/// set object marker for viewer
void objectMarker (ViewObjectMarker* _marker) { objectMarker_ = _marker; emit updated(); }
/// current object marker
ViewObjectMarker* objectMarker() { return objectMarker_; };
private:
ViewObjectMarker *objectMarker_;
//===========================================================================
/** @} */
......
......@@ -101,7 +101,7 @@
#endif
#include <OpenFlipper/BasePlugin/PluginFunctions.hh>
#include <OpenFlipper/BasePlugin/ViewObjectMarker.hh>
#include <OpenFlipper/common/ViewObjectMarker.hh>
#include <OpenFlipper/common/GlobalOptions.hh>
......@@ -516,7 +516,7 @@ void glViewer::drawScene_mono()
{
if (! properties_.renderPicking() ) {
ViewObjectMarker *oM = PluginFunctions::currentViewObjectMarker ();
ViewObjectMarker *oM = properties_.objectMarker();
GLuint refBits = 0;
QSet<GLuint> references;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment