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

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; ...@@ -94,12 +94,6 @@ static Viewer::ViewerProperties dummyProperties;
*/ */
static ViewObjectMarker* defaultMarker_ = 0; static ViewObjectMarker* defaultMarker_ = 0;
/** \brief DONT USE DIRECTLY!!
*
* This pointer is used internally
*/
static ViewObjectMarker* currentMarker_ = 0;
/** \brief DONT USE DIRECTLY!! /** \brief DONT USE DIRECTLY!!
* *
* This pointer is used internally * This pointer is used internally
...@@ -595,15 +589,10 @@ ACG::Vec3d upVector(int _viewer) { ...@@ -595,15 +589,10 @@ ACG::Vec3d upVector(int _viewer) {
return viewerProperties().glState().up(); return viewerProperties().glState().up();
} }
void setViewObjectMarker(ViewObjectMarker * _marker) void setViewObjectMarker(ViewObjectMarker * _marker)
{ {
currentMarker_ = _marker; for ( uint i = 0 ; i < examiner_widgets_.size(); ++i )
} PluginFunctions::viewerProperties(i).objectMarker(_marker);
ViewObjectMarker * currentViewObjectMarker()
{
return currentMarker_;
} }
void setDefaultViewObjectMarker(ViewObjectMarker * _marker) void setDefaultViewObjectMarker(ViewObjectMarker * _marker)
......
...@@ -310,10 +310,6 @@ QPoint mapToLocal( const QPoint _point ); ...@@ -310,10 +310,6 @@ QPoint mapToLocal( const QPoint _point );
DLLEXPORT DLLEXPORT
void setViewObjectMarker (ViewObjectMarker *_marker); void setViewObjectMarker (ViewObjectMarker *_marker);
/// Get the current ViewObjectMarker
DLLEXPORT
ViewObjectMarker* currentViewObjectMarker ();
/** Set the default ViewObjectMarker /** Set the default ViewObjectMarker
* *
* @param _marker Object marker * @param _marker Object marker
......
...@@ -55,6 +55,9 @@ ...@@ -55,6 +55,9 @@
#include <ACG/Scenegraph/SceneGraph.hh> #include <ACG/Scenegraph/SceneGraph.hh>
#include <ACG/GL/GLState.hh> #include <ACG/GL/GLState.hh>
// forward declaration
class ViewObjectMarker;
namespace Viewer { namespace Viewer {
/// How to react on mouse events? /// How to react on mouse events?
...@@ -325,6 +328,20 @@ namespace Viewer { ...@@ -325,6 +328,20 @@ namespace Viewer {
/// Pointer to the glState of the Viewer /// Pointer to the glState of the Viewer
ACG::GLState* glState_; 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 @@ ...@@ -101,7 +101,7 @@
#endif #endif
#include <OpenFlipper/BasePlugin/PluginFunctions.hh> #include <OpenFlipper/BasePlugin/PluginFunctions.hh>
#include <OpenFlipper/BasePlugin/ViewObjectMarker.hh> #include <OpenFlipper/common/ViewObjectMarker.hh>
#include <OpenFlipper/common/GlobalOptions.hh> #include <OpenFlipper/common/GlobalOptions.hh>
...@@ -516,7 +516,7 @@ void glViewer::drawScene_mono() ...@@ -516,7 +516,7 @@ void glViewer::drawScene_mono()
{ {
if (! properties_.renderPicking() ) { if (! properties_.renderPicking() ) {
ViewObjectMarker *oM = PluginFunctions::currentViewObjectMarker (); ViewObjectMarker *oM = properties_.objectMarker();
GLuint refBits = 0; GLuint refBits = 0;
QSet<GLuint> references; 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