43 #ifndef TANGENTSPACEPLUGIN_HH
44 #define TANGENTSPACEPLUGIN_HH
66 #if QT_VERSION >= 0x050000
67 Q_PLUGIN_METADATA(IID
"org.OpenFlipper.Plugins.Plugin-TangentSpace")
75 void addToolbox( QString _name , QWidget* _widget, QIcon* _icon);
85 QString
name() {
return (QString(
"TangentSpace")); };
86 QString
description( ) {
return (QString(
"Compute tangent space properties")); };
91 DECOMP_GRAM_SCHMIDT = 0,
102 void orthonormalize(
int method = 0);
107 void computeParity();
120 void computeWeightedTangentSpace(TriMesh* mesh, TriMesh::HalfedgeHandle _h,
TangentBasis* _out);
121 void computeWeightedTangentSpace(PolyMesh* mesh, PolyMesh::HalfedgeHandle _h,
TangentBasis* _out);
129 void getTriPos(TriMesh* _mesh, TriMesh::FaceHandle _h,
ACG::Vec3f* _outPos);
132 float computeUVArea(TriMesh* _mesh, TriMesh::HalfedgeHandle _h);
134 void computePerVertexTangents(TriMesh* _mesh);
135 void computePerHalfedgeTangents(TriMesh* _mesh);
144 bool weightByUVArea_;
145 QCheckBox* weightByAngleGUI_;
146 QCheckBox* weightByAreaGUI_;
147 QCheckBox* weightByUVAreaGUI_;
150 bool overwriteVertexNormals_;
151 QCheckBox* overwriteNormalsGUI_;
154 bool preserveTextureSeams_;
155 QCheckBox* preserveTextureSeamsGUI_;
159 QComboBox* decompMethodGUI_;
162 std::string propName_;
163 QLineEdit* propNameGUI_;
167 void slotComputePerVertex();
168 void slotComputePerHalfedge();
170 QString version() {
return QString(
"1.0"); };
178 #endif //TANGENTSPACEPLUGIN_HH
Plugins can add its own toolbox to the main widget's toolbox area by using this interface.
QString description()
Return a description of what the plugin is doing.
void pluginsInitialized()
Set the scripting slot descriptions.
QString name()
Return a name for the plugin.
Interface class from which all plugins have to be created.