OpendTect  7.0
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
MPE::ObjectEditor Class Referenceabstract

Abstraction of EM Object editing. It gives lists of which nodes that may be moved, and in what manner. More...

Inheritance diagram for MPE::ObjectEditor:
[legend]

Public Member Functions

 ObjectEditor (EM::EMObject &)
 
virtual bool addEditID (const EM::PosID &)
 
void addUser ()
 
bool canSnapAfterEdit (const EM::PosID &) const
 
const EM::EMObjectemObject () const
 
virtual void finishEdit ()
 
virtual int getAlongMovingStyle () const
 
virtual const BufferStringSetgetAlongMovingStyleNames () const
 
virtual Coord3 getDirection (const EM::PosID &) const
 
virtual Coord3 getDirectionPlaneNormal (const EM::PosID &) const
 
virtual void getEditIDs (TypeSet< EM::PosID > &) const
 
virtual Coord3 getNormal (const EM::PosID &) const
 
virtual Coord3 getPosition (const EM::PosID &) const
 
bool getSnapAfterEdit () const
 
virtual bool maySetDirection (const EM::PosID &) const
 
virtual bool maySetNormal (const EM::PosID &) const
 
virtual bool mayTranslate1D (const EM::PosID &) const
 
virtual bool mayTranslate2D (const EM::PosID &) const
 
virtual bool mayTranslate3D (const EM::PosID &) const
 
int nrUsers () const
 
virtual bool removeEditID (const EM::PosID &)
 
void removeUser ()
 
virtual void setAlongMovingStyle (int index)
 
virtual bool setPosition (const Coord3 &)
 
void setSnapAfterEdit (bool yn)
 
virtual void startEdit (const EM::PosID &)
 
virtual Coord3 translation1DDirection (const EM::PosID &) const
 
virtual Coord3 translation2DNormal (const EM::PosID &) const
 
- Public Member Functions inherited from SharedObject
 SharedObject (const char *nm=nullptr)
 
 SharedObject (const SharedObject &)
 
- Public Member Functions inherited from NamedCallBacker
 NamedCallBacker (const char *nm=0)
 
 NamedCallBacker (const NamedCallBacker &)
 
virtual Notifier< NamedCallBacker > & objectToBeDeleted () const
 
bool operator== (const NamedCallBacker &oth) const
 
bool operator== (const NamedObject &oth) const
 
- Public Member Functions inherited from CallBacker
 CallBacker ()
 
 CallBacker (const CallBacker &)
 
virtual ~CallBacker ()
 
bool attachCB (const NotifierAccess &, const CallBack &, bool onlyifnew=false) const
 
bool attachCB (const NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false) const
 
void detachAllNotifiers () const
 Call from the destructor of your inherited object. More...
 
void detachCB (const NotifierAccess &, const CallBack &) const
 
void detachCB (const NotifierAccess *notif, const CallBack &cb) const
 
virtual bool isCapsule () const
 
bool isNotifierAttached (const NotifierAccess *) const
 Only for debugging purposes, don't use. More...
 
void stopReceivingNotifications () const
 
virtual CallBackertrueCaller ()
 
- Public Member Functions inherited from NamedObject
 NamedObject (const char *nm=nullptr)
 
 NamedObject (const NamedObject &oth)
 
virtual ~NamedObject ()
 
virtual BufferString getName () const
 
bool getNameFromPar (const IOPar &)
 
const name_typename () const override
 
NamedObjectoperator= (const NamedObject &)
 
bool operator== (const NamedObject &oth) const
 
virtual void setName (const char *nm)
 
- Public Member Functions inherited from ObjectWithName
virtual ~ObjectWithName ()
 
bool hasName (const char *nm) const
 
bool hasName (const name_type &nm) const
 
void putNameInPar (IOPar &) const
 
- Public Member Functions inherited from RefCount::Referenced
void addObserver (WeakPtrBase *obs)
 Not for normal use. May become private. More...
 
int nrRefs () const
 Only for expert use. More...
 
void ref () const
 
bool refIfReffed () const
 Don't use in production, for debugging. More...
 
void removeObserver (WeakPtrBase *obs)
 Not for normal use. May become private. More...
 
bool tryRef () const
 Not for normal use. May become private. More...
 
void unRef () const
 
void unRefNoDelete () const
 

Static Public Member Functions

static void enableNodeCloning (bool yn=true)
 
- Static Public Member Functions inherited from SharedObject
static Notifier< SharedObject > & instanceCreated ()
 
- Static Public Member Functions inherited from CallBacker
static void createReceiverForCurrentThread ()
 
static void removeReceiverForCurrentThread ()
 
- Static Public Member Functions inherited from RefCount::Referenced
static bool isSane (const Referenced *)
 

Public Attributes

Notifier< ObjectEditoreditpositionchange
 

Protected Member Functions

 ~ObjectEditor ()
 
virtual void cloneMovingNode (CallBacker *)
 
virtual Geometry::ElementEditorcreateEditor ()=0
 
void editPosChangeTrigger (CallBacker *)
 
virtual void getAlongMovingNodes (const EM::PosID &, TypeSet< EM::PosID > &, TypeSet< float > *) const
 
Geometry::ElementEditorgetEditor ()
 
const Geometry::ElementEditorgetEditor () const
 
virtual bool setPosition (const EM::PosID &, const Coord3 &)
 
- Protected Member Functions inherited from SharedObject
virtual ~SharedObject ()
 
- Protected Member Functions inherited from NamedCallBacker
void sendDelNotif () const
 
- Protected Member Functions inherited from RefCount::Referenced
 Referenced ()
 
 Referenced (const Referenced &)
 
virtual ~Referenced ()
 
Referencedoperator= (const Referenced &)
 

Protected Attributes

TypeSet< EM::PosIDalongmovingnodes
 
TypeSet< float > alongmovingnodesfactors
 
TypeSet< Coord3alongmovingnodesstart
 
TypeSet< EM::PosIDchangedpids
 
RefMan< EM::EMObjectemobject_
 
EM::PosID movingnode
 
int nrusers = 0
 
Coord3 startpos
 
- Protected Attributes inherited from NamedCallBacker
Threads::Atomic< bool > delalreadytriggered_
 
Notifier< NamedCallBackerdelnotif_
 
- Protected Attributes inherited from NamedObject
BufferString name_
 

Private Attributes

ObjectSet< Geometry::ElementEditorgeeditors
 
TypeSet< EM::SectionIDsections
 
bool snapafteredit = true
 
bool snapafterthisedit = false
 

Additional Inherited Members

- Public Types inherited from ObjectWithName
typedef OD::String name_type
 

Detailed Description

Abstraction of EM Object editing. It gives lists of which nodes that may be moved, and in what manner.

Editing has three easy steps:

startEdit( pid );
setPosition( newpos )
virtual void finishEdit()
virtual bool setPosition(const Coord3 &)
virtual void startEdit(const EM::PosID &)

When moving an editing node, several other nodes may be moved along with it. If this is possible, this can be done in different styles which are listed by getAlongMovingStyleNames().

<>

Constructor & Destructor Documentation

◆ ObjectEditor()

MPE::ObjectEditor::ObjectEditor ( EM::EMObject )

◆ ~ObjectEditor()

MPE::ObjectEditor::~ObjectEditor ( )
protected

Member Function Documentation

◆ addEditID()

virtual bool MPE::ObjectEditor::addEditID ( const EM::PosID )
virtual

Add node for editing. Note that this may not be possible, and false may be returned.

◆ addUser()

void MPE::ObjectEditor::addUser ( )
inline

◆ canSnapAfterEdit()

bool MPE::ObjectEditor::canSnapAfterEdit ( const EM::PosID ) const

◆ cloneMovingNode()

virtual void MPE::ObjectEditor::cloneMovingNode ( CallBacker )
inlineprotectedvirtual

◆ createEditor()

virtual Geometry::ElementEditor* MPE::ObjectEditor::createEditor ( )
protectedpure virtual

◆ editPosChangeTrigger()

void MPE::ObjectEditor::editPosChangeTrigger ( CallBacker )
protected

◆ emObject()

const EM::EMObject& MPE::ObjectEditor::emObject ( ) const
inline

◆ enableNodeCloning()

static void MPE::ObjectEditor::enableNodeCloning ( bool  yn = true)
static

◆ finishEdit()

virtual void MPE::ObjectEditor::finishEdit ( )
virtual

◆ getAlongMovingNodes()

virtual void MPE::ObjectEditor::getAlongMovingNodes ( const EM::PosID ,
TypeSet< EM::PosID > &  ,
TypeSet< float > *   
) const
protectedvirtual

Gets the positions that are moved along and their corresponding factors.

◆ getAlongMovingStyle()

virtual int MPE::ObjectEditor::getAlongMovingStyle ( ) const
inlinevirtual
Returns
the index of the style in the list returned by getAlongMovingStyleNames().

◆ getAlongMovingStyleNames()

virtual const BufferStringSet* MPE::ObjectEditor::getAlongMovingStyleNames ( ) const
inlinevirtual
Returns
a list with names of the different styles in which nodes can follow along the moved node.

◆ getDirection()

virtual Coord3 MPE::ObjectEditor::getDirection ( const EM::PosID ) const
virtual

◆ getDirectionPlaneNormal()

virtual Coord3 MPE::ObjectEditor::getDirectionPlaneNormal ( const EM::PosID ) const
virtual

◆ getEditIDs()

virtual void MPE::ObjectEditor::getEditIDs ( TypeSet< EM::PosID > &  ) const
virtual

Gives all nodes that can be moved.

Reimplemented in MPE::HorizonEditor, and MPE::FaultStickSetEditor.

◆ getEditor() [1/2]

Geometry::ElementEditor* MPE::ObjectEditor::getEditor ( )
protected

◆ getEditor() [2/2]

const Geometry::ElementEditor* MPE::ObjectEditor::getEditor ( ) const
protected

◆ getNormal()

virtual Coord3 MPE::ObjectEditor::getNormal ( const EM::PosID ) const
virtual

◆ getPosition()

virtual Coord3 MPE::ObjectEditor::getPosition ( const EM::PosID ) const
virtual

◆ getSnapAfterEdit()

bool MPE::ObjectEditor::getSnapAfterEdit ( ) const

◆ maySetDirection()

virtual bool MPE::ObjectEditor::maySetDirection ( const EM::PosID ) const
virtual

◆ maySetNormal()

virtual bool MPE::ObjectEditor::maySetNormal ( const EM::PosID ) const
virtual

◆ mayTranslate1D()

virtual bool MPE::ObjectEditor::mayTranslate1D ( const EM::PosID ) const
virtual

◆ mayTranslate2D()

virtual bool MPE::ObjectEditor::mayTranslate2D ( const EM::PosID ) const
virtual

◆ mayTranslate3D()

virtual bool MPE::ObjectEditor::mayTranslate3D ( const EM::PosID ) const
virtual

◆ nrUsers()

int MPE::ObjectEditor::nrUsers ( ) const
inline

◆ removeEditID()

virtual bool MPE::ObjectEditor::removeEditID ( const EM::PosID )
virtual

Remove editing node. Note that this may not be possible, and false may be returned.

◆ removeUser()

void MPE::ObjectEditor::removeUser ( )
inline

◆ setAlongMovingStyle()

virtual void MPE::ObjectEditor::setAlongMovingStyle ( int  index)
inlinevirtual
Parameters
indexrefers to the list returned by getAlongMovingStyleNames().

◆ setPosition() [1/2]

virtual bool MPE::ObjectEditor::setPosition ( const Coord3 )
virtual

Reimplemented in MPE::PolygonBodyEditor.

◆ setPosition() [2/2]

virtual bool MPE::ObjectEditor::setPosition ( const EM::PosID ,
const Coord3  
)
protectedvirtual

Reimplemented in MPE::PolygonBodyEditor.

◆ setSnapAfterEdit()

void MPE::ObjectEditor::setSnapAfterEdit ( bool  yn)

◆ startEdit()

virtual void MPE::ObjectEditor::startEdit ( const EM::PosID )
virtual

◆ translation1DDirection()

virtual Coord3 MPE::ObjectEditor::translation1DDirection ( const EM::PosID ) const
virtual

◆ translation2DNormal()

virtual Coord3 MPE::ObjectEditor::translation2DNormal ( const EM::PosID ) const
virtual

Member Data Documentation

◆ alongmovingnodes

TypeSet<EM::PosID> MPE::ObjectEditor::alongmovingnodes
protected

◆ alongmovingnodesfactors

TypeSet<float> MPE::ObjectEditor::alongmovingnodesfactors
protected

◆ alongmovingnodesstart

TypeSet<Coord3> MPE::ObjectEditor::alongmovingnodesstart
protected

◆ changedpids

TypeSet<EM::PosID> MPE::ObjectEditor::changedpids
protected

◆ editpositionchange

Notifier<ObjectEditor> MPE::ObjectEditor::editpositionchange

Won't trigger on position-changes, but when new edit positions are avaliable or editpositions has been removed

◆ emobject_

RefMan<EM::EMObject> MPE::ObjectEditor::emobject_
protected

◆ geeditors

ObjectSet<Geometry::ElementEditor> MPE::ObjectEditor::geeditors
private

◆ movingnode

EM::PosID MPE::ObjectEditor::movingnode
protected

◆ nrusers

int MPE::ObjectEditor::nrusers = 0
protected

◆ sections

TypeSet<EM::SectionID> MPE::ObjectEditor::sections
private

◆ snapafteredit

bool MPE::ObjectEditor::snapafteredit = true
private

◆ snapafterthisedit

bool MPE::ObjectEditor::snapafterthisedit = false
private

◆ startpos

Coord3 MPE::ObjectEditor::startpos
protected

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