OpendTect-6_4  6.4
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | 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 &)
 
const EM::EMObjectemObject () const
 
virtual void startEdit (const EM::PosID &)
 
virtual bool setPosition (const Coord3 &)
 
virtual void finishEdit ()
 
bool canSnapAfterEdit (const EM::PosID &) const
 
bool getSnapAfterEdit () const
 
void setSnapAfterEdit (bool yn)
 
void addUser ()
 
void removeUser ()
 
int nrUsers () const
 
virtual const BufferStringSetgetAlongMovingStyleNames () const
 
virtual int getAlongMovingStyle () const
 
virtual void setAlongMovingStyle (int index)
 
virtual void getEditIDs (TypeSet< EM::PosID > &) const
 
virtual bool addEditID (const EM::PosID &)
 
virtual bool removeEditID (const EM::PosID &)
 
virtual Coord3 getPosition (const EM::PosID &) const
 
virtual bool mayTranslate1D (const EM::PosID &) const
 
virtual Coord3 translation1DDirection (const EM::PosID &) const
 
virtual bool mayTranslate2D (const EM::PosID &) const
 
virtual Coord3 translation2DNormal (const EM::PosID &) const
 
virtual bool mayTranslate3D (const EM::PosID &) const
 
virtual bool maySetNormal (const EM::PosID &) const
 
virtual Coord3 getNormal (const EM::PosID &) const
 
virtual bool maySetDirection (const EM::PosID &) const
 
virtual Coord3 getDirectionPlaneNormal (const EM::PosID &) const
 
virtual Coord3 getDirection (const EM::PosID &) const
 
- 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 void enableNodeCloning (bool yn=true)
 

Public Attributes

Notifier< ObjectEditoreditpositionchange
 

Protected Member Functions

virtual bool setPosition (const EM::PosID &, const Coord3 &)
 
Geometry::ElementEditorgetEditor (const EM::SectionID &)
 
const Geometry::ElementEditorgetEditor (const EM::SectionID &) const
 
virtual Geometry::ElementEditorcreateEditor (const EM::SectionID &)=0
 
void editPosChangeTrigger (CallBacker *)
 
void emSectionChange (CallBacker *)
 
virtual void getAlongMovingNodes (const EM::PosID &, TypeSet< EM::PosID > &, TypeSet< float > *) const
 
virtual void cloneMovingNode ()
 
- Protected Member Functions inherited from CallBacker
void detachAllNotifiers ()
 Call from the destructor of your inherited object. More...
 

Protected Attributes

EM::EMObjectemobject
 
EM::PosID movingnode
 
Coord3 startpos
 
TypeSet< EM::PosIDchangedpids
 
TypeSet< EM::PosIDalongmovingnodes
 
TypeSet< Coord3alongmovingnodesstart
 
TypeSet< float > alongmovingnodesfactors
 
int nrusers
 

Private Member Functions

 mRefCountImpl (ObjectEditor)
 

Private Attributes

ObjectSet< Geometry::ElementEditorgeeditors
 
TypeSet< EM::SectionIDsections
 
bool snapafterthisedit
 
bool snapafteredit
 

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 )

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

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

Member Function Documentation

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.

void MPE::ObjectEditor::addUser ( )
inline
bool MPE::ObjectEditor::canSnapAfterEdit ( const EM::PosID ) const
virtual void MPE::ObjectEditor::cloneMovingNode ( )
inlineprotectedvirtual
virtual Geometry::ElementEditor* MPE::ObjectEditor::createEditor ( const EM::SectionID )
protectedpure virtual
void MPE::ObjectEditor::editPosChangeTrigger ( CallBacker )
protected
const EM::EMObject& MPE::ObjectEditor::emObject ( ) const
inline
void MPE::ObjectEditor::emSectionChange ( CallBacker )
protected
static void MPE::ObjectEditor::enableNodeCloning ( bool  yn = true)
static
virtual void MPE::ObjectEditor::finishEdit ( )
virtual
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.

virtual int MPE::ObjectEditor::getAlongMovingStyle ( ) const
inlinevirtual
Returns
the index of the style in the list returned by 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.
virtual Coord3 MPE::ObjectEditor::getDirection ( const EM::PosID ) const
virtual
virtual Coord3 MPE::ObjectEditor::getDirectionPlaneNormal ( const EM::PosID ) const
virtual
virtual void MPE::ObjectEditor::getEditIDs ( TypeSet< EM::PosID > &  ) const
virtual

Gives all nodes that can be moved.

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

Geometry::ElementEditor* MPE::ObjectEditor::getEditor ( const EM::SectionID )
protected
const Geometry::ElementEditor* MPE::ObjectEditor::getEditor ( const EM::SectionID ) const
protected
virtual Coord3 MPE::ObjectEditor::getNormal ( const EM::PosID ) const
virtual
virtual Coord3 MPE::ObjectEditor::getPosition ( const EM::PosID ) const
virtual
bool MPE::ObjectEditor::getSnapAfterEdit ( ) const
virtual bool MPE::ObjectEditor::maySetDirection ( const EM::PosID ) const
virtual
virtual bool MPE::ObjectEditor::maySetNormal ( const EM::PosID ) const
virtual
virtual bool MPE::ObjectEditor::mayTranslate1D ( const EM::PosID ) const
virtual
virtual bool MPE::ObjectEditor::mayTranslate2D ( const EM::PosID ) const
virtual
virtual bool MPE::ObjectEditor::mayTranslate3D ( const EM::PosID ) const
virtual
MPE::ObjectEditor::mRefCountImpl ( ObjectEditor  )
private
int MPE::ObjectEditor::nrUsers ( ) const
inline
virtual bool MPE::ObjectEditor::removeEditID ( const EM::PosID )
virtual

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

void MPE::ObjectEditor::removeUser ( )
inline
virtual void MPE::ObjectEditor::setAlongMovingStyle ( int  index)
inlinevirtual
Parameters
indexrefers to the list returned by getAlongMovingStyleNames().
virtual bool MPE::ObjectEditor::setPosition ( const Coord3 )
virtual

Reimplemented in MPE::PolygonBodyEditor.

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

Reimplemented in MPE::PolygonBodyEditor.

void MPE::ObjectEditor::setSnapAfterEdit ( bool  yn)
virtual void MPE::ObjectEditor::startEdit ( const EM::PosID )
virtual
virtual Coord3 MPE::ObjectEditor::translation1DDirection ( const EM::PosID ) const
virtual
virtual Coord3 MPE::ObjectEditor::translation2DNormal ( const EM::PosID ) const
virtual

Member Data Documentation

TypeSet<EM::PosID> MPE::ObjectEditor::alongmovingnodes
protected
TypeSet<float> MPE::ObjectEditor::alongmovingnodesfactors
protected
TypeSet<Coord3> MPE::ObjectEditor::alongmovingnodesstart
protected
TypeSet<EM::PosID> MPE::ObjectEditor::changedpids
protected
Notifier<ObjectEditor> MPE::ObjectEditor::editpositionchange

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

EM::EMObject& MPE::ObjectEditor::emobject
protected
ObjectSet<Geometry::ElementEditor> MPE::ObjectEditor::geeditors
private
EM::PosID MPE::ObjectEditor::movingnode
protected
int MPE::ObjectEditor::nrusers
protected
TypeSet<EM::SectionID> MPE::ObjectEditor::sections
private
bool MPE::ObjectEditor::snapafteredit
private
bool MPE::ObjectEditor::snapafterthisedit
private
Coord3 MPE::ObjectEditor::startpos
protected

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