[vtkusers] Switch off bounding box
Deelip Menezes
deelipmenezes at gmail.com
Fri Jul 28 03:53:47 EDT 2006
Paul,
To prevent the bounding box from displaying, I use the good old technique of
deriving my own interactor class and overiding the highlight functions to do
nothing. Here is my class.
class vtkMyInteractorStyleTrackballCamera : public
vtkInteractorStyleTrackballCamera
{
public:
vtkMyInteractorStyleTrackballCamera() {};
~vtkMyInteractorStyleTrackballCamera() {};
public:
static vtkMyInteractorStyleTrackballCamera* New()
{
return new vtkMyInteractorStyleTrackballCamera;
};
virtual void HighlightActor2D(vtkActor2D* actor2D) {};
virtual void HighlightProp(vtkProp* prop) {};
virtual void HighlightProp3D(vtkProp3D* prop3D) {};
};
This works for me. Hope this helps.
Regards,
Deelip Menezes
-----Original Message-----
From: vtkusers-bounces+deelipmenezes=gmail.com at vtk.org
[mailto:vtkusers-bounces+deelipmenezes=gmail.com at vtk.org] On Behalf Of Paul
Tait - OPES
Sent: Friday, July 28, 2006 10:28 AM
To: vtkusers at vtk.org
Subject: [vtkusers] Switch off bounding box
In my mainline I do this
pickCmd = vtkCallbackCommand::New();
pickCmd->SetCallback(Fpm3D::PickCells);
pickCmd->SetClientData(this);
this->Interactor->AddObserver(vtkCommand::EndPickEvent, pickCmd);
In my pick function I do this
// static
void Fpm3D::PickCells(vtkObject *caller, unsigned long eid, void
*clientdata, void *calldata)
// switch off bounding box
vtkInteractorStyle *ptr;
if (ptr =
vtkInteractorStyle::SafeDownCast(fpm3d->Interactor->GetInteractorStyle())) {
ptr->HighlightProp(NULL);
}
BUT the bounding box stays on. Its been asked many times before in the NG
why doesn't it work?
Thanks Paul Tait
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.4/402 - Release Date: 27/07/2006
_______________________________________________
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
More information about the vtkusers
mailing list