Workspace 6.21.5
|
A base class for an interface to a mesh model. More...
#include <Mesh/DataStructures/MeshModelInterface/meshmodelinterface.h>
Public Types | |
using | int_type = qint32 |
using | MetaData = DataExecution::ObjectDictionary |
typedef ItemHandle::size_type | size_type |
Public Member Functions | |
~MeshModelInterface () override | |
bool | assignFrom (const MeshModelInterface &other, bool allowPartialAssign=false) |
virtual ElementType::List | attachmentInfoExistsFor () const =0 |
virtual bool | attachmentInfoExistsFor (const ElementType::Type &elementType) const =0 |
virtual void | clear (bool removeAllStates=true) |
MeshModelInterface * | clone () const override=0 |
virtual DataExecution::DataObject * | createDownCastTypedObject ()=0 |
void | discardAllAttachmentInfo () |
virtual void | discardAttachmentInfo (const ElementType::Type &elementType)=0 |
virtual void | emptyTrash ()=0 |
virtual bool | generateAttachmentInfo (const ElementType::Type &elementType)=0 |
virtual ElementHandleList | getAttachedElements (const ElementType::Type &elementType, const NodeHandle &node) const =0 |
virtual NodeHandleList | getAttachedNodes (const ElementType::Type &elementType, const NodeHandle &node) const |
template<typename T > | |
MeshElementsInterface & | getElements () |
template<typename T > | |
const MeshElementsInterface & | getElements () const |
virtual const MeshElementsInterface & | getElements (const ElementType::Type &type) const =0 |
virtual MeshElementsInterface & | getElements (const ElementType::Type &type)=0 |
virtual ElementType::List | getElementTypesPresentInModel () const =0 |
ElementType::List | getElementTypesPresentOrWithStates () const |
virtual ElementType::List | getElementTypesWithStatesDefined () const =0 |
virtual const DataExecution::DataFactory & | getFactory () const =0 |
MetaData & | getMetaData () |
const MetaData & | getMetaData () const |
virtual const MeshNodesInterface & | getNodes () const =0 |
virtual MeshNodesInterface & | getNodes ()=0 |
virtual bool | isElementTypeSupported (const ElementType::Type &type) const =0 |
virtual bool | isOrganised () const |
virtual bool | load (MeshSerializer &serializer) |
virtual bool | makeUnorganised () |
virtual bool | save (MeshSerializer &serializer) const |
void | setMetaData (const MetaData &val) |
Public Member Functions inherited from Clonable | |
virtual | ~Clonable ()=default |
virtual Clonable * | clone () const =0 |
Static Public Member Functions | |
static MeshModelInterface * | createDefault () |
Protected Member Functions | |
virtual bool | fastAssignFrom (const MeshModelInterface &other)=0 |
Classes should be derived from TypedMeshModelInterface<DerivedClass> rather than from this class directly.
A MeshModelInterface can also contain meta-data. This can be used to store information about the model that is not directly related to its geometry - e.g. source of the model, units used, etc.
using int_type = qint32 |
typedef ItemHandle::size_type size_type |
|
overridedefault |
bool assignFrom | ( | const MeshModelInterface & | other, |
bool | allowPartialAssign = false |
||
) |
other | The interface to assign from |
allowPartialAssign | Allow as much assignment as possible if the destination type doesn't support all state or element types that the source contains. |
Perform assignment from another MeshModelInterface. This method first calls fastAssignFrom() to allow the derived class to check other.getFactory() to see if the other object is the same type as themselves or some other known MeshModelInterface implementation that they can cast to for faster assignment (via the derived class assignment operator for example). If the derived class can not offer a fast assignment then it will return false and an assignment will be performed using just the base class interface.
|
pure virtual |
Implemented in Hdf5MeshModelInterface, FilteredMeshModelInterface, HierarchicalReferenceMeshModelInterface, LargeStreamlinedMeshModelInterface, LodMeshModelInterface, PrimevalMeshModelInterface, and StreamlinedMeshModelInterface.
|
pure virtual |
elementType | The type of element we want to check if attachment info exists for |
Implemented in FilteredMeshModelInterface, HierarchicalReferenceMeshModelInterface, LargeStreamlinedMeshModelInterface, LodMeshModelInterface, PrimevalMeshModelInterface, StreamlinedMeshModelInterface, and Hdf5MeshModelInterface.
|
virtual |
removeAllStates | Whether or not all states should be removed in addition to the actual node and element data. |
|
overridepure virtual |
Derived classes should return their derived type.
Implements Clonable.
Implemented in Hdf5MeshModelInterface, FilteredMeshModelInterface, HierarchicalReferenceMeshModelInterface, LargeStreamlinedMeshModelInterface, LodMeshModelInterface, PrimevalMeshModelInterface, and StreamlinedMeshModelInterface.
|
static |
Create a default concrete object of type StreamlinedMeshModelInterface
|
pure virtual |
Client code can use this method to down cast the object to polymorphically downcast the mesh model interface to a data object containing a type-specific reference to the derived class type.
Implemented in TypedMeshModelInterface< Derived >, TypedMeshModelInterface< Hdf5MeshModelInterface >, TypedMeshModelInterface< FilteredMeshModelInterface >, TypedMeshModelInterface< HierarchicalReferenceMeshModelInterface >, TypedMeshModelInterface< LargeStreamlinedMeshModelInterface >, TypedMeshModelInterface< LodMeshModelInterface >, TypedMeshModelInterface< PrimevalMeshModelInterface >, and TypedMeshModelInterface< StreamlinedMeshModelInterface >.
void discardAllAttachmentInfo | ( | ) |
|
pure virtual |
elementType | The type of element we want discard attachment info for |
Implemented in FilteredMeshModelInterface, HierarchicalReferenceMeshModelInterface, LargeStreamlinedMeshModelInterface, LodMeshModelInterface, PrimevalMeshModelInterface, StreamlinedMeshModelInterface, and Hdf5MeshModelInterface.
|
pure virtual |
Depending on the implementation, removing nodes or elements may just mark their index as invalid rather than completely removing it from internal lists/storage. It should also be noted that removing a node does not guarantee any bookkeeping to update any attached elements, calling code is responsible for this if needed. Specific implementations of MeshModelInterface can use emptyTrash to completely remove any stored nodes and elements (e.g. in a single more efficient way after multiple remove operations) and can optionally use this to remove elements now referencing invalid nodes. This behaviour is implementation specific and calling code should check specific implementation class documentation.
Implemented in Hdf5MeshModelInterface, FilteredMeshModelInterface, HierarchicalReferenceMeshModelInterface, LargeStreamlinedMeshModelInterface, LodMeshModelInterface, PrimevalMeshModelInterface, and StreamlinedMeshModelInterface.
|
protectedpure virtual |
Perform assignment from another MeshModelInterface. This method is called by operator=() allowing the derived class to check other.getFactory() to see if the other object is the same type as themselves or some other known MeshModelInterface implementation that they can cast for faster assignment (via the derived class assignment operator for example). If the derived class can not offer a fast assignment then it must return false signaling that an assignment should be performed using just the base class interface.
Implemented in Hdf5MeshModelInterface, FilteredMeshModelInterface, HierarchicalReferenceMeshModelInterface, LargeStreamlinedMeshModelInterface, LodMeshModelInterface, PrimevalMeshModelInterface, and StreamlinedMeshModelInterface.
|
pure virtual |
elementType | The type of element we want attachment info to be generated for |
Implementations are able to postpone generation of attachment information until it's required if they wish. This can mean in applications where attachment information isn't needed or is only needed temporarily that data does not need to exist for the entire lifetime of the interface.
Implemented in FilteredMeshModelInterface, HierarchicalReferenceMeshModelInterface, LargeStreamlinedMeshModelInterface, LodMeshModelInterface, PrimevalMeshModelInterface, StreamlinedMeshModelInterface, and Hdf5MeshModelInterface.
|
pure virtual |
elementType | The type of attached element |
node | The node we're querying the attachments of |
Implemented in FilteredMeshModelInterface, HierarchicalReferenceMeshModelInterface, LargeStreamlinedMeshModelInterface, LodMeshModelInterface, PrimevalMeshModelInterface, StreamlinedMeshModelInterface, and Hdf5MeshModelInterface.
|
virtual |
elementType | The type of element resulting in the attachment |
node | The node we're querying the attachments of |
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
pure virtual |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Implemented in FilteredMeshModelInterface, HierarchicalReferenceMeshModelInterface, LargeStreamlinedMeshModelInterface, LodMeshModelInterface, PrimevalMeshModelInterface, StreamlinedMeshModelInterface, and Hdf5MeshModelInterface.
|
pure virtual |
Derived class should return MeshElementsInterface::getNullMeshElementsInterface() if an unsupported type is requested. This should be consistent with calls to isElementTypeSupported().
Implemented in FilteredMeshModelInterface, HierarchicalReferenceMeshModelInterface, LargeStreamlinedMeshModelInterface, LodMeshModelInterface, PrimevalMeshModelInterface, StreamlinedMeshModelInterface, and Hdf5MeshModelInterface.
|
pure virtual |
Implemented in Hdf5MeshModelInterface, FilteredMeshModelInterface, HierarchicalReferenceMeshModelInterface, LargeStreamlinedMeshModelInterface, LodMeshModelInterface, PrimevalMeshModelInterface, and StreamlinedMeshModelInterface.
ElementType::List getElementTypesPresentOrWithStates | ( | ) | const |
Combined results from getElementTypesPresentInModel and getElementTypesWithStatesDefined
|
pure virtual |
Implemented in Hdf5MeshModelInterface, FilteredMeshModelInterface, HierarchicalReferenceMeshModelInterface, LargeStreamlinedMeshModelInterface, LodMeshModelInterface, PrimevalMeshModelInterface, and StreamlinedMeshModelInterface.
|
pure virtual |
Client code can use this method to determine the specific derived type of MeshModelInterface this object is. This method is implemented for derived classes by the TypedMeshModelInterface<> template class.
Implemented in TypedMeshModelInterface< Derived >, TypedMeshModelInterface< Hdf5MeshModelInterface >, TypedMeshModelInterface< FilteredMeshModelInterface >, TypedMeshModelInterface< HierarchicalReferenceMeshModelInterface >, TypedMeshModelInterface< LargeStreamlinedMeshModelInterface >, TypedMeshModelInterface< LodMeshModelInterface >, TypedMeshModelInterface< PrimevalMeshModelInterface >, and TypedMeshModelInterface< StreamlinedMeshModelInterface >.
MeshModelInterface::MetaData & getMetaData | ( | ) |
const MeshModelInterface::MetaData & getMetaData | ( | ) | const |
|
pure virtual |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Implemented in Hdf5MeshModelInterface, FilteredMeshModelInterface, HierarchicalReferenceMeshModelInterface, LargeStreamlinedMeshModelInterface, LodMeshModelInterface, PrimevalMeshModelInterface, and StreamlinedMeshModelInterface.
|
pure virtual |
|
pure virtual |
Implemented in FilteredMeshModelInterface, HierarchicalReferenceMeshModelInterface, LargeStreamlinedMeshModelInterface, LodMeshModelInterface, PrimevalMeshModelInterface, StreamlinedMeshModelInterface, and Hdf5MeshModelInterface.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
void setMetaData | ( | const MetaData & | val | ) |