Commit fc656be4 authored by Sylvain Thery's avatar Sylvain Thery

SCHNApps documentation

parent 3c68fbb4
...@@ -44,7 +44,7 @@ private slots: ...@@ -44,7 +44,7 @@ private slots:
public slots: public slots:
/** /**
* @brief compute the normals of a mesh * @brief [PYTHON] compute the normals of a mesh
* @param mapName name of the 2d map (mesh) * @param mapName name of the 2d map (mesh)
* @param positionAttributeName name of position attribute used for computation * @param positionAttributeName name of position attribute used for computation
* @param normalAttributeName name of result attribute * @param normalAttributeName name of result attribute
...@@ -56,14 +56,14 @@ public slots: ...@@ -56,14 +56,14 @@ public slots:
bool autoUpdate = true); bool autoUpdate = true);
/** /**
* @brief compute curvatures of a mesh * @brief [PYTHON] compute curvatures of a mesh
* @param mapName name of 2d map * @param mapName name of 2d map
* @param positionAttributeName name of input position attribute * @param positionAttributeName name of input position attribute
* @param normalAttributeName name of input normal attributes * @param normalAttributeName name of input normal attributes
* @param KmaxAttributeName ?? result attribute aname * @param KmaxAttributeName ?? result attribute name
* @param kmaxAttributeName ?? result attribute aname * @param kmaxAttributeName ?? result attribute name
* @param KminAttributeName ?? result attribute aname * @param KminAttributeName ?? result attribute name
* @param kminAttributeName ?? result attribute aname * @param kminAttributeName ?? result attribute name
* @param KnormalAttributeName ?? result attribute aname * @param KnormalAttributeName ?? result attribute aname
* @param compute_kmean compute the mean curvature * @param compute_kmean compute the mean curvature
* @param compute_kgaussian compute the gaussian curvature * @param compute_kgaussian compute the gaussian curvature
......
...@@ -8,7 +8,11 @@ namespace CGoGN ...@@ -8,7 +8,11 @@ namespace CGoGN
namespace SCHNApps namespace SCHNApps
{ {
/**
* Plugin for 2D mesh import. Supported mesh file format are: off/obj/ply.
* The import image function allow the creation of a mesh with a face by pixel.
* Image format support is given by Qt.
*/
class Surface_Import_Plugin : public PluginProcessing class Surface_Import_Plugin : public PluginProcessing
{ {
Q_OBJECT Q_OBJECT
...@@ -30,26 +34,26 @@ private: ...@@ -30,26 +34,26 @@ private:
public slots: public slots:
/** /**
* @brief import a mesh from a file * @brief [PYTHON] import a mesh from a file
* @param fileName file name of mesh file * @param fileName file name of mesh file
* @return the new maphandler that handle the mesh * @return the new maphandler that handle the mesh
*/ */
MapHandlerGen* importMeshFromFile(const QString& fileName); MapHandlerGen* importMeshFromFile(const QString& fileName);
/** /**
* @brief import a mesh by opening a FileDialog * @brief [PYTHON] import a mesh by opening a FileDialog
*/ */
void importMeshFromFileDialog(); void importMeshFromFileDialog();
/** /**
* @brief import an image into a mesh from a file * @brief [PYTHON] import an image into a mesh from a file
* @param fileName file name of mesh file * @param fileName file name of mesh file
* @return * @return
*/ */
MapHandlerGen* importImageFromFile(const QString& fileName); MapHandlerGen* importImageFromFile(const QString& fileName);
/** /**
* @brief import image into a mesh by opening a FileDialog * @brief [PYTHON] import image into a mesh by opening a FileDialog
*/ */
void importImageFromFileDialog(); void importImageFromFileDialog();
......
...@@ -60,6 +60,15 @@ struct MapParameters ...@@ -60,6 +60,15 @@ struct MapParameters
Geom::Vec4f backColor; Geom::Vec4f backColor;
}; };
/**
* Plugin for 2-Maps topology rendering.
* Some parameters are per view / per map:
* - drawing of relations and dart
* - colors
* Others are only per map:
* - position attribute
* - scale factors
*/
class Surface_Render_Plugin : public PluginInteraction class Surface_Render_Plugin : public PluginInteraction
{ {
Q_OBJECT Q_OBJECT
...@@ -112,7 +121,7 @@ private slots: ...@@ -112,7 +121,7 @@ private slots:
public slots: public slots:
// slots for Python calls // slots for Python calls
/** /**
* @brief change the position VBO use for rendering for specific view and map * @brief [PYTHON] change the position VBO use for rendering for specific view and map
* @param view the view name * @param view the view name
* @param map the map name * @param map the map name
* @param vbo the positionvbo name * @param vbo the positionvbo name
...@@ -120,7 +129,7 @@ public slots: ...@@ -120,7 +129,7 @@ public slots:
void changePositionVBO(const QString& view, const QString& map, const QString& vbo); void changePositionVBO(const QString& view, const QString& map, const QString& vbo);
/** /**
* @brief change the normal VBO use for rendering (phong) for specific view and map * @brief [PYTHON] change the normal VBO use for rendering (phong) for specific view and map
* @param view the view name * @param view the view name
* @param map the map name * @param map the map name
* @param vbo the normal vbo name * @param vbo the normal vbo name
...@@ -128,7 +137,7 @@ public slots: ...@@ -128,7 +137,7 @@ public slots:
void changeNormalVBO(const QString& view, const QString& map, const QString& vbo); void changeNormalVBO(const QString& view, const QString& map, const QString& vbo);
/** /**
* @brief change the color VBO use for rendering for specific view and map * @brief [PYTHON] change the color VBO use for rendering for specific view and map
* @param view the view name * @param view the view name
* @param map the map name * @param map the map name
* @param vbo the normal vbo name * @param vbo the normal vbo name
...@@ -136,7 +145,7 @@ public slots: ...@@ -136,7 +145,7 @@ public slots:
void changeColorVBO(const QString& view, const QString& map, const QString& vbo); void changeColorVBO(const QString& view, const QString& map, const QString& vbo);
/** /**
* @brief choice if vertices should be rendered (for specific view and map) * @brief [PYTHON] choice if vertices should be rendered (for specific view and map)
* @param view the view name * @param view the view name
* @param map the map name * @param map the map name
* @param b rendered or not * @param b rendered or not
...@@ -144,7 +153,7 @@ public slots: ...@@ -144,7 +153,7 @@ public slots:
void changeRenderVertices(const QString& view, const QString& map, bool b); void changeRenderVertices(const QString& view, const QString& map, bool b);
/** /**
* @brief change the size of vertices VerticesScaleFactor * @brief [PYTHON] change the size of vertices VerticesScaleFactor
* @param view the view name * @param view the view name
* @param map the map name * @param map the map name
* @param f scale parameter [0,2] * @param f scale parameter [0,2]
...@@ -152,7 +161,7 @@ public slots: ...@@ -152,7 +161,7 @@ public slots:
void changeVerticesScaleFactor(const QString&view, const QString& map, float f); void changeVerticesScaleFactor(const QString&view, const QString& map, float f);
/** /**
* @brief choice if edges should be rendered (for specific view and map) * @brief [PYTHON] choice if edges should be rendered (for specific view and map)
* @param view the view name * @param view the view name
* @param map the map name * @param map the map name
* @param b rendered or not * @param b rendered or not
...@@ -160,7 +169,7 @@ public slots: ...@@ -160,7 +169,7 @@ public slots:
void changeRenderEdges(const QString& view, const QString& map, bool b); void changeRenderEdges(const QString& view, const QString& map, bool b);
/** /**
* @brief choice if faces should be rendered (for specific view and map) * @brief [PYTHON] choice if faces should be rendered (for specific view and map)
* @param view the view name * @param view the view name
* @param map the map name * @param map the map name
* @param b rendered or not * @param b rendered or not
...@@ -168,7 +177,7 @@ public slots: ...@@ -168,7 +177,7 @@ public slots:
void changeRenderFaces(const QString& view, const QString& map, bool b); void changeRenderFaces(const QString& view, const QString& map, bool b);
/** /**
* @brief change the style of rendering of faces (flat of phong) * @brief [PYTHON] change the style of rendering of faces (flat of phong)
* @param view the view name * @param view the view name
* @param map the map name * @param map the map name
* @param style 0:flat 1:phong * @param style 0:flat 1:phong
...@@ -176,7 +185,7 @@ public slots: ...@@ -176,7 +185,7 @@ public slots:
void changeFacesStyle(const QString& view, const QString& map, int style); void changeFacesStyle(const QString& view, const QString& map, int style);
/** /**
* @brief choose if boundary should be rendered or not. * @brief [PYTHON] choose if boundary should be rendered or not.
* @param view the view name * @param view the view name
* @param map the map name * @param map the map name
* @param b rendered or not * @param b rendered or not
...@@ -184,7 +193,7 @@ public slots: ...@@ -184,7 +193,7 @@ public slots:
void changeRenderBoundary(const QString& view, const QString& map, bool b); void changeRenderBoundary(const QString& view, const QString& map, bool b);
/** /**
* @brief change the color use for face rendering (when no volor VBO is used) * @brief [PYTHON] change the color use for face rendering (when no volor VBO is used)
* @param view the view name * @param view the view name
* @param map the map name * @param map the map name
* @param r red value [0,1] * @param r red value [0,1]
...@@ -194,7 +203,7 @@ public slots: ...@@ -194,7 +203,7 @@ public slots:
void changeFaceColor(const QString& view, const QString& map, float r, float g, float b); void changeFaceColor(const QString& view, const QString& map, float r, float g, float b);
/** /**
* @brief change the color use for edge line rendering. * @brief [PYTHON] change the color use for edge line rendering.
* @param view the view name * @param view the view name
* @param map the map name * @param map the map name
* @param r red value [0,1] * @param r red value [0,1]
...@@ -204,7 +213,7 @@ public slots: ...@@ -204,7 +213,7 @@ public slots:
void changeEdgeColor(const QString& view, const QString& map, float r, float g, float b); void changeEdgeColor(const QString& view, const QString& map, float r, float g, float b);
/** /**
* @brief change the color use for vertices point sprite rendering. * @brief [PYTHON] change the color use for vertices point sprite rendering.
* @param view the view name * @param view the view name
* @param map the map name * @param map the map name
* @param r red value [0,1] * @param r red value [0,1]
...@@ -214,7 +223,7 @@ public slots: ...@@ -214,7 +223,7 @@ public slots:
void changeVertexColor(const QString& view, const QString& map, float r, float g, float b); void changeVertexColor(const QString& view, const QString& map, float r, float g, float b);
/** /**
* @brief change the color use for back-faces. * @brief [PYTHON] change the color use for back-faces.
* @param view the view name * @param view the view name
* @param map the map name * @param map the map name
* @param r red value [0,1] * @param r red value [0,1]
...@@ -224,7 +233,7 @@ public slots: ...@@ -224,7 +233,7 @@ public slots:
void changeBackColor(const QString& view, const QString& map, float r, float g, float b); void changeBackColor(const QString& view, const QString& map, float r, float g, float b);
/** /**
* @brief choose if back-faces should be rendered. * @brief [PYTHON] choose if back-faces should be rendered.
* @param view the view name * @param view the view name
* @param map the map name * @param map the map name
* @param b * @param b
......
...@@ -37,6 +37,13 @@ struct MapParameters ...@@ -37,6 +37,13 @@ struct MapParameters
int expansion; int expansion;
}; };
/**
* Plugin for rendering a scalar attribute over a surface with colormap.
* The scalar attribute to render must have its generated VBO.
* A position VBO must be provided for surface rendering.
* All parameters are per view / per map.
*/
class Surface_RenderScalar_Plugin : public PluginInteraction class Surface_RenderScalar_Plugin : public PluginInteraction
{ {
Q_OBJECT Q_OBJECT
...@@ -84,7 +91,7 @@ private slots: ...@@ -84,7 +91,7 @@ private slots:
public slots: public slots:
// slots for Python calls // slots for Python calls
/** /**
* @brief change the position VBO use for rendering (for specific view and map) * @brief [PYTHON] change the position VBO use for rendering (for specific view and map)
* @param view the view name * @param view the view name
* @param map the map name * @param map the map name
* @param vbo the position vbo name * @param vbo the position vbo name
...@@ -92,7 +99,7 @@ public slots: ...@@ -92,7 +99,7 @@ public slots:
void changePositionVBO(const QString& view, const QString& map, const QString& vbo); void changePositionVBO(const QString& view, const QString& map, const QString& vbo);
/** /**
* @brief change the scalar VBO use for rendering (for specific view and map) * @brief [PYTHON] change the scalar VBO use for rendering (for specific view and map)
* @param view the view name * @param view the view name
* @param map the map name * @param map the map name
* @param vbo the scalar vbo name * @param vbo the scalar vbo name
...@@ -100,7 +107,7 @@ public slots: ...@@ -100,7 +107,7 @@ public slots:
void changeScalarVBO(const QString& view, const QString& map, const QString& vbo); void changeScalarVBO(const QString& view, const QString& map, const QString& vbo);
/** /**
* @brief change the kind of colormap. * @brief [PYTHON] change the kind of colormap.
* @param view the view name * @param view the view name
* @param map the map name * @param map the map name
* @param c 0:BWR 1:CWR 2:BCGYR 3:BGR * @param c 0:BWR 1:CWR 2:BCGYR 3:BGR
...@@ -108,7 +115,7 @@ public slots: ...@@ -108,7 +115,7 @@ public slots:
void changeColorMap(const QString& view, const QString& map, int c); void changeColorMap(const QString& view, const QString& map, int c);
/** /**
* @brief change the expansion of color-map * @brief [PYTHON] change the expansion of color-map
* @param view the view name * @param view the view name
* @param map the map name * @param map the map name
* @param i ???? * @param i ????
......
...@@ -14,7 +14,15 @@ namespace CGoGN ...@@ -14,7 +14,15 @@ namespace CGoGN
namespace SCHNApps namespace SCHNApps
{ {
/**
* Plugin for 2-Maps topology rendering.
* Some parameters are per view / per map:
* - drawing of relations and dart
* - colors
* Others are only per map (due to computation time):
* - position attribute
* - scale factors
*/
class Surface_RenderTopo_Plugin : public PluginInteraction class Surface_RenderTopo_Plugin : public PluginInteraction
{ {
Q_OBJECT Q_OBJECT
...@@ -96,7 +104,7 @@ private slots: ...@@ -96,7 +104,7 @@ private slots:
public slots: public slots:
// slots for Python calls // slots for Python calls
/** /**
* @brief choose to draw (or not) the darts * @brief [PYTHON] choose to draw (or not) the darts
* @param view the view name * @param view the view name
* @param map the map name * @param map the map name
* @param b draw or not * @param b draw or not
...@@ -104,7 +112,7 @@ public slots: ...@@ -104,7 +112,7 @@ public slots:
void changeDrawDarts(const QString& view, const QString& map, bool b); void changeDrawDarts(const QString& view, const QString& map, bool b);
/** /**
* @brief choose to draw (or not) the phi1 relations * @brief [PYTHON] choose to draw (or not) the phi1 relations
* @param view the view name * @param view the view name
* @param map the map name * @param map the map name
* @param b draw or not * @param b draw or not
...@@ -112,7 +120,7 @@ public slots: ...@@ -112,7 +120,7 @@ public slots:
void changeDrawPhi1(const QString& view, const QString& map, bool b); void changeDrawPhi1(const QString& view, const QString& map, bool b);
/** /**
* @brief choose to draw (or not) the phi2 relations * @brief [PYTHON] choose to draw (or not) the phi2 relations
* @param view the view name * @param view the view name
* @param map the map name * @param map the map name
* @param b draw or not * @param b draw or not
...@@ -120,7 +128,7 @@ public slots: ...@@ -120,7 +128,7 @@ public slots:
void changeDrawPhi2(const QString& view, const QString& map, bool b); void changeDrawPhi2(const QString& view, const QString& map, bool b);
/** /**
* @brief change the color use for dart * @brief [PYTHON] change the color use for dart
* @param view the view name * @param view the view name
* @param map the map name * @param map the map name
* @param color * @param color
...@@ -128,7 +136,7 @@ public slots: ...@@ -128,7 +136,7 @@ public slots:
void changeDartsColor(const QString& view, const QString& map, const QString& color); void changeDartsColor(const QString& view, const QString& map, const QString& color);
/** /**
* @brief change the color use for phi1 * @brief [PYTHON] change the color use for phi1
* @param view the view name * @param view the view name
* @param map the map name * @param map the map name
* @param color * @param color
...@@ -136,7 +144,7 @@ public slots: ...@@ -136,7 +144,7 @@ public slots:
void changePhi1Color(const QString& view, const QString& map, const QString& color); void changePhi1Color(const QString& view, const QString& map, const QString& color);
/** /**
* @brief change the color use for phi2 * @brief [PYTHON] change the color use for phi2
* @param view the view name * @param view the view name
* @param map the map name * @param map the map name
* @param color * @param color
...@@ -144,21 +152,21 @@ public slots: ...@@ -144,21 +152,21 @@ public slots:
void changePhi2Color(const QString& view, const QString& map, const QString& color); void changePhi2Color(const QString& view, const QString& map, const QString& color);
/** /**
* @brief change the position attribute of map for topo rendering * @brief [PYTHON] change the position attribute of map for topo rendering
* @param map the map name * @param map the map name
* @param attrName position attribute name * @param attrName position attribute name
*/ */
void changePositionAttribute(const QString& map, const QString& attrName); void changePositionAttribute(const QString& map, const QString& attrName);
/** /**
* @brief change the edges scaling factor * @brief [PYTHON] change the edges scaling factor
* @param map the map name * @param map the map name
* @param s scaling factor * @param s scaling factor
*/ */
void changeEdgesScaleFactor(const QString& map, float s); void changeEdgesScaleFactor(const QString& map, float s);
/** /**
* @brief change the faces scaling factor * @brief [PYTHON] change the faces scaling factor
* @param map the map name * @param map the map name
* @param s scaling factor * @param s scaling factor
*/ */
......
...@@ -24,6 +24,12 @@ struct MapParameters ...@@ -24,6 +24,12 @@ struct MapParameters
QList<float> scaleFactors; QList<float> scaleFactors;
}; };
/**
* Plugin for vector attributes rendering over a surface mesh
* Each vector attribute to render must be of dim 3, and have a VBO
* The length and color of each vector can be changed.
* All parameters are per view / per map.
*/
class Surface_RenderVector_Plugin : public PluginInteraction class Surface_RenderVector_Plugin : public PluginInteraction
{ {
Q_OBJECT Q_OBJECT
...@@ -70,7 +76,7 @@ private slots: ...@@ -70,7 +76,7 @@ private slots:
public slots: public slots:
// slots for Python calls // slots for Python calls
/** /**
* @brief change the position VBO use for rendering for specific view and map * @brief [PYTHON] change the position VBO use for rendering for specific view and map
* @param view the view name * @param view the view name
* @param map the map name * @param map the map name
* @param vbo * @param vbo
...@@ -78,7 +84,7 @@ public slots: ...@@ -78,7 +84,7 @@ public slots:
void changePositionVBO(const QString& view, const QString& map, const QString& vbo); void changePositionVBO(const QString& view, const QString& map, const QString& vbo);
/** /**
* @brief add a VBO use for rendering for specific view and map * @brief [PYTHON] add a VBO use for rendering for specific view and map
* @param view the view name * @param view the view name
* @param map the map name * @param map the map name
* @param vbo * @param vbo
...@@ -86,28 +92,28 @@ public slots: ...@@ -86,28 +92,28 @@ public slots:
void addVectorVBO(const QString& view, const QString& map, const QString& vbo); void addVectorVBO(const QString& view, const QString& map, const QString& vbo);
/** /**
* @brief removeVectorVBO * @brief [PYTHON] remove VBO of the corresponding vector
* @param view the view name * @param view the view name
* @param map the map name * @param map the map name
* @param vbo * @param vbo the vbo name
*/ */
void removeVectorVBO(const QString& view, const QString& map, const QString& vbo); void removeVectorVBO(const QString& view, const QString& map, const QString& vbo);
/** /**
* @brief changeVectorScaleFactor * @brief [PYTHON] change the vector scale factor
* @param view the view name * @param view the view name
* @param map the map name * @param map the map name
* @param vbo * @param vbo vbo vector name on which apply the scale
* @param f * @param f the floating point scale value
*/ */
void changeVectorScaleFactor(const QString& view, const QString& map, const QString& vbo, float f); void changeVectorScaleFactor(const QString& view, const QString& map, const QString& vbo, float f);
/** /**
* @brief changeVectorColor * @brief [PYTHON] change thet vector color
* @param view the view name * @param view the view name
* @param map the map name * @param map the map name
* @param vbo * @param vbo the vbo vector name
* @param col * @param col the color in QString format ("red" or "#FF0000")
*/ */
void changeVectorColor(const QString& view, const QString& map, const QString& vbo, const QString& col); void changeVectorColor(const QString& view, const QString& map, const QString& vbo, const QString& col);
......
...@@ -35,6 +35,13 @@ struct MapParameters ...@@ -35,6 +35,13 @@ struct MapParameters
QColor color; QColor color;
}; };
/**
* Plugin for cell selection (in conjonction with CellSelectors of MapHandlers)
* Selection of cells can be done: