Developer Documentation
OMPropertyVisualizer< MeshT > Class Template Reference
Inheritance diagram for OMPropertyVisualizer< MeshT >:
PropertyVisualizer OMPropertyVisualizerBoolean< MeshT > OMPropertyVisualizerDouble< MeshT > OMPropertyVisualizerInteger< MeshT, T > OMPropertyVisualizerVector< MeshT > OMPropertyVisualizerVector2< MeshT, VectorType > OMPropertyVisualizerVectorFieldDifference< MeshT >

Classes

class  CopyProperty
 

Public Member Functions

 OMPropertyVisualizer (MeshT *_mesh, int objectID, const PropertyInfo &_propertyInfo)
 
virtual void visualize (bool _setDrawMode, QWidget *_widget)
 Visualizes the property. More...
 
virtual void removeProperty ()
 Removes the property. More...
 
virtual void duplicateProperty ()
 Duplicates the property. More...
 
virtual void clear ()
 Clears the property. More...
 
unsigned int getClosestPrimitiveId (unsigned int _face, ACG::Vec3d &_hitPoint)
 Returns the ID of the closest primitive. More...
 
virtual QString getPropertyText (unsigned int index)
 Returns the value of a property in text form. More...
 
void setDrawMode (const ACG::SceneGraph::DrawModes::DrawMode &_mode)
 
- Public Member Functions inherited from PropertyVisualizer
 PropertyVisualizer (const PropertyInfo &_propertyInfo)
 Constructor. More...
 
virtual ~PropertyVisualizer ()
 Destructor. More...
 
virtual void visualize (bool _setDrawMode, QWidget *_widget)
 Visualizes the property. More...
 
virtual void removeProperty ()
 Removes the property. More...
 
virtual void duplicateProperty ()
 Duplicates the property. More...
 
virtual void clear ()
 Clears the property visualization. More...
 
virtual QString getName ()
 Returns a beautiful name. More...
 
virtual QWidget * getWidget ()
 Returns the visualizer's widget. More...
 
const PropertyInfogetPropertyInfo () const
 Returns the PropertyInfo. More...
 
virtual QString getPropertyText (unsigned int i)=0
 Returns the value of a property in text form. More...
 
virtual void setPropertyFromText (unsigned int index, QString text)=0
 Returns the value of a property in text form. More...
 
virtual int getEntityCount ()=0
 Returns the number of entities. More...
 
virtual QString getHeader ()=0
 Returns the header for saving. More...
 

Protected Member Functions

virtual void visualizeFaceProp (bool _setDrawMode=true)
 
virtual void visualizeEdgeProp (bool _setDrawMode=true)
 
virtual void visualizeHalfedgeProp (bool _setDrawMode=true)
 
virtual void visualizeVertexProp (bool _setDrawMode=true)
 
template<typename PropType >
void removeProperty_stage1 ()
 
template<typename PropType >
void removeProperty_stage2 ()
 
template<typename PropType >
void duplicateProperty_stage1 ()
 
template<typename PropHandle , typename Iterator >
void duplicateProperty_stage2 (Iterator first, Iterator last)
 
virtual void clearFaceProp ()
 
virtual void clearEdgeProp ()
 
virtual void clearHalfedgeProp ()
 
virtual void clearVertexProp ()
 
virtual void setFacePropertyFromText (unsigned int index, QString text)
 
virtual void setEdgePropertyFromText (unsigned int index, QString text)
 
virtual void setHalfedgePropertyFromText (unsigned int index, QString text)
 
virtual void setVertexPropertyFromText (unsigned int index, QString text)
 
virtual void setPropertyFromText (unsigned int index, QString text)
 Returns the value of a property in text form. More...
 
virtual int getEntityCount ()
 Returns the number of entities. More...
 
virtual QString getHeader ()
 Returns the header for saving. More...
 
unsigned int getClosestFaceId (unsigned int _face, ACG::Vec3d &_hitPoint)
 
unsigned int getClosestEdgeId (unsigned int _face, ACG::Vec3d &_hitPoint)
 
unsigned int getClosestHalfedgeId (unsigned int _face, ACG::Vec3d &_hitPoint)
 
unsigned int getClosestVertexId (unsigned int _face, ACG::Vec3d &_hitPoint)
 
template<typename InnerType >
QString getPropertyText_ (unsigned int index)
 
template<typename Type >
void showHistogram (ACG::QtWidgets::QtHistogramWidget *histogramWidget)
 
- Protected Member Functions inherited from PropertyVisualizer
virtual std::unique_ptr< ACG::IColorCoderbuildColorCoder ()
 
template<typename PropType , typename Iterable >
void showHistogramT (ACG::QtWidgets::QtHistogramWidget *widget, Iterable data)
 

Protected Attributes

MeshTmesh
 
int mObjectID
 
- Protected Attributes inherited from PropertyVisualizer
PropertyInfo propertyInfo
 

Additional Inherited Members

- Signals inherited from PropertyVisualizer
void log (Logtype _type, QString _message)
 
void log (QString _message)
 
- Static Public Member Functions inherited from PropertyVisualizer
static QString toStr (bool b)
 
static QString toStr (double d)
 
static QString toStr (int i)
 
static QString toStr (uint8_t i)
 
static QString toStr (unsigned int i)
 
static QString toStr (OpenMesh::Vec3d v)
 
static QString toStr (OpenMesh::Vec2d v)
 
static QString toStr (OpenMesh::Vec2f v)
 
static QString toStr (const ACG::Matrix3x3d &v)
 
static bool strToBool (QString str)
 
static double strToDouble (QString str)
 
static int strToInt (QString str)
 
static unsigned int strToUInt (QString str)
 
static OpenMesh::Vec3d strToVec3d (QString str)
 
static OpenMesh::Vec2d strToVec2d (QString str)
 
static OpenMesh::Vec2f strToVec2f (QString str)
 
template<typename Vec3T >
static Vec3T strToVec3 (QString str)
 
- Public Attributes inherited from PropertyVisualizer
QWidget * widget
 

Detailed Description

template<typename MeshT>
class OMPropertyVisualizer< MeshT >

Definition at line 55 of file OMPropertyVisualizer.hh.

Constructor & Destructor Documentation

◆ OMPropertyVisualizer()

template<typename MeshT >
OMPropertyVisualizer< MeshT >::OMPropertyVisualizer ( MeshT _mesh,
int  objectID,
const PropertyInfo _propertyInfo 
)
inline

Definition at line 58 of file OMPropertyVisualizer.hh.

◆ ~OMPropertyVisualizer()

template<typename MeshT >
virtual OMPropertyVisualizer< MeshT >::~OMPropertyVisualizer ( )
inlinevirtual

Definition at line 64 of file OMPropertyVisualizer.hh.

Member Function Documentation

◆ clear()

template<typename MeshT >
void OMPropertyVisualizer< MeshT >::clear ( void  )
virtual

Clears the property.

This method clears the property by releasing the colors of the mesh.

Reimplemented from PropertyVisualizer.

Reimplemented in OMPropertyVisualizerVector< MeshT >, and OMPropertyVisualizerVector2< MeshT, VectorType >.

Definition at line 343 of file OMPropertyVisualizerT_impl.hh.

◆ clearEdgeProp()

template<typename MeshT >
void OMPropertyVisualizer< MeshT >::clearEdgeProp
protectedvirtual

Definition at line 387 of file OMPropertyVisualizerT_impl.hh.

◆ clearFaceProp()

template<typename MeshT >
void OMPropertyVisualizer< MeshT >::clearFaceProp
protectedvirtual

Definition at line 380 of file OMPropertyVisualizerT_impl.hh.

◆ clearHalfedgeProp()

template<typename MeshT >
void OMPropertyVisualizer< MeshT >::clearHalfedgeProp
protectedvirtual

Definition at line 394 of file OMPropertyVisualizerT_impl.hh.

◆ clearVertexProp()

template<typename MeshT >
void OMPropertyVisualizer< MeshT >::clearVertexProp
protectedvirtual

Definition at line 401 of file OMPropertyVisualizerT_impl.hh.

◆ duplicateProperty()

template<typename MeshT >
virtual void OMPropertyVisualizer< MeshT >::duplicateProperty ( )
inlinevirtual

◆ duplicateProperty_stage1()

template<typename MeshT >
template<typename PropType >
void OMPropertyVisualizer< MeshT >::duplicateProperty_stage1
inlineprotected

Definition at line 128 of file OMPropertyVisualizerT_impl.hh.

◆ duplicateProperty_stage2()

template<typename MeshT >
template<typename PropHandle , typename Iterator >
void OMPropertyVisualizer< MeshT >::duplicateProperty_stage2 ( Iterator  first,
Iterator  last 
)
inlineprotected

Definition at line 107 of file OMPropertyVisualizerT_impl.hh.

◆ getClosestEdgeId()

template<typename MeshT >
unsigned int OMPropertyVisualizer< MeshT >::getClosestEdgeId ( unsigned int  _face,
ACG::Vec3d _hitPoint 
)
protected

Definition at line 229 of file OMPropertyVisualizerT_impl.hh.

◆ getClosestFaceId()

template<typename MeshT >
unsigned int OMPropertyVisualizer< MeshT >::getClosestFaceId ( unsigned int  _face,
ACG::Vec3d _hitPoint 
)
protected

Definition at line 223 of file OMPropertyVisualizerT_impl.hh.

◆ getClosestHalfedgeId()

template<typename MeshT >
unsigned int OMPropertyVisualizer< MeshT >::getClosestHalfedgeId ( unsigned int  _face,
ACG::Vec3d _hitPoint 
)
protected

Definition at line 242 of file OMPropertyVisualizerT_impl.hh.

◆ getClosestPrimitiveId()

template<typename MeshT >
unsigned int OMPropertyVisualizer< MeshT >::getClosestPrimitiveId ( unsigned int  _face,
ACG::Vec3d _hitPoint 
)

Returns the ID of the closest primitive.

Parameters
_faceThe face that was hit.
_hitPointThe position where the face was hit.
Returns
The ID of the primitive that is closest to the hitpoint.

This method is used for picking. For some entities it might be convenient to not pick them directly but pick faces instead. Then, this method iterates over the entities adjacent to the face and return the one that is closest to the actual hit point.

Definition at line 210 of file OMPropertyVisualizerT_impl.hh.

◆ getClosestVertexId()

template<typename MeshT >
unsigned int OMPropertyVisualizer< MeshT >::getClosestVertexId ( unsigned int  _face,
ACG::Vec3d _hitPoint 
)
protected

Definition at line 278 of file OMPropertyVisualizerT_impl.hh.

◆ getEntityCount()

template<typename MeshT >
int OMPropertyVisualizer< MeshT >::getEntityCount ( )
protectedvirtual

Returns the number of entities.

Implements PropertyVisualizer.

Definition at line 172 of file OMPropertyVisualizerT_impl.hh.

◆ getHeader()

template<typename MeshT >
QString OMPropertyVisualizer< MeshT >::getHeader ( )
protectedvirtual

Returns the header for saving.

Implements PropertyVisualizer.

Definition at line 185 of file OMPropertyVisualizerT_impl.hh.

◆ getPropertyText()

template<typename MeshT >
QString OMPropertyVisualizer< MeshT >::getPropertyText ( unsigned int  i)
virtual

Returns the value of a property in text form.

Parameters
iThe id of the entity whose property we want to know.
Returns
The property value in text form.

Implements PropertyVisualizer.

Reimplemented in OMPropertyVisualizerBoolean< MeshT >, OMPropertyVisualizerDouble< MeshT >, OMPropertyVisualizerInteger< MeshT, T >, OMPropertyVisualizerVector< MeshT >, OMPropertyVisualizerVector2< MeshT, VectorType >, and OMPropertyVisualizerVectorFieldDifference< MeshT >.

Definition at line 142 of file OMPropertyVisualizerT_impl.hh.

◆ getPropertyText_()

template<typename MeshT >
template<typename InnerType >
QString OMPropertyVisualizer< MeshT >::getPropertyText_ ( unsigned int  index)
protected

Definition at line 69 of file OMPropertyVisualizerT_impl.hh.

◆ removeProperty()

template<typename MeshT >
virtual void OMPropertyVisualizer< MeshT >::removeProperty ( )
inlinevirtual

◆ removeProperty_stage1()

template<typename MeshT >
template<typename PropType >
void OMPropertyVisualizer< MeshT >::removeProperty_stage1
inlineprotected

Definition at line 93 of file OMPropertyVisualizerT_impl.hh.

◆ removeProperty_stage2()

template<typename MeshT >
template<typename PropHandle >
void OMPropertyVisualizer< MeshT >::removeProperty_stage2
protected

Definition at line 85 of file OMPropertyVisualizerT_impl.hh.

◆ setDrawMode()

template<typename MeshT >
void OMPropertyVisualizer< MeshT >::setDrawMode ( const ACG::SceneGraph::DrawModes::DrawMode _mode)

Definition at line 149 of file OMPropertyVisualizerT_impl.hh.

◆ setEdgePropertyFromText()

template<typename MeshT >
void OMPropertyVisualizer< MeshT >::setEdgePropertyFromText ( unsigned int  index,
QString  text 
)
protectedvirtual

Definition at line 414 of file OMPropertyVisualizerT_impl.hh.

◆ setFacePropertyFromText()

template<typename MeshT >
void OMPropertyVisualizer< MeshT >::setFacePropertyFromText ( unsigned int  index,
QString  text 
)
protectedvirtual

Definition at line 408 of file OMPropertyVisualizerT_impl.hh.

◆ setHalfedgePropertyFromText()

template<typename MeshT >
void OMPropertyVisualizer< MeshT >::setHalfedgePropertyFromText ( unsigned int  index,
QString  text 
)
protectedvirtual

Definition at line 420 of file OMPropertyVisualizerT_impl.hh.

◆ setPropertyFromText()

template<typename MeshT >
void OMPropertyVisualizer< MeshT >::setPropertyFromText ( unsigned int  index,
QString  text 
)
protectedvirtual

Returns the value of a property in text form.

Parameters
indexThe id of the entity whose property should be set.
textThe value in text form.

This method sets the porperty of a given entity by transforming the text into the correct type. This is used when a property is loaded from a file.

Implements PropertyVisualizer.

Definition at line 159 of file OMPropertyVisualizerT_impl.hh.

◆ setVertexPropertyFromText()

template<typename MeshT >
void OMPropertyVisualizer< MeshT >::setVertexPropertyFromText ( unsigned int  index,
QString  text 
)
protectedvirtual

Definition at line 426 of file OMPropertyVisualizerT_impl.hh.

◆ showHistogram()

template<typename MeshT >
template<typename Type >
void OMPropertyVisualizer< MeshT >::showHistogram ( ACG::QtWidgets::QtHistogramWidget histogramWidget)
protected

Definition at line 434 of file OMPropertyVisualizerT_impl.hh.

◆ visualize()

template<typename MeshT >
void OMPropertyVisualizer< MeshT >::visualize ( bool  _setDrawMode,
QWidget *  _widget 
)
virtual

Visualizes the property.

To visualize the property this method calls the corresponding visualization method visualizeFaceProp, -EdgeProp, -HalfedgeProp or -VertexProp depending on the entity type of the property.

Reimplemented from PropertyVisualizer.

Definition at line 313 of file OMPropertyVisualizerT_impl.hh.

◆ visualizeEdgeProp()

template<typename MeshT >
void OMPropertyVisualizer< MeshT >::visualizeEdgeProp ( bool  _setDrawMode = true)
protectedvirtual

Definition at line 362 of file OMPropertyVisualizerT_impl.hh.

◆ visualizeFaceProp()

template<typename MeshT >
void OMPropertyVisualizer< MeshT >::visualizeFaceProp ( bool  _setDrawMode = true)
protectedvirtual

Definition at line 356 of file OMPropertyVisualizerT_impl.hh.

◆ visualizeHalfedgeProp()

template<typename MeshT >
void OMPropertyVisualizer< MeshT >::visualizeHalfedgeProp ( bool  _setDrawMode = true)
protectedvirtual

Definition at line 368 of file OMPropertyVisualizerT_impl.hh.

◆ visualizeVertexProp()

template<typename MeshT >
void OMPropertyVisualizer< MeshT >::visualizeVertexProp ( bool  _setDrawMode = true)
protectedvirtual

Definition at line 374 of file OMPropertyVisualizerT_impl.hh.

Member Data Documentation

◆ mesh

template<typename MeshT >
MeshT* OMPropertyVisualizer< MeshT >::mesh
protected

Definition at line 96 of file OMPropertyVisualizer.hh.

◆ mObjectID

template<typename MeshT >
int OMPropertyVisualizer< MeshT >::mObjectID
protected

Definition at line 97 of file OMPropertyVisualizer.hh.


The documentation for this class was generated from the following files: