Graphite  Version 3
An experimental 3D geometry processing program
mesh_grob_paint_tools.h File Reference

Tools to paint attributes on meshes. More...

#include <OGF/mesh_gfx/common/common.h>
#include <OGF/mesh_gfx/tools/mesh_grob_tool.h>

Go to the source code of this file.

Classes

class  OGF::MeshGrobPaintTool
 
class  OGF::MeshGrobPaintRect
 A rect selection tool that paints attribute values in a mesh. More...
 
class  OGF::MeshGrobPaint
 A tool that paints attribute values in a mesh. More...
 
class  OGF::MeshGrobPaintFreeform
 Paint attributes using free-form selection. More...
 
class  OGF::MeshGrobPaintConnected
 Paint attributes in connected components. More...
 
class  OGF::MeshGrobProbe
 A tool that probes attribute values in a mesh. More...
 
class  OGF::MeshGrobRuler
 A tool that measures distances. More...
 

Namespaces

 OGF
 Global Graphite namespace.
 

Enumerations

enum  OGF::PaintOp { OGF::PAINT_SET , OGF::PAINT_RESET , OGF::PAINT_INC , OGF::PAINT_DEC }
 A painting operation. More...
 

Detailed Description

Tools to paint attributes on meshes.

The tools can paint attributes of arbitrary types on mesh vertices, mesh facets or mesh cells. They also work for painting selections, implemented as Attribute<bool>. The tool systematically applies to the visible attribute selected in the current shader. If no visible attribute is selected, then the tool selects the vertices selection and displays it in the shader.

Two picking modes are available:

  • Standard mode is "what you see is what you pick": An image is generated behind the scene with picking ids instead of colors, and the picked element is found by reading the pixel value under the cursor. Rectangular zones can be also selected, then the list of picked element is found by reading all pixel values in the rectangle. Optionally, a mask can be applied to the picked rectangle before getting the picked element. It is used for paiting strokes and for free-form selection.
  • There is also an "xray mode", that picks all elements projected on the selection. It uses the same mask for stroke paiting and free-form selection, and tests for each element of the mesh whether it is projected on a set pixel in the mask.

For attributes attached to the vertices of the mesh, it is possible to indirectly select them by picking a facet or a cell. Then if a facet or a cell is picked, then all the facet or cell vertices are painted. This behavior can be switched of by selecting the 'paint_vertices_only' property.

Some properties are shared by all the painting tools. Changing it in one of the tools automatically changes it in all other tools. This concerns:

  • value to be painted. It can be also changed using the Probe tool
  • xray or standard picking mode
  • pick vertices only
  • accumulate (that is, add value to previous attribute instead of replacing it)

Definition in file mesh_grob_paint_tools.h.