|
MeVisLab Toolbox Reference
|
#include <WEM.h>
Classes | |
| struct | WEMNotificationCBData |
Public Member Functions | |
| WEM () | |
| Standard constructor. | |
| WEM (const WEM &wem) | |
| Copy constructor. | |
| void | clone (const WEM &wem) |
| Clones the internal WEMs of the given WEM to this one. | |
| WEM * | deepCopy () const override |
| Returns a deep copy of this WEM. | |
| bool | isValid () const |
| void | addNotificationObserver (wemNotificationCB *callback, void *userData) |
| Adds a notification observer to this WEM. | |
| void | removeNotificationObserver (wemNotificationCB *callback, void *userData) |
| Removes a notification observer from this WEM. | |
| void | notifyObservers (std::vector< WEMEventContainer > ecList) |
| Notifies all observers with the events stored in the event container list. | |
| void | notifyObservers (const ml::WEMNotificationType ¬ificationType) |
| Notifies all observers with the given event. | |
| unsigned int | getCurrentWEMPatchId () |
| void | setCurrentWEMPatchId (unsigned int id) |
| Sets the current last id for WEMPatches. Do not mess with it. | |
| void | addWEMPatch (WEMPatch *wemPatch, bool mergeAllPatches=false) |
| WEMTrianglePatch * | addWEMPatchCopy (WEMTrianglePatch *wemPatch, bool assignNewId=false) |
| Adds a copy of the given WEMPatch (WEMTrianglePatch) to the list. Assigns optionally a new id to the patch. | |
| WEMQuadPatch * | addWEMPatchCopy (WEMQuadPatch *wemPatch, bool assignNewId=false) |
| Adds a copy of the given WEMPatch (WEMQuadPatch) to the list. Assigns optionally a new id to the patch. | |
| WEMPolygonPatch * | addWEMPatchCopy (WEMPolygonPatch *wemPatch, bool assignNewId=false) |
| Adds a copy of the given WEMPatch (WEMPolygonPatch) to the list. Assigns optionally a new id to the patch. | |
| bool | removeWEMPatch (WEMPatch *wemPatch) |
| bool | removeWEMPatch (unsigned int id) |
| bool | removeAll () |
| void | removeAllNoDelete () |
| Clear internal vector (DOES NOT DELETE WEMPatches!!!). | |
| WEMPatch * | getWEMPatchAt (unsigned int index) |
| Returns a pointer to the WEMPatch at the given position in the internal list. | |
| const WEMPatch * | getWEMPatchAt (unsigned int index) const |
| Returns a pointer to the WEMPatch at the given position in the internal list. | |
| WEMPatch * | getWEMPatchById (unsigned int id) |
| const WEMPatch * | getWEMPatchById (unsigned int id) const |
| unsigned int | getWEMPatchIndex (WEMPatch *wemPatch) const |
| Returns the index of the given WEMPatch in its list. | |
| unsigned int | getWEMPatchIndex (unsigned int id) const |
| Returns the index of the WEMPatch with the given id in its list. | |
| bool | hasWEMPatch (WEMPatch *wemPatch) const |
| Returns whether there is the given WEMPatch in the list. | |
| unsigned int | getNumWEMPatches () const |
| Returns the number of WEMs in the list. | |
| void | enableRepaintObserver () |
| Enables the repaint observer mechanism. | |
| void | disableRepaintObserver () |
| Disables the repaint observer mechanism. | |
| void | enableFinishedObserver () |
| Enables the finished observer mechanism. | |
| void | disableFinishedObserver () |
| Disables the finished observer mechanism. | |
| void | enableInteractionObserver () |
| Enables the interaction observer mechanism. | |
| void | disableInteractionObserver () |
| Disables the interaction observer mechanism. | |
| void | enableSelectionObserver () |
| Enables the selection observer mechanism. | |
| void | disableSelectionObserver () |
| Disables the selection observer mechanism. | |
| bool | isRepaintNotificationEnabled () const |
| Returns whether the repaint notification is enabled. | |
| bool | isFinishedNotificationEnabled () const |
| Returns whether the finished notification is enabled. | |
| bool | isInteractionInitNotificationEnabled () const |
| Returns whether the interaction init notification is enabled. | |
| bool | isSelectionNotificationEnabled () const |
| Returns whether the selection notification is enabled. | |
| int | getId () const |
| Returns the id of the WEM. | |
| std::string | getName () const |
| Returns name of the WEM. | |
| void | setName (std::string name) |
| Sets name of the WEM to the given string. | |
| void | saveWEMSurface (const std::string &filename, const WEMPersistenceParameters &persistenceParameters, ProgressField *progressFld=nullptr) |
| Saves the geometry to the given file name. | |
| void | saveWEMSurface (std::ostream &outstream, const WEMPersistenceParameters &persistenceParameters, ProgressField *progressFld=nullptr) |
| Saves the geometry to a given stream. | |
| bool | loadWEMSurface (const std::string &filename, bool generateEdges=true, ProgressField *progressFld=nullptr, bool *irregularSurfaceDetected=nullptr) |
| bool | loadWEMSurface (const std::string &filename, MLuint64 filesize, bool generateEdges=true, ProgressField *progressFld=nullptr, bool *irregularSurfaceDetected=nullptr) |
| bool | hasPrimitiveValueListForAllPatches (std::string description) const |
| Returns whether all patches have a PVL with the given description. | |
| std::vector< std::string > | getRegisteredPrimitiveValueLists () const |
| Returns unique list of registered primitive value lists for all patches as a vector. | |
| void | flatten (WEMTrianglePatch *triPatch, WEMRequirements *requirements, TriangulationModes triangulationMode) |
| Flatten: joins and converts all patches to triangle patches with same normal orientation. | |
| void | mergeAllPatchesIntoSinglePatch () |
| void | computeBoundingBox () |
| WEMBoundingBox * | getBoundingBox () |
| Public Member Functions inherited from ml::RefCountedBase | |
| RefCountedBase () | |
| Constructor. | |
| RefCountedBase (const RefCountedBase &) | |
| Explicit copy constructor. | |
| virtual void | incRefCount () const |
| Increases the reference count. | |
| virtual void | decRefCount () const |
| Decreases the reference count (object will be deleted if the reference count is decremented to 0). | |
| bool | isRefCountedBase () const override |
| Returns whether the instance is derived from RefCountedBase. | |
| Public Member Functions inherited from ml::EventSource | |
| EventSource () | |
| EventSource (const EventSource &evSource) | |
| ~EventSource () override | |
| void | addEventListener (BaseEventCallback *cb, void *userData) |
| void | removeEventListener (BaseEventCallback *cb, void *userData) |
| bool | hasEventListeners () const |
| Public Member Functions inherited from ml::Base | |
| Base () | |
| Constructor. | |
| virtual | ~Base () |
| Destructor. | |
| bool | isOfAllowedType (const std::vector< const RuntimeType * > &types) const |
| virtual std::string | detailString () const |
| virtual bool | implementsPersistence (PersistenceInterface) const |
| virtual std::string | persistentState () const |
| Returns a string describing the object's internal state. | |
| virtual void | setPersistentState (const std::string &state) |
| virtual void | addStateToTree (TreeNode *) const |
| Attaches the object state as children of the given parent node. | |
| virtual void | readStateFromTree (TreeNode *) |
| Reads the object state from the children of the given parent node. | |
| virtual void | writeTo (AbstractPersistenceOutputStream *) const |
| virtual void | readFrom (AbstractPersistenceInputStream *, int) |
Static Public Member Functions | |
| static void | removeNotificationObserverFromAllWEMs (wemNotificationCB *callback, void *userData) |
| Removes a certain notification observer from all WEM. | |
| Static Public Member Functions inherited from ml::RefCountedBase | |
| static void | updateReferenceCountingIfSupported (Base *oldValue, Base *newValue, bool &isRefCountedBase) |
Protected Member Functions | |
| ~WEM () override | |
| Protected Member Functions inherited from ml::RefCountedBase | |
| ~RefCountedBase () override | |
| Destructor. | |
| Protected Member Functions inherited from ml::EventSource | |
| void | sendEvent (BaseEvent *event, void *skipListener=nullptr) |
Additional Inherited Members | |
| Public Types inherited from ml::Base | |
| enum | PersistenceInterface { PersistenceByString , PersistenceByTreeNode , PersistenceByStream } |
| This enum describes the different persistence interfaces available. More... | |
| Protected Attributes inherited from ml::RefCountedBase | |
| std::atomic_int_least32_t | _refCount |
| Reference count. | |
A WEM comprises a number of WEMPatches. The WEM is derived from Base and can be used as a data structure in a MeVisLab network. The WEM ownership is managed via smart pointers, make sure to use a WEMPtr to manage newly created WEM objects.
| ml::WEM::WEM | ( | ) |
Standard constructor.
Referenced by clone(), deepCopy(), getBoundingBox(), getWEMPatchAt(), getWEMPatchById(), and WEM().
| ml::WEM::WEM | ( | const WEM & | wem | ) |
Copy constructor.
References WEM().
|
overrideprotected |
| void ml::WEM::addNotificationObserver | ( | wemNotificationCB * | callback, |
| void * | userData ) |
Adds a notification observer to this WEM.
| void ml::WEM::addWEMPatch | ( | WEMPatch * | wemPatch, |
| bool | mergeAllPatches = false ) |
| WEMPolygonPatch * ml::WEM::addWEMPatchCopy | ( | WEMPolygonPatch * | wemPatch, |
| bool | assignNewId = false ) |
Adds a copy of the given WEMPatch (WEMPolygonPatch) to the list. Assigns optionally a new id to the patch.
| WEMQuadPatch * ml::WEM::addWEMPatchCopy | ( | WEMQuadPatch * | wemPatch, |
| bool | assignNewId = false ) |
Adds a copy of the given WEMPatch (WEMQuadPatch) to the list. Assigns optionally a new id to the patch.
| WEMTrianglePatch * ml::WEM::addWEMPatchCopy | ( | WEMTrianglePatch * | wemPatch, |
| bool | assignNewId = false ) |
Adds a copy of the given WEMPatch (WEMTrianglePatch) to the list. Assigns optionally a new id to the patch.
| void ml::WEM::clone | ( | const WEM & | wem | ) |
| void ml::WEM::computeBoundingBox | ( | ) |
(Re)Computes the bounding boxes of all patches. Call this before getBoundingBox to ensure that the returned bounding box reflects the current state.
|
overridevirtual |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void ml::WEM::flatten | ( | WEMTrianglePatch * | triPatch, |
| WEMRequirements * | requirements, | ||
| TriangulationModes | triangulationMode ) |
Flatten: joins and converts all patches to triangle patches with same normal orientation.
| WEMBoundingBox * ml::WEM::getBoundingBox | ( | ) |
Returns the bounding box of all patches. Call computeBoundingBox before obtaining the bounding box to ensure that the bounding box is up-to-date.
References WEM().
| unsigned int ml::WEM::getCurrentWEMPatchId | ( | ) |
Returns the current last id (incremented each call) for WEMPatches. If there are no WEMPatches in the list, this id is set back to 0. Can not be const, because if changes the object's state.
|
inline |
|
inline |
|
inline |
| std::vector< std::string > ml::WEM::getRegisteredPrimitiveValueLists | ( | ) | const |
Returns unique list of registered primitive value lists for all patches as a vector.
| WEMPatch * ml::WEM::getWEMPatchAt | ( | unsigned int | index | ) |
Returns a pointer to the WEMPatch at the given position in the internal list.
|
inline |
Returns a pointer to the WEMPatch at the given position in the internal list.
Definition at line 184 of file WEM.h.
References getWEMPatchAt(), and WEM().
Referenced by getWEMPatchAt().
| WEMPatch * ml::WEM::getWEMPatchById | ( | unsigned int | id | ) |
|
inline |
Returns a pointer to the WEMPatch with the given unique id. Returns NULL if no such WEMPatch is stored in the list.
Definition at line 190 of file WEM.h.
References getWEMPatchById(), and WEM().
Referenced by getWEMPatchById().
| unsigned int ml::WEM::getWEMPatchIndex | ( | unsigned int | id | ) | const |
Returns the index of the WEMPatch with the given id in its list.
| unsigned int ml::WEM::getWEMPatchIndex | ( | WEMPatch * | wemPatch | ) | const |
Returns the index of the given WEMPatch in its list.
| bool ml::WEM::hasPrimitiveValueListForAllPatches | ( | std::string | description | ) | const |
Returns whether all patches have a PVL with the given description.
| bool ml::WEM::hasWEMPatch | ( | WEMPatch * | wemPatch | ) | const |
Returns whether there is the given WEMPatch in the list.
|
inline |
|
inline |
|
inline |
|
inline |
| bool ml::WEM::isValid | ( | ) | const |
| bool ml::WEM::loadWEMSurface | ( | const std::string & | filename, |
| bool | generateEdges = true, | ||
| ProgressField * | progressFld = nullptr, | ||
| bool * | irregularSurfaceDetected = nullptr ) |
Loads the geometry from a file given by its file name. Returns whether the operation was successful.
| bool ml::WEM::loadWEMSurface | ( | const std::string & | filename, |
| MLuint64 | filesize, | ||
| bool | generateEdges = true, | ||
| ProgressField * | progressFld = nullptr, | ||
| bool * | irregularSurfaceDetected = nullptr ) |
Loads the geometry from a file given by its file name. Returns whether the operation was successful.
| void ml::WEM::mergeAllPatchesIntoSinglePatch | ( | ) |
Merges all internal WEMPatches into a single WEMPatch. This method does not use spatial information at all, so no nodes at the same position will be merged.
| void ml::WEM::notifyObservers | ( | const ml::WEMNotificationType & | notificationType | ) |
Notifies all observers with the given event.
| void ml::WEM::notifyObservers | ( | std::vector< WEMEventContainer > | ecList | ) |
Notifies all observers with the events stored in the event container list.
| bool ml::WEM::removeAll | ( | ) |
Removes all WEMPatches from the list. Returns whether there was something to remove.
| void ml::WEM::removeAllNoDelete | ( | ) |
Clear internal vector (DOES NOT DELETE WEMPatches!!!).
| void ml::WEM::removeNotificationObserver | ( | wemNotificationCB * | callback, |
| void * | userData ) |
Removes a notification observer from this WEM.
|
static |
Removes a certain notification observer from all WEM.
| bool ml::WEM::removeWEMPatch | ( | unsigned int | id | ) |
Removes a WEMPatch by its id . Returns whether there was something to remove.
| bool ml::WEM::removeWEMPatch | ( | WEMPatch * | wemPatch | ) |
Removes a given WEMPatch from the list. Returns whether there was something to remove.
| void ml::WEM::saveWEMSurface | ( | const std::string & | filename, |
| const WEMPersistenceParameters & | persistenceParameters, | ||
| ProgressField * | progressFld = nullptr ) |
Saves the geometry to the given file name.
| void ml::WEM::saveWEMSurface | ( | std::ostream & | outstream, |
| const WEMPersistenceParameters & | persistenceParameters, | ||
| ProgressField * | progressFld = nullptr ) |
Saves the geometry to a given stream.
|
inline |
|
inline |