44 #ifndef OM_PROPERTY_VISUALIZER_HH 45 #define OM_PROPERTY_VISUALIZER_HH 47 #include "PropertyVisualizer/PropertyVisualizer.hh" 54 template <
typename MeshT>
68 virtual void visualize(
bool _setDrawMode, QWidget* _widget);
97 virtual void visualizeFaceProp(
bool _setDrawMode =
true);
98 virtual void visualizeEdgeProp(
bool _setDrawMode =
true);
99 virtual void visualizeHalfedgeProp(
bool _setDrawMode =
true);
100 virtual void visualizeVertexProp(
bool _setDrawMode =
true);
102 template <
typename PropType>
103 void removeProperty_stage1();
104 template <
typename PropType>
105 void removeProperty_stage2();
107 template<
typename PropType>
108 void duplicateProperty_stage1();
109 template<
typename PropHandle,
typename Iterator>
110 void duplicateProperty_stage2(Iterator first, Iterator last);
114 virtual void clearFaceProp();
115 virtual void clearEdgeProp();
116 virtual void clearHalfedgeProp();
117 virtual void clearVertexProp();
119 virtual void setFacePropertyFromText(
unsigned int index, QString text);
120 virtual void setEdgePropertyFromText(
unsigned int index, QString text);
121 virtual void setHalfedgePropertyFromText(
unsigned int index, QString text);
122 virtual void setVertexPropertyFromText(
unsigned int index, QString text);
130 unsigned int getClosestFaceId(
unsigned int _face,
ACG::Vec3d& _hitPoint);
131 unsigned int getClosestEdgeId(
unsigned int _face,
ACG::Vec3d& _hitPoint);
132 unsigned int getClosestHalfedgeId(
unsigned int _face,
ACG::Vec3d& _hitPoint);
133 unsigned int getClosestVertexId(
unsigned int _face,
ACG::Vec3d& _hitPoint);
136 template <
typename InnerType >
137 QString getPropertyText_(
unsigned int index);
139 template<
typename Type>
143 template<
typename PropHandleT>
147 CopyProperty(
const PropHandleT& _p1,
const PropHandleT& _p2, MeshT*& mesh) :
148 p1(_p1), p2(_p2), mesh(mesh) {}
150 template<
typename PrimitiveHandleT>
151 inline void operator() (
const PrimitiveHandleT &pr) {
152 mesh->property(p1, pr) = mesh->property(p2, pr);
156 const PropHandleT &p1, &p2;
163 #if defined(INCLUDE_TEMPLATES) && !defined(OM_PROPERTY_VISUALIZER_CC) 164 #include "OMPropertyVisualizerT_impl.hh" virtual void removeProperty()
Removes the property.
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 QString getHeader()
Returns the header for saving.
This class vizualizes a property.
virtual void clear()
Clears the property.
virtual void duplicateProperty()
Duplicates the property.
virtual void visualize(bool _setDrawMode, QWidget *_widget)
Visualizes the property.
PropertyVisualizer(const PropertyInfo &_propertyInfo)
Constructor.
virtual int getEntityCount()
Returns the number of entities.
Cellection of information about a property.
virtual QString getPropertyText(unsigned int index)
Returns the value of a property in text form.