Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes

MPE::ObjectEditor Class Reference

Inheritance diagram for MPE::ObjectEditor:
CallBacker MPE::FaultEditor MPE::FaultStickSetEditor MPE::Horizon2DEditor MPE::HorizonEditor MPE::PolygonBodyEditor

List of all members.

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)
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
void restartInteractionLine (const EM::PosID &)
bool closeInteractionLine (bool doit=true)
bool interactionLineInteraction (const EM::PosID &, bool doit=true)
const EM::EdgeLineSetgetInteractionLine () const

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

Protected Attributes

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

Private Member Functions

 mRefCountImpl (ObjectEditor)

Private Attributes

ObjectSet
< Geometry::ElementEditor
geeditors
TypeSet< EM::SectionIDsections
bool snapafterthisedit
bool snapafteredit

Detailed Description

Abstractation 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 )
   finishEdit();

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.

Reimplemented in MPE::HorizonEditor.

bool MPE::ObjectEditor::canSnapAfterEdit ( const EM::PosID  )  const
bool MPE::ObjectEditor::closeInteractionLine ( bool  doit = true  ) 

If doit is false, no change will be done and the return status indicates wether it can be done.

virtual Geometry::ElementEditor* MPE::ObjectEditor::createEditor ( const EM::SectionID  )  [protected, pure virtual]
void MPE::ObjectEditor::editPosChangeTrigger ( CallBacker  )  [protected]
const EM::EMObject& MPE::ObjectEditor::emObject (  )  const [inline]
void MPE::ObjectEditor::emSectionChange ( CallBacker  )  [protected]
virtual void MPE::ObjectEditor::finishEdit (  )  [virtual]
virtual void MPE::ObjectEditor::getAlongMovingNodes ( const EM::PosID ,
TypeSet< EM::PosID > &  ,
TypeSet< float > *   
) const [protected, virtual]

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

Reimplemented in MPE::HorizonEditor.

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

Reimplemented in MPE::HorizonEditor.

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

Reimplemented in MPE::HorizonEditor.

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.

const Geometry::ElementEditor* MPE::ObjectEditor::getEditor ( const EM::SectionID  )  const [protected]
Geometry::ElementEditor* MPE::ObjectEditor::getEditor ( const EM::SectionID  )  [protected]
const EM::EdgeLineSet* MPE::ObjectEditor::getInteractionLine (  )  const
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
bool MPE::ObjectEditor::interactionLineInteraction ( const EM::PosID ,
bool  doit = true 
)

If pos is on the line, but not on the first node, it will be cut off at that location. If it is not on the line, or on the first node, the line will be extended to pos. If doit is false, no change will be done and the return status indicates wether it can be done.

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]
virtual bool MPE::ObjectEditor::removeEditID ( const EM::PosID  )  [virtual]

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

Reimplemented in MPE::HorizonEditor.

void MPE::ObjectEditor::restartInteractionLine ( const EM::PosID  ) 
Note:
Object does only have one line. If the provided sectionID differs from the existing line's, the sectionID of the existing line will be changed.
virtual void MPE::ObjectEditor::setAlongMovingStyle ( int  index  )  [inline, virtual]
Parameters:
index refers to the list returned by getAlongMovingStyleNames().

Reimplemented in MPE::HorizonEditor.

virtual bool MPE::ObjectEditor::setPosition ( const EM::PosID ,
const Coord3  
) [protected, virtual]

Reimplemented in MPE::PolygonBodyEditor.

virtual bool MPE::ObjectEditor::setPosition ( const Coord3  )  [virtual]
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

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