[vtkusers] change the color of the"picked" cell
Paul Tait - OPES
Paul at opes.com.au
Tue Mar 15 20:26:01 EST 2005
Actor->GetProperty()->SetColor(1, 1, 1);
-----Original Message-----
From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On
Behalf Of Tracy
Sent: Wednesday, 16 March 2005 9:03 AM
To: de Boer Ingo
Cc: vtkuser
Subject: [vtkusers] change the color of the"picked" cell
Hi Dr Ingo,
Thanks for your quick and helpful reply. Based on your suggestion, my
code works now.
But I also got another question:
How to change the colour of the "picked" cell which is implemented by
vtkCellPicker?
I work with a 3D vtkPolyData model.
Thanks in advance.
Tracy
----- Original Message -----
From: "de Boer Ingo" <I.deBoer at polytec.de>
To: "Tracy" <flypureau at hotmail.com>; "vtkuser" <vtkusers at vtk.org>
Sent: Tuesday, March 15, 2005 6:19 PM
Subject: RE: [vtkusers] vtk picking
Hi Tracy,
you get "-1" because you didn't start the picker callback.
with StartPickCallback. Look at the lines of vtkInteractorStyle.cxx:
Search for "'p'". This is what happens, when you press "p". Your version
works with LeftButtonPressEvent when you press "p" before you press the
left mouse button.
The easiest way for you would be to write your own interactor.
greets
Ingo
---
Dr.-Ing. Ingo H. de Boer
Polytec GmbH
Polytec-Platz 1-7, 76337 Waldbronn, Germany
phone: ++49 7243 604 106
fax : ++49 7243 604 255
> It is my first time to use vtkCellPicker and the related classes.
> Unfortunately, I never get any code works well for me regardless of
> writing by myself or downloading from Internet. One example is from
> http://public.kitware.com/pipermail/vtkusers/2004-April/073344.html,
> but it looks that "vtkCommand::EndPickEvent" doesn't show any effect,
> if I use "LeftButtonPressEvent" instead of "EndPickEvent" ,
> the printed
> value is always "-1" ,which means I never picked any point.
> Anybody can tell me why?
_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at:
http://www.vtk.org/Wiki/VTK_FAQ Follow this link to
subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers
--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.7.3 - Release Date: 15/03/2005
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.7.3 - Release Date: 15/03/2005
More information about the vtkusers
mailing list