<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.3314" name=GENERATOR></HEAD>
<BODY style="MARGIN: 4px 4px 1px; FONT: 10pt Tahoma">
<DIV>I wonder if anybody could give me any hint? I try to make a subclass of vtkCamera (say tmpCamera), but by using tmpCamera,&nbsp;no actor shows up. but if I just replace&nbsp;"tmpCamera *camera = new tmpCamera;" with "vtkCamera *camera = vtkCamera::New();"&nbsp;, the actor shows up. Here is the code:</DIV>
<DIV>&nbsp;</DIV>
<DIV>#include "vtkRenderer.h"<BR>#include "vtkRenderWindow.h"<BR>#include "vtkRenderWindowInteractor.h"<BR>#include "vtkPolyDataMapper.h"<BR>#include "vtkActor.h"<BR>#include "vtkProperty.h"<BR>#include "vtkCamera.h"<BR>#include "vtkInteractorStyleTrackballCamera.h"<BR>#include "vtkCubeSource.h"</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>class tmpCamera :public vtkCamera{};</DIV>
<DIV>&nbsp;</DIV>
<DIV>int main_rotate_about_picked_point( int argc, char *argv[] )<BR>{<BR>&nbsp;vtkCubeSource *cube = vtkCubeSource::New();<BR>&nbsp;vtkPolyDataMapper* mapper = vtkPolyDataMapper::New();<BR>&nbsp;&nbsp;mapper-&gt;SetInput(cube-&gt;GetOutput());<BR>&nbsp;&nbsp;mapper-&gt;ScalarVisibilityOff();</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;vtkActor* actor = vtkActor::New();<BR>&nbsp;&nbsp;actor-&gt;SetMapper(mapper);<BR>&nbsp;&nbsp;actor-&gt;SetPosition(0.0,0.0,-3.0);<BR>&nbsp;&nbsp;actor-&gt;GetProperty()-&gt;SetColor(0.0,1.0,0.0);</DIV>
<DIV>&nbsp;</DIV>
<DIV>vtkInteractorStyleTrackballCamera *style = vtkInteractorStyleTrackballCamera::New();<BR>&nbsp;<BR>&nbsp;vtkRenderer *ren = vtkRenderer::New();<BR>&nbsp;tmpCamera* camera = new tmpCamera();</DIV>
<DIV>&nbsp;&nbsp;&nbsp; ren-&gt;SetActiveCamera(camera);<BR>&nbsp;&nbsp; &nbsp;ren-&gt;AddActor(actor);</DIV>
<DIV>&nbsp;</DIV>
<DIV>vtkRenderWindow *renwin = vtkRenderWindow::New();<BR>&nbsp;&nbsp;renwin-&gt;AddRenderer(ren);<BR>&nbsp;&nbsp;<BR>&nbsp;vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();<BR>&nbsp;&nbsp;iren-&gt;SetRenderWindow(renwin);<BR>&nbsp;&nbsp;iren-&gt;SetInteractorStyle(style);<BR>&nbsp;<BR>&nbsp;renwin-&gt;SetSize(600,600);<BR>&nbsp;renwin-&gt;Render();<BR>&nbsp;iren-&gt;Initialize();<BR>&nbsp;iren-&gt;Start();<BR>&nbsp;<BR>&nbsp;return 0;</DIV>
<DIV>}<BR>&nbsp;</DIV>
<DIV>What did I do wrong? thanks a lot</DIV>
<DIV>&nbsp;</DIV>
<DIV>Yanbing</DIV></BODY></HTML>

______________________________________________________________ <BR>
<BR>
Reputation Resources Results <BR>
<BR>
http://www.rwdi.com <BR>
<BR>
______________________________________________________________ <BR>
<BR>
This communication is intended for the sole use of the party to whom it <BR>
is addressed and may contain information that is privileged and/or <BR>
confidential. Any other distribution, copying or disclosure is strictly<BR>
prohibited. If you have received this e-mail in error, please notify us<BR>
immediately by telephone (1-519-823-1311) and delete the message without <BR>
retaining any hard or electronic copies of same. <BR>
<BR>
RWDI scans outgoing emails for viruses, but makes no warranty as to their<BR>
absence in this email or attachments.<BR>
</BODY></HTML>