34 #include <QDomDocument>
37 #include "vtkProperty.h"
47 void MeshPropertyData::initialize()
56 "Visualized size of points, glyphs etc.",
62 "Set backface culling on. This makes transparent meshes work, "
63 "but only draws outside mesh walls "
64 "(eg. navigating inside meshes will not work).",
69 "Set frontface culling on. Can be used to make transparent "
70 "meshes work from inside the meshes.",
75 "How to represent model visually",
76 QString::number(VTK_SURFACE),
78 << QString::number(VTK_SURFACE)
79 << QString::number(VTK_WIREFRAME)
80 << QString::number(VTK_POINTS));
81 std::map<QString,QString> representationNames;
82 representationNames[QString::number(VTK_SURFACE)] =
"Surface";
83 representationNames[QString::number(VTK_WIREFRAME)] =
"Wireframe";
84 representationNames[QString::number(VTK_POINTS)] =
"Points";
94 "Edge color, used when edges are visible.",
99 "Ambient color coefficient",
105 "Diffuse color coefficient",
111 "Specular color coefficient",
117 "Specular color power",
124 void MeshPropertyData::addProperty(
PropertyPtr property)
144 QVariant orgval =
mProperties[i]->getValueAsVariant();
145 mProperties[i]->setValueFromVariant(item.readVariant(orgval));
static BoolPropertyPtr initialize(const QString &uid, QString name, QString help, bool value, QDomNode root=QDomNode())
DoublePropertyPtr mVisSize
void writeVariant(const QVariant &val)
void parseXml(QDomNode dataNode)
BoolPropertyPtr mFrontfaceCulling
DoublePropertyPtr mAmbient
Utility class for describing a bounded numeric range.
DoublePropertyPtr mSpecularPower
DoublePropertyPtr mDiffuse
Helper class for storing one string value in an xml document.
StringPropertyPtr mRepresentation
boost::shared_ptr< class Property > PropertyPtr
BoolPropertyPtr mBackfaceCulling
void addXml(QDomNode &dataNode)
void changed()
emit when the underlying data value is changed: The user interface will be updated.
static StringPropertyPtr initialize(const QString &uid, QString name, QString help, QString value, QStringList range, QDomNode root=QDomNode())
std::vector< PropertyPtr > mProperties
static DoublePropertyPtr initialize(const QString &uid, QString name, QString help, double value, DoubleRange range, int decimals, QDomNode root=QDomNode())
ColorPropertyPtr mEdgeColor
static ColorPropertyPtr initialize(const QString &uid, QString name, QString help, QColor value, QDomNode root=QDomNode())
BoolPropertyPtr mEdgeVisibility
DoublePropertyPtr mSpecular