51 #ifdef ENABLE_SKELETON_SUPPORT
53 #define OM_PROPERTY_VISUALIZER_SKIN_WEIGHTS_CC
55 #include "OMPropertyVisualizerSkinWeights.hh"
57 template <
typename MeshT>
58 OMPropertyVisualizerSkinWeights<MeshT>::OMPropertyVisualizerSkinWeights(MeshT* _mesh,
PropertyInfo _propertyInfo)
61 if (PropertyVisualizer::widget)
delete PropertyVisualizer::widget;
63 w->paramSkinWeights->setTitle(QString(
"SkinWeights Parameters of ").append(PropertyVisualizer::propertyInfo.propName().c_str()));
64 PropertyVisualizer::widget = w;
67 template <
typename MeshT>
68 QString OMPropertyVisualizerSkinWeights<MeshT>::getPropertyText(
unsigned int index)
73 template <
typename MeshT>
74 void OMPropertyVisualizerSkinWeights<MeshT>::visualizeFaceProp(
bool )
79 template <
typename MeshT>
80 void OMPropertyVisualizerSkinWeights<MeshT>::visualizeEdgeProp(
bool )
85 template <
typename MeshT>
86 void OMPropertyVisualizerSkinWeights<MeshT>::visualizeHalfedgeProp(
bool )
91 template <
typename MeshT>
92 void OMPropertyVisualizerSkinWeights<MeshT>::visualizeVertexProp(
bool _setDrawMode)
110 if ( weight.find( skinWeightsWidget->boneId->value() ) != weight.end() ) {
111 value = weight[skinWeightsWidget->boneId->value()];
125 template<
typename MeshT>
126 void OMPropertyVisualizerSkinWeights<MeshT>::removeProperty()
132 template<
typename MeshT>
133 void OMPropertyVisualizerSkinWeights<MeshT>::duplicateProperty()
138 template<
typename MeshT>
139 void OMPropertyVisualizerSkinWeights<MeshT>::setFacePropertyFromText(
unsigned int index, QString text)
144 template<
typename MeshT>
145 void OMPropertyVisualizerSkinWeights<MeshT>::setEdgePropertyFromText(
unsigned int index, QString text)
150 template<
typename MeshT>
151 void OMPropertyVisualizerSkinWeights<MeshT>::setHalfedgePropertyFromText(
unsigned int index, QString text)
156 template<
typename MeshT>
157 void OMPropertyVisualizerSkinWeights<MeshT>::setVertexPropertyFromText(
unsigned int index, QString text)
162 if ( !mesh->get_property_handle(prop, PropertyVisualizer::propertyInfo.propName() ) )
163 emit this->log(
LOGERR, QObject::tr(
"Error: No property with name ").append(PropertyVisualizer::propertyInfo.propName().c_str()));
165 typename MeshT::VertexHandle vh = mesh->vertex_handle(index);
170 text.remove(text.length()-1, 1);
172 QStringList slAll = text.split(
")(");
174 for (QStringList::iterator it = slAll.begin(); it != slAll.end(); ++it)
176 QStringList slCurrent = it->split(
",");
177 sw.insert(std::pair<int, double>(slCurrent.at(0).toInt(), slCurrent.at(1).toDouble()));
180 mesh->property(prop, vh) = sw;
Add colors to mesh item (vertices/faces/edges)
void setDrawMode(const ACG::SceneGraph::DrawModes::DrawMode &_mode, int _viewer)
Set the draw Mode of a Viewer. .
std::map< unsigned int, double > SkinWeights
Stores the joint weights per vertex.
DrawMode SOLID_POINTS_COLORED
draw colored, but not lighted faces using interpolated vertex colors
Cellection of information about a property.