[vtkusers] (no subject)
John Platt
jcplatt at lineone.net
Sun Feb 8 15:43:41 EST 2004
Jim,
Try moving your CView cleanup to OnDestroy() - by the time your
destructor is called, the window has probably been deleted.
-----Original Message-----
From: vtkusers-admin at vtk.org [mailto:vtkusers-admin at vtk.org] On Behalf
Of James C. Robinson
Sent: 08 February 2004 11:59
To: Vtkusers at Public. Kitware. Com
Subject: [vtkusers] (no subject)
Dear All,
I have used the vtkMFCRenderView as a base class for an MFC type view.
This
has being behaving correctly until I put I added a vtxAxes object using
the
sample code described at
http://public.kitware.com/pipermail/vtkusers/2001-September/007992.html
I adapted it to work in the MFC architecture (the vtAxes object is part
of
my Document etc.). It essentially works, except I now get a crash in the
destructor of the view base class (vtkMFCRenderView). The crash occurs
when
the last line is being executed (delete the Renderwindow). If I comment
it
out I get no crash, but I assume the window is not destroyed (which at
best
is tying up memory). Any ideas???
vtkMFCRenderView::~vtkMFCRenderView()
{
if (this->Interactor) { this->Interactor->Delete(); }
if (this->Renderer) { this->Renderer->SetRenderWindow(NULL); }
if (this->Renderer) { this->Renderer->Delete(); }
if (this->RenderWindow) { this->RenderWindow->Delete(); }
}
Also, Uwe Rempler, goes on to describe how he improved the axes in
Python.
The behaviour that I want is something like he describes:
1. Each axes a different colour (red, green, blue),
2. The render viewport for the axes to be transparent, so that it
doesn't
obscure any of the actors in the main renderer,
3. The axes to be labelled with x, y, z that at least rotate with the
axes
(ideally that move, but that keep oriented towards the camera),
4. Control over the main view using the axes (e.g. click on the z axis
and
the main view is rotated to a plan view etc.).
All suggestions welcomed.
Regards,
Jim
______________________
James C. Robinson, PhD,
Chartered Engineer,
Kepler Simulation Systems Ltd.,
Unit 10,
Melbourne Business Park,
Model Farm Road,
Cork,
Eire
Tel: +353-21-4822028
Tel: +353-21-4817267
Tel: +353-87-2393010
Fax: +353-21-4822721
E-mail: j.robinson at kepler-systems.com
______________________
_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at:
<http://public.kitware.com/cgi-bin/vtkfaq>
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list