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