[vtkusers] paint on plane, triggered by mouse event

Martin Waitzbauer mazzok at gmx.at
Sun Sep 18 15:35:59 EDT 2011


Hello, i want to write a small program, that is painting the tiles on a plane, if the user clicks the left mouse button

i tried it like this (most parts taken from http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ColorCells)

KeyPressInteractorStyle is a self written class, doesnt do anything special than logging left mouse buttons, if the user clicks the left button than arraydata at a speific location is being filled with a new value
Unforrtuantly i wasnt able to make it do so!
changes in the array arent displayed on the screen

so my quetion is, how can i access the plane grid data?

I added trhe source code file, maybe someone can help!

Thank alot!
-- 
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!		
Jetzt informieren: http://www.gmx.net/de/go/freephone
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ColorCells.cxx
Type: text/x-c++src
Size: 4000 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110918/083d4bf6/attachment.cxx>
-------------- next part --------------
cmake_minimum_required(VERSION 2.6)
 
PROJECT(ColorCells)
 
find_package(VTK REQUIRED)
include(${VTK_USE_FILE})
 
add_executable(ColorCells ColorCells.cxx)
 
if(VTK_LIBRARIES)
  target_link_libraries(ColorCells ${VTK_LIBRARIES})
else()
  target_link_libraries(ColorCells vtkHybrid )
endif()


More information about the vtkusers mailing list