Commit 02a67915 authored by Sylvain Thery's avatar Sylvain Thery

doc schnapps

parent ad631239
......@@ -43,11 +43,32 @@ private slots:
void schnappsClosing();
public slots:
/**
* @brief compute the normals of a mesh
* @param mapName name of the 2d map (mesh)
* @param positionAttributeName name of position attribute used for computation
* @param normalAttributeName name of result attribute
* @param autoUpdate automatically update the normal attribute when position attribute change.
*/
void computeNormal(const QString& mapName,
const QString& positionAttributeName = "position",
const QString& normalAttributeName = "normal",
bool autoUpdate = true);
/**
* @brief compute curvatures of a mesh
* @param mapName name of 2d map
* @param positionAttributeName name of input position attribute
* @param normalAttributeName name of input normal attributes
* @param KmaxAttributeName ?? result attribute aname
* @param kmaxAttributeName ?? result attribute aname
* @param KminAttributeName ?? result attribute aname
* @param kminAttributeName ?? result attribute aname
* @param KnormalAttributeName ?? result attribute aname
* @param compute_kmean compute the mean curvature
* @param compute_kgaussian compute the gaussian curvature
* @param autoUpdate automatically update the output attributes when input attribute change.
*/
void computeCurvature(
const QString& mapName,
const QString& positionAttributeName = "position",
......
......@@ -36,6 +36,15 @@ private slots:
void schnappsClosing();
public slots:
/**
* @brief compute distance between 2 maps
* @param mapName1 name of first map
* @param positionAttributeName1 name of first map position attribute
* @param distanceAttributeName1 name of first map distance attribute
* @param mapName2 name of second map
* @param positionAttributeName2 name of second map position attribute
* @param distanceAttributeName2 name of second map distance attribute
*/
void computeDistance(
const QString& mapName1,
const QString& positionAttributeName1,
......
......@@ -29,10 +29,28 @@ private:
virtual void disable() {}
public slots:
/**
* @brief import a mesh from a file
* @param fileName file name of mesh file
* @return the new maphandler that handle the mesh
*/
MapHandlerGen* importMeshFromFile(const QString& fileName);
/**
* @brief import a mesh by opening a FileDialog
*/
void importMeshFromFileDialog();
/**
* @brief import an image into a mesh from a file
* @param fileName file name of mesh file
* @return
*/
MapHandlerGen* importImageFromFile(const QString& fileName);
/**
* @brief import image into a mesh by opening a FileDialog
*/
void importImageFromFileDialog();
private:
......
......@@ -111,19 +111,124 @@ private slots:
public slots:
// slots for Python calls
/**
* @brief change the position VBO use for rendering for specific view and map
* @param view the view name
* @param map the map name
* @param vbo the positionvbo name
*/
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
* @param view the view name
* @param map the map name
* @param vbo the normal vbo name
*/
void changeNormalVBO(const QString& view, const QString& map, const QString& vbo);
/**
* @brief change the color VBO use for rendering for specific view and map
* @param view the view name
* @param map the map name
* @param vbo the normal vbo name
*/
void changeColorVBO(const QString& view, const QString& map, const QString& vbo);
/**
* @brief choice if vertices should be rendered (for specific view and map)
* @param view the view name
* @param map the map name
* @param b rendered or not
*/
void changeRenderVertices(const QString& view, const QString& map, bool b);
/**
* @brief change the size of vertices VerticesScaleFactor
* @param view the view name
* @param map the map name
* @param f scale parameter [0,2]
*/
void changeVerticesScaleFactor(const QString&view, const QString& map, float f);
/**
* @brief choice if edges should be rendered (for specific view and map)
* @param view the view name
* @param map the map name
* @param b rendered or not
*/
void changeRenderEdges(const QString& view, const QString& map, bool b);
/**
* @brief choice if faces should be rendered (for specific view and map)
* @param view the view name
* @param map the map name
* @param b rendered or not
*/
void changeRenderFaces(const QString& view, const QString& map, bool b);
void changeFacesStyle(const QString& view, const QString& map, int);
/**
* @brief change the style of rendering of faces (flat of phong)
* @param view the view name
* @param map the map name
* @param style 0:flat 1:phong
*/
void changeFacesStyle(const QString& view, const QString& map, int style);
/**
* @brief choose if boundary should be rendered or not.
* @param view the view name
* @param map the map name
* @param b rendered or not
*/
void changeRenderBoundary(const QString& view, const QString& map, bool b);
/**
* @brief change the color use for face rendering (when no volor VBO is used)
* @param view the view name
* @param map the map name
* @param r red value [0,1]
* @param g green value [0,1]
* @param b blue value [0,1]
*/
void changeFaceColor(const QString& view, const QString& map, float r, float g, float b);
/**
* @brief change the color use for edge line rendering.
* @param view the view name
* @param map the map name
* @param r red value [0,1]
* @param g green value [0,1]
* @param b blue value [0,1]
*/
void changeEdgeColor(const QString& view, const QString& map, float r, float g, float b);
/**
* @brief change the color use for vertices point sprite rendering.
* @param view the view name
* @param map the map name
* @param r red value [0,1]
* @param g green value [0,1]
* @param b blue value [0,1]
*/
void changeVertexColor(const QString& view, const QString& map, float r, float g, float b);
/**
* @brief change the color use for back-faces.
* @param view the view name
* @param map the map name
* @param r red value [0,1]
* @param g green value [0,1]
* @param b blue value [0,1]
*/
void changeBackColor(const QString& view, const QString& map, float r, float g, float b);
/**
* @brief choose if back-faces should be rendered.
* @param view the view name
* @param map the map name
* @param b
*/
void changeRenderBackfaces(const QString& view, const QString& map, bool b);
......
......@@ -83,11 +83,37 @@ private slots:
public slots:
// slots for Python calls
/**
* @brief change the position VBO use for rendering (for specific view and map)
* @param view the view name
* @param map the map name
* @param vbo the position vbo name
*/
void changePositionVBO(const QString& view, const QString& map, const QString& vbo);
/**
* @brief change the scalar VBO use for rendering (for specific view and map)
* @param view the view name
* @param map the map name
* @param vbo the scalar vbo name
*/
void changeScalarVBO(const QString& view, const QString& map, const QString& vbo);
/**
* @brief change the kind of colormap.
* @param view the view name
* @param map the map name
* @param c 0:BWR 1:CWR 2:BCGYR 3:BGR
*/
void changeColorMap(const QString& view, const QString& map, int c);
void changeExpansion(const QString& view, const QString& map, int i);
/**
* @brief change the expansion of color-map
* @param view the view name
* @param map the map name
* @param i ????
*/
void changeExpansion(const QString& view, const QString& map, int i);
protected:
Surface_RenderScalar_DockTab* m_dockTab;
......
......@@ -95,15 +95,73 @@ private slots:
public slots:
// slots for Python calls
/**
* @brief choose to draw (or not) the darts
* @param view the view name
* @param map the map name
* @param b draw or not
*/
void changeDrawDarts(const QString& view, const QString& map, bool b);
/**
* @brief choose to draw (or not) the phi1 relations
* @param view the view name
* @param map the map name
* @param b draw or not
*/
void changeDrawPhi1(const QString& view, const QString& map, bool b);
/**
* @brief choose to draw (or not) the phi2 relations
* @param view the view name
* @param map the map name
* @param b draw or not
*/
void changeDrawPhi2(const QString& view, const QString& map, bool b);
/**
* @brief change the color use for dart
* @param view the view name
* @param map the map name
* @param color
*/
void changeDartsColor(const QString& view, const QString& map, const QString& color);
/**
* @brief change the color use for phi1
* @param view the view name
* @param map the map name
* @param color
*/
void changePhi1Color(const QString& view, const QString& map, const QString& color);
/**
* @brief change the color use for phi2
* @param view the view name
* @param map the map name
* @param color
*/
void changePhi2Color(const QString& view, const QString& map, const QString& color);
/**
* @brief change the position attribute of map for topo rendering
* @param map the map name
* @param attrName position attribute name
*/
void changePositionAttribute(const QString& map, const QString& attrName);
/**
* @brief change the edges scaling factor
* @param map the map name
* @param s scaling factor
*/
void changeEdgesScaleFactor(const QString& map, float s);
/**
* @brief change the faces scaling factor
* @param map the map name
* @param s scaling factor
*/
void changeFacesScaleFactor(const QString& map, float s);
//signals:
......
......@@ -69,10 +69,46 @@ private slots:
public slots:
// slots for Python calls
/**
* @brief change the position VBO use for rendering for specific view and map
* @param view the view name
* @param map the map name
* @param vbo
*/
void changePositionVBO(const QString& view, const QString& map, const QString& vbo);
/**
* @brief add a VBO use for rendering for specific view and map
* @param view the view name
* @param map the map name
* @param vbo
*/
void addVectorVBO(const QString& view, const QString& map, const QString& vbo);
/**
* @brief removeVectorVBO
* @param view the view name
* @param map the map name
* @param vbo
*/
void removeVectorVBO(const QString& view, const QString& map, const QString& vbo);
/**
* @brief changeVectorScaleFactor
* @param view the view name
* @param map the map name
* @param vbo
* @param f
*/
void changeVectorScaleFactor(const QString& view, const QString& map, const QString& vbo, float f);
/**
* @brief changeVectorColor
* @param view the view name
* @param map the map name
* @param vbo
* @param col
*/
void changeVectorColor(const QString& view, const QString& map, const QString& vbo, const QString& col);
protected:
......
......@@ -67,8 +67,9 @@ public slots:
View* getSelectedView() const { return m_selectedView; }
void setSelectedView(View* view);
void setSelectedView(const QString& name);
void splitView(const QString& name, Qt::Orientation orientation);
View* splitView(const QString& name, Qt::Orientation orientation);
QString saveSplitViewPositions();
void restoreSplitViewPositions(QString stringStates);
......@@ -153,9 +154,9 @@ public slots:
void loadPythonScriptFromFile(const QString& fileName);
/**
* associated a python command with a key shortcut
* Associate a python command with a key shortcut
* @param keys example "control a", "alt shift B" "control keypad +"
* @param a python cmd
* @param command a python cmd
*/
void setPythonShortcut(const QString& keys, const QString& command);
......
......@@ -308,12 +308,14 @@ void SCHNApps::setSelectedView(View* view)
m_selectedView->updateGL();
}
void SCHNApps::splitView(const QString& name, Qt::Orientation orientation)
void SCHNApps::setSelectedView(const QString& name)
{
// RECORDING
if (m_pyRecording)
*m_pyRecording << "schnapps.splitView(\"" << name << "\", " << orientation << ");" << endl;
View* v = this->getView(name);
setSelectedView(v);
}
View* SCHNApps::splitView(const QString& name, Qt::Orientation orientation)
{
View* newView = addView();
View* view = m_views[name];
......@@ -350,6 +352,12 @@ void SCHNApps::splitView(const QString& name, Qt::Orientation orientation)
sz[1] = tot - sz[0];
spl->setSizes(sz);
}
// RECORDING
if (m_pyRecording)
*m_pyRecording << newView->getName() << " = schnapps.splitView(\"" << name << "\", " << orientation << ");" << endl;
return newView;
}
QString SCHNApps::saveSplitViewPositions()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment