Workspace 6.21.5
Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
LodMeshModelInterface Class Reference

#include <Mesh/DataStructures/MeshModelInterface/lodmeshmodelinterface.h>

Inheritance diagram for LodMeshModelInterface:
[legend]

Public Member Functions

 LodMeshModelInterface ()
 
 LodMeshModelInterface (const LodMeshModelInterface &other)
 
 ~LodMeshModelInterface () override
 
ElementType::List attachmentInfoExistsFor () const override
 
bool attachmentInfoExistsFor (const ElementType::Type &elementType) const override
 
LodMeshModelInterfaceclone () const override
 
void discardAttachmentInfo (const ElementType::Type &elementType) override
 
bool doesLodDataExist () const
 
void emptyTrash () override
 
bool generateAttachmentInfo (const ElementType::Type &elementType) override
 
ElementHandleList getAttachedElements (const ElementType::Type &elementType, const NodeHandle &node) const override
 
const MeshElementsInterfacegetElements (const ElementType::Type &type) const override
 
MeshElementsInterfacegetElements (const ElementType::Type &type) override
 
ElementType::List getElementTypesPresentInModel () const override
 
ElementType::List getElementTypesWithStatesDefined () const override
 
const MeshNodesInterfacegetNodes () const override
 
MeshNodesInterfacegetNodes () override
 
bool isElementTypeSupported (const ElementType::Type &type) const override
 
bool isNodeCollapsed (size_type nodeId) const
 
bool isTriCollapsed (size_type triId) const
 
size_type numCollapsedNodes () const
 
size_type numCollapsedTris () const
 
LodMeshModelInterfaceoperator= (const LodMeshModelInterface &other)
 
void setFreeEdgeCollapseAngle (double radians)
 
void setLod (double lod)
 
void setLodReduction (double reduction)
 
void setMaxEdgeLength (double length)
 
void setMaxTriNormalChange (double radians)
 
void setMinTriAreaToLengthRatio (double ratio)
 
void setPreLodMergeDistance (double dist)
 
void setPreserveFreeEdges (bool preserve)
 
bool smoothMesh (SmoothMeshMethod smoothMethod, double smoothFactor, int smoothIterations, bool saveNodeStates)
 
double updateModel (bool saveNodeStates, int stopAtCollapse, bool traceProgress=false, DataExecution::Operation *op=nullptr)
 
- Public Member Functions inherited from TypedMeshModelInterface< LodMeshModelInterface >
DataExecution::DataObjectcreateDownCastTypedObject () override
 
const DataExecution::DataFactorygetFactory () const override
 
- Public Member Functions inherited from MeshModelInterface
 ~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)
 
MeshModelInterfaceclone () const override=0
 
virtual DataExecution::DataObjectcreateDownCastTypedObject ()=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 >
MeshElementsInterfacegetElements ()
 
template<typename T >
const MeshElementsInterfacegetElements () const
 
virtual const MeshElementsInterfacegetElements (const ElementType::Type &type) const =0
 
virtual MeshElementsInterfacegetElements (const ElementType::Type &type)=0
 
virtual ElementType::List getElementTypesPresentInModel () const =0
 
ElementType::List getElementTypesPresentOrWithStates () const
 
virtual ElementType::List getElementTypesWithStatesDefined () const =0
 
virtual const DataExecution::DataFactorygetFactory () const =0
 
MetaDatagetMetaData ()
 
const MetaDatagetMetaData () const
 
virtual const MeshNodesInterfacegetNodes () const =0
 
virtual MeshNodesInterfacegetNodes ()=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 Clonableclone () const =0
 

Static Public Attributes

static const size_type invalid_nodeId = NodeHandle().getIndex()
 

Protected Member Functions

bool fastAssignFrom (const MeshModelInterface &other) override
 
- Protected Member Functions inherited from TypedMeshModelInterface< LodMeshModelInterface >
 TypedMeshModelInterface ()
 
 TypedMeshModelInterface (const TypedMeshModelInterface &other)
 
virtual bool fastAssignFrom (const MeshModelInterface &other)=0
 

Additional Inherited Members

- Public Types inherited from MeshModelInterface
using int_type = qint32
 
using MetaData = DataExecution::ObjectDictionary
 
typedef ItemHandle::size_type size_type
 
- Static Public Member Functions inherited from MeshModelInterface
static MeshModelInterfacecreateDefault ()
 

Constructor & Destructor Documentation

◆ LodMeshModelInterface() [1/2]

◆ LodMeshModelInterface() [2/2]

◆ ~LodMeshModelInterface()

~LodMeshModelInterface ( )
override

Member Function Documentation

◆ attachmentInfoExistsFor() [1/2]

ElementType::List attachmentInfoExistsFor ( ) const
overridevirtual
Returns
A list of element types for which attachment info exists
See also
generateAttachmentInfo, discardAttachmentInfo, getAttached, isAttached

Implements MeshModelInterface.

◆ attachmentInfoExistsFor() [2/2]

bool attachmentInfoExistsFor ( const ElementType::Type elementType) const
overridevirtual
Parameters
elementTypeThe type of element we want to check if attachment info exists for
See also
generateAttachmentInfo, discardAttachmentInfo, getAttached, isAttached

Implements MeshModelInterface.

◆ clone()

LodMeshModelInterface * clone ( ) const
overridevirtual

Derived classes should return their derived type.

Implements MeshModelInterface.

◆ discardAttachmentInfo()

void discardAttachmentInfo ( const ElementType::Type elementType)
overridevirtual
Parameters
elementTypeThe type of element we want discard attachment info for
See also
generateAttachmentInfo, attachmentInfoExistsFor, attachmentInfoExistsFor, getAttached, isAttached

Implements MeshModelInterface.

◆ doesLodDataExist()

bool doesLodDataExist ( ) const
inline

◆ emptyTrash()

void emptyTrash ( )
overridevirtual

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.

Implements MeshModelInterface.

◆ fastAssignFrom()

bool fastAssignFrom ( const MeshModelInterface other)
overrideprotectedvirtual

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.

Returns
true if a fast assignment has been performed or false if it couldn't.
See also
operator=()

Implements MeshModelInterface.

◆ generateAttachmentInfo()

bool generateAttachmentInfo ( const ElementType::Type elementType)
overridevirtual
Precondition
If the model has been modified since the last call to generateAttachmentInfo then clients should first call discardAttachmentInfo() before this call to ensure the correct attachment info exists.

Implements MeshModelInterface.

◆ getAttachedElements()

ElementHandleList getAttachedElements ( const ElementType::Type elementType,
const NodeHandle node 
) const
overridevirtual
Precondition
generateAttachmentInfo must have already been called successfully for elementType.
Parameters
elementTypeThe type of attached element
nodeThe node we're querying the attachments of
See also
generateAttachmentInfo, discardAttachmentInfo, attachmentInfoExistsFor, isAttached

Implements MeshModelInterface.

◆ getElements() [1/2]

const MeshElementsInterface & getElements ( const ElementType::Type type) const
overridevirtual

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Implements MeshModelInterface.

◆ getElements() [2/2]

MeshElementsInterface & getElements ( const ElementType::Type type)
overridevirtual

Derived class should return MeshElementsInterface::getNullMeshElementsInterface() if an unsupported type is requested. This should be consistent with calls to isElementTypeSupported().

Implements MeshModelInterface.

◆ getElementTypesPresentInModel()

ElementType::List getElementTypesPresentInModel ( ) const
overridevirtual
Returns
A list of ElementType::Types that this model currently contains.

Implements MeshModelInterface.

◆ getElementTypesWithStatesDefined()

ElementType::List getElementTypesWithStatesDefined ( ) const
overridevirtual
Returns
A list of ElementType::Types that currently have states defined in this model.

Implements MeshModelInterface.

◆ getNodes() [1/2]

const MeshNodesInterface & getNodes ( ) const
overridevirtual

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Implements MeshModelInterface.

◆ getNodes() [2/2]

MeshNodesInterface & getNodes ( )
overridevirtual
Returns
A MeshNodesInterface

Implements MeshModelInterface.

◆ isElementTypeSupported()

bool isElementTypeSupported ( const ElementType::Type type) const
overridevirtual
Returns
Whether the implementation supports elements of this type

Implements MeshModelInterface.

◆ isNodeCollapsed()

bool isNodeCollapsed ( size_type  nodeId) const

◆ isTriCollapsed()

bool isTriCollapsed ( size_type  triId) const

◆ numCollapsedNodes()

MeshModelInterface::size_type numCollapsedNodes ( ) const

◆ numCollapsedTris()

MeshModelInterface::size_type numCollapsedTris ( ) const

◆ operator=()

LodMeshModelInterface & operator= ( const LodMeshModelInterface other)

◆ setFreeEdgeCollapseAngle()

void setFreeEdgeCollapseAngle ( double  radians)
inline

◆ setLod()

void setLod ( double  lod)
inline

◆ setLodReduction()

void setLodReduction ( double  reduction)
inline

◆ setMaxEdgeLength()

void setMaxEdgeLength ( double  length)
inline

◆ setMaxTriNormalChange()

void setMaxTriNormalChange ( double  radians)
inline

◆ setMinTriAreaToLengthRatio()

void setMinTriAreaToLengthRatio ( double  ratio)
inline

◆ setPreLodMergeDistance()

void setPreLodMergeDistance ( double  dist)
inline

◆ setPreserveFreeEdges()

void setPreserveFreeEdges ( bool  preserve)
inline

◆ smoothMesh()

bool smoothMesh ( SmoothMeshMethod  smoothMethod,
double  smoothFactor,
int  smoothIterations,
bool  saveNodeStates 
)

◆ updateModel()

double updateModel ( bool  saveNodeStates,
int  stopAtCollapse,
bool  traceProgress = false,
DataExecution::Operation op = nullptr 
)
Returns
The % reduction in triangles

Member Data Documentation

◆ invalid_nodeId

const MeshModelInterface::size_type invalid_nodeId = NodeHandle().getIndex()
static