50 #ifndef OM_PROPERTY_VISUALIZER_HH
51 #define OM_PROPERTY_VISUALIZER_HH
53 #include "../PropertyVisualizer.hh"
60 template <
typename MeshT>
73 virtual void visualize(
bool _setDrawMode, QWidget* _widget);
101 virtual void visualizeFaceProp(
bool _setDrawMode =
true);
102 virtual void visualizeEdgeProp(
bool _setDrawMode =
true);
103 virtual void visualizeHalfedgeProp(
bool _setDrawMode =
true);
104 virtual void visualizeVertexProp(
bool _setDrawMode =
true);
106 template <
typename PropType>
107 void removeProperty_stage1();
108 template <
typename PropType>
109 void removeProperty_stage2();
111 template<
typename PropType>
112 void duplicateProperty_stage1();
113 template<
typename PropHandle,
typename Iterator>
114 void duplicateProperty_stage2(Iterator first, Iterator last);
118 virtual void clearFaceProp();
119 virtual void clearEdgeProp();
120 virtual void clearHalfedgeProp();
121 virtual void clearVertexProp();
123 virtual void setFacePropertyFromText(
unsigned int index, QString text);
124 virtual void setEdgePropertyFromText(
unsigned int index, QString text);
125 virtual void setHalfedgePropertyFromText(
unsigned int index, QString text);
126 virtual void setVertexPropertyFromText(
unsigned int index, QString text);
135 unsigned int getClosestFaceId(
unsigned int _face,
ACG::Vec3d& _hitPoint);
136 unsigned int getClosestEdgeId(
unsigned int _face,
ACG::Vec3d& _hitPoint);
137 unsigned int getClosestHalfedgeId(
unsigned int _face,
ACG::Vec3d& _hitPoint);
138 unsigned int getClosestVertexId(
unsigned int _face,
ACG::Vec3d& _hitPoint);
141 template <
typename InnerType >
142 QString getPropertyText_(
unsigned int index);
145 template<
typename PropHandleT>
149 CopyProperty(
const PropHandleT& _p1,
const PropHandleT& _p2, MeshT*& mesh) :
150 p1(_p1), p2(_p2), mesh(mesh) {}
152 template<
typename PrimitiveHandleT>
153 inline void operator() (
const PrimitiveHandleT &pr) {
154 mesh->property(p1, pr) = mesh->property(p2, pr);
158 const PropHandleT &p1, &p2;
166 #if defined(INCLUDE_TEMPLATES) && !defined(OM_PROPERTY_VISUALIZER_CC)
167 #include "OMPropertyVisualizerT.cc"
virtual void visualize(bool _setDrawMode, QWidget *_widget)
Visualizes the property.
This class vizualizes a property.
virtual QString getPropertyText(unsigned int index)
Returns the value of a property in text form.
unsigned int getClosestPrimitiveId(unsigned int _face, ACG::Vec3d &_hitPoint)
Returns the ID of the closest primitive.
virtual void setPropertyFromText(unsigned int index, QString text)
Returns the value of a property in text form.
virtual void clear()
Clears the property.
virtual QString getHeader()
Returns the header for saving.
virtual void duplicateProperty()
Duplicates the property.
PropertyVisualizer(PropertyInfo _propertyInfo)
Constructor.
virtual int getEntityCount()
Returns the number of entities.
virtual void removeProperty()
Removes the property.
Cellection of information about a property.