cnr-isti-vclab / meshlabjs

A javascript client based mesh processing tool. Built using vcg library, emscripten and webgl
http://www.meshlabjs.net
GNU Affero General Public License v3.0
227 stars 51 forks source link

Add another class of plugins: tools #41

Open cignoni opened 9 years ago

cignoni commented 9 years ago

There is another class of plugins that should be added with its own tab: Tools

'Tools' are pieces of functionality that include direct interaction with the mesh itself by mean of mouse actions:

Each tool plugin should manage mouse input, Should have a clear start/stop The tool tab contains an icon for each tool. The first icon is a trackball and it allow to return to the standard browsing mode. The space below the trackball is used for tool parameter. Somewhere on the screen there should be a remainder of what tool mode the system is.

To allow a robust way of implementing undo each tool can modify the mesh(es) only by mean of c++ functions that take in input a mesh and some parameters like camera and finalized mouse input (e.g. the selection tool works by calling a c++ function that take in input the view parameters and the on screen rectangle given by the user).

cignoni commented 8 years ago

The main idea is that at certain event the js part invokes a cpp function that perform the "hard" part of the task (like for example selecting or reporting the info about the clicked point).

For this task we need a consistent way to pass the viewing information between the js system and the cpp part. This is fundamental because the processing part is done with actions defined in screen space.

For example this is what happens when the info picking tools is started: