OpendTect-6_4  6.4
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Static Private Member Functions | List of all members
visBase::MarkerSet Class Reference

MarkerSet is a set of basic pickmarker with a constant size on screen. Size and shape are settable. More...

Inheritance diagram for visBase::MarkerSet:
[legend]

Public Types

enum  AutoRotateMode { NO_ROTATION, ROTATE_TO_SCREEN, ROTATE_TO_CAMERA, ROTATE_TO_AXIS }
 

Public Member Functions

 MarkerSet ()
 
virtual const char * getClassName () const
 
CoordinatesgetCoordinates ()
 
const CoordinatesgetCoordinates () const
 
NormalsgetNormals ()
 
void setMaterial (visBase::Material *)
 If material is null, markers will be single color. More...
 
void setMarkersSingleColor (const Color &singlecolor)
 
Color getMarkersSingleColor () const
 
bool usesSingleColor () const
 
void getColorArray (TypeSet< Color > &colors) const
 
void setMarkerStyle (const MarkerStyle3D &)
 
MarkerStyle3DgetMarkerStyle ()
 
const MarkerStyle3DgetMarkerStyle () const
 
void setType (MarkerStyle3D::Type)
 
MarkerStyle3D::Type getType () const
 
void setScreenSize (float)
 
float getScreenSize () const
 
void setMarkerHeightRatio (float)
 
float getMarkerHeightRatio () const
 
void setMinimumScale (float)
 
float getMinimumScale () const
 
void setMaximumScale (float)
 
float getMaximumScale () const
 
void setAutoRotateMode (AutoRotateMode)
 
void setRotationForAllMarkers (const Coord3 &, const float)
 
void setSingleMarkerRotation (const Quaternion &, int)
 
void applyRotationToAllMarkers (bool)
 
void doFaceCamera (bool yn)
 
bool facesCamera () const
 
void setDisplayTransformation (const visBase::Transformation *)
 
const visBase::TransformationgetDisplayTransformation () const
 
void setPixelDensity (float)
 
float getPixelDensity () const
 
void removeMarker (int idx)
 
void clearMarkers ()
 Removes all markers. More...
 
void turnMarkerOn (unsigned int idx, bool)
 
void turnAllMarkersOn (bool)
 
bool markerOn (unsigned int)
 
int findClosestMarker (const Coord3 &, bool scenespace=false)
 
int findMarker (const Coord3 &, const Coord3 &eps, bool scenespace=false)
 
void setMarkerResolution (float res)
 
int size () const
 
int addPos (const Coord3 &, bool draw=true)
 
void setPos (int, const Coord3 &, bool draw=true)
 
void insertPos (int, const Coord3 &, bool draw=true)
 
void forceRedraw (bool)
 
void addPolygonOffsetNodeState ()
 
void removePolygonOffsetNodeState ()
 
- Public Member Functions inherited from visBase::VisualObjectImpl
void setRightHandSystem (bool yn)
 
bool isRightHandSystem () const
 
void setLockable ()
 
void readLock ()
 
void readUnLock ()
 
bool tryReadLock ()
 
void writeLock ()
 
void writeUnLock ()
 
bool tryWriteLock ()
 
void setMaterial (Material *)
 
const MaterialgetMaterial () const
 
MaterialgetMaterial ()
 
virtual bool usePar (const IOPar &)
 
virtual void fillPar (IOPar &) const
 
- Public Member Functions inherited from visBase::VisualObject
virtual bool getBoundingBox (Coord3 &min, Coord3 &max) const
 
virtual void setSceneEventCatcher (EventCatcher *)
 
void setSelectable (bool yn)
 
bool selectable () const
 
NotifierAccessselection ()
 
NotifierAccessdeSelection ()
 
virtual NotifierAccessrightClicked ()
 
const EventInforightClickedEventInfo () const
 
const TypeSet< int > * rightClickedPath () const
 
- Public Member Functions inherited from visBase::DataObject
virtual bool isOK () const
 
int id () const
 
void setID (int nid)
 
uiString name () const
 
virtual void setName (const uiString &)
 
osg::Node * osgNode (bool skipswitch=false)
 
const osg::Node * osgNode (bool skipswitch=false) const
 
void enableTraversal (unsigned int mask, bool yn=true)
 
bool isTraversalEnabled (unsigned int mask) const
 
SoNode * getInventorNode ()
 
const SoNode * getInventorNode () const
 
virtual bool turnOn (bool yn)
 
virtual bool isOn () const
 
bool isPickable (bool actively=true) const
 
void setPickable (bool actively, bool passively=true)
 
virtual bool rightClickable () const
 
void select () const
 
void deSelect () const
 
void updateSel () const
 
virtual bool isSelected () const
 
virtual const char * errMsg () const
 
bool serialize (const char *filename, bool binary=false)
 
void setParent (DataObjectGroup *g)
 
template<class T >
T * addNodeState (T *ns)
 
NodeStateremoveNodeState (NodeState *)
 
NodeStategetNodeState (int idx)
 
- Public Member Functions inherited from CallBacker
 CallBacker ()
 
 CallBacker (const CallBacker &)
 
virtual ~CallBacker ()
 
bool attachCB (NotifierAccess &, const CallBack &, bool onlyifnew=false)
 
bool attachCB (NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false)
 
void detachCB (NotifierAccess &, const CallBack &)
 
void detachCB (NotifierAccess *notif, const CallBack &cb)
 
bool isNotifierAttached (NotifierAccess *) const
 Only for debugging purposes, don't use. More...
 

Static Public Member Functions

static MarkerSetcreate ()
 
static void initClass ()
 
static const char * getStaticClassName ()
 
static const char * sFactoryKeyword ()
 
static float cDefaultScreenSize ()
 
- Static Public Member Functions inherited from visBase::VisualObjectImpl
static const char * sKeyMaterialID ()
 
static const char * sKeyMaterial ()
 
static const char * sKeyIsOn ()
 
- Static Public Member Functions inherited from visBase::DataObject
static int getID (const osg::Node *)
 
static float getDefaultPixelDensity ()
 
static void setVisualizationThread (const void *)
 Call only once from initialization. More...
 
static bool isVisualizationThread ()
 
static void requestSingleRedraw ()
 
static void setCommonViewer (osgViewer::CompositeViewer *)
 
static osgViewer::CompositeViewer * getCommonViewer ()
 

Protected Member Functions

void materialChangeCB (CallBacker *)
 
 ~MarkerSet ()
 
- Protected Member Functions inherited from visBase::VisualObjectImpl
int addChild (osg::Node *)
 
void insertChild (int pos, osg::Node *)
 
void removeChild (osg::Node *)
 
int childIndex (const osg::Node *) const
 
 VisualObjectImpl (bool selectable)
 
virtual ~VisualObjectImpl ()
 
virtual void setGroupNode (osg::Group *)
 Must be called during construction. More...
 
- Protected Member Functions inherited from visBase::VisualObject
void triggerSel ()
 
void triggerDeSel ()
 
void triggerRightClick (const EventInfo *)
 
 VisualObject (bool selectable=false)
 
 ~VisualObject ()
 
- Protected Member Functions inherited from visBase::DataObject
virtual osg::StateSet * getStateSet ()
 
void doAddNodeState (NodeState *ns)
 
 DataObject ()
 
template<class T >
T * setOsgNode (T *t)
 Must be called during construction. More...
 
void updateNodemask ()
 
- Protected Member Functions inherited from CallBacker
void detachAllNotifiers ()
 Call from the destructor of your inherited object. More...
 

Protected Attributes

RefMan< Coordinatescoords_
 
RefMan< Normalsnormals_
 
RefMan< const visBase::Transformationdisplaytrans_
 
osgGeo::MarkerSet * markerset_
 
MarkerStyle3D markerstyle_
 
float pixeldensity_
 
float rotationangle_
 
Coord3 rotationvec_
 
PolygonOffsetoffset_
 
osg::Array * onoffarr_
 
- Protected Attributes inherited from visBase::VisualObjectImpl
Materialmaterial_
 
bool righthandsystem_
 
- Protected Attributes inherited from visBase::DataObject
DataObjectGroupparent_
 

Private Member Functions

MarkerSetoperator= (const MarkerSet &)
 
 MarkerSet (const MarkerSet &)
 

Static Private Member Functions

static visBase::DataObjectcreateInternal ()
 

Detailed Description

MarkerSet is a set of basic pickmarker with a constant size on screen. Size and shape are settable.

Member Enumeration Documentation

Enumerator
NO_ROTATION 
ROTATE_TO_SCREEN 
ROTATE_TO_CAMERA 
ROTATE_TO_AXIS 

Constructor & Destructor Documentation

visBase::MarkerSet::MarkerSet ( const MarkerSet )
private
visBase::MarkerSet::MarkerSet ( )
visBase::MarkerSet::~MarkerSet ( )
protected

Member Function Documentation

void visBase::MarkerSet::addPolygonOffsetNodeState ( )
int visBase::MarkerSet::addPos ( const Coord3 ,
bool  draw = true 
)
void visBase::MarkerSet::applyRotationToAllMarkers ( bool  )
static float visBase::MarkerSet::cDefaultScreenSize ( )
inlinestatic
void visBase::MarkerSet::clearMarkers ( )

Removes all markers.

static MarkerSet* visBase::MarkerSet::create ( )
inlinestatic
static visBase::DataObject* visBase::MarkerSet::createInternal ( )
inlinestaticprivate
void visBase::MarkerSet::doFaceCamera ( bool  yn)

If true, the maker will always be rotated so the same part of the marker always faces the camera.

bool visBase::MarkerSet::facesCamera ( ) const
int visBase::MarkerSet::findClosestMarker ( const Coord3 ,
bool  scenespace = false 
)
int visBase::MarkerSet::findMarker ( const Coord3 ,
const Coord3 eps,
bool  scenespace = false 
)
void visBase::MarkerSet::forceRedraw ( bool  )
virtual const char* visBase::MarkerSet::getClassName ( ) const
virtual

Reimplemented from visBase::DataObject.

void visBase::MarkerSet::getColorArray ( TypeSet< Color > &  colors) const
Coordinates* visBase::MarkerSet::getCoordinates ( )
inline
const Coordinates* visBase::MarkerSet::getCoordinates ( ) const
inline
const visBase::Transformation* visBase::MarkerSet::getDisplayTransformation ( ) const
virtual

All positions going from the outside world to the vis should be transformed with this transform. This enables us to have different coord-systems outside OI, e.g. we can use UTM coords outside the vis without loosing precision in the vis.

Reimplemented from visBase::DataObject.

float visBase::MarkerSet::getMarkerHeightRatio ( ) const
Color visBase::MarkerSet::getMarkersSingleColor ( ) const
MarkerStyle3D& visBase::MarkerSet::getMarkerStyle ( )
inline
const MarkerStyle3D& visBase::MarkerSet::getMarkerStyle ( ) const
inline
float visBase::MarkerSet::getMaximumScale ( ) const
float visBase::MarkerSet::getMinimumScale ( ) const
Normals* visBase::MarkerSet::getNormals ( )
float visBase::MarkerSet::getPixelDensity ( ) const
inlinevirtual

Reimplemented from visBase::DataObject.

float visBase::MarkerSet::getScreenSize ( ) const
static const char* visBase::MarkerSet::getStaticClassName ( )
static
MarkerStyle3D::Type visBase::MarkerSet::getType ( ) const
static void visBase::MarkerSet::initClass ( )
static
void visBase::MarkerSet::insertPos ( int  ,
const Coord3 ,
bool  draw = true 
)
bool visBase::MarkerSet::markerOn ( unsigned  int)
void visBase::MarkerSet::materialChangeCB ( CallBacker )
protectedvirtual

Reimplemented from visBase::VisualObjectImpl.

MarkerSet& visBase::MarkerSet::operator= ( const MarkerSet )
private
void visBase::MarkerSet::removeMarker ( int  idx)
void visBase::MarkerSet::removePolygonOffsetNodeState ( )
void visBase::MarkerSet::setAutoRotateMode ( AutoRotateMode  )
void visBase::MarkerSet::setDisplayTransformation ( const visBase::Transformation )
virtual

All positions going from the outside world to the vis should be transformed with this transform. This enables us to have different coord-systems outside OI, e.g. we can use UTM coords outside the vis without loosing precision in the vis.

Reimplemented from visBase::DataObject.

void visBase::MarkerSet::setMarkerHeightRatio ( float  )
void visBase::MarkerSet::setMarkerResolution ( float  res)

The res value is between 0 and 1. It indicates the quality of marker visualization.

void visBase::MarkerSet::setMarkersSingleColor ( const Color singlecolor)

all markers will use the same color, the color can also be set by markerstyle

void visBase::MarkerSet::setMarkerStyle ( const MarkerStyle3D )

Sets predefined shape and size. Will only use color of markerstyle if no material is set.

void visBase::MarkerSet::setMaterial ( visBase::Material )
virtual

If material is null, markers will be single color.

Implements visBase::VisualObject.

void visBase::MarkerSet::setMaximumScale ( float  )
void visBase::MarkerSet::setMinimumScale ( float  )
void visBase::MarkerSet::setPixelDensity ( float  )
virtual

Reimplemented from visBase::DataObject.

void visBase::MarkerSet::setPos ( int  ,
const Coord3 ,
bool  draw = true 
)
void visBase::MarkerSet::setRotationForAllMarkers ( const Coord3 ,
const float   
)
void visBase::MarkerSet::setScreenSize ( float  )

If a nonzero value is given, the object will try to have the same size (in pixels) on the screen at all times.

void visBase::MarkerSet::setSingleMarkerRotation ( const Quaternion ,
int   
)
void visBase::MarkerSet::setType ( MarkerStyle3D::Type  )

Sets predefined shape.

static const char* visBase::MarkerSet::sFactoryKeyword ( )
static
int visBase::MarkerSet::size ( ) const
void visBase::MarkerSet::turnAllMarkersOn ( bool  )
void visBase::MarkerSet::turnMarkerOn ( unsigned int  idx,
bool   
)
bool visBase::MarkerSet::usesSingleColor ( ) const

Member Data Documentation

RefMan<Coordinates> visBase::MarkerSet::coords_
protected
RefMan<const visBase::Transformation > visBase::MarkerSet::displaytrans_
protected
osgGeo::MarkerSet* visBase::MarkerSet::markerset_
protected
MarkerStyle3D visBase::MarkerSet::markerstyle_
protected
RefMan<Normals> visBase::MarkerSet::normals_
protected
PolygonOffset* visBase::MarkerSet::offset_
protected
osg::Array* visBase::MarkerSet::onoffarr_
protected
float visBase::MarkerSet::pixeldensity_
protected
float visBase::MarkerSet::rotationangle_
protected
Coord3 visBase::MarkerSet::rotationvec_
protected

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019