[vtkusers] How to make "eval plane SetOrigin [[pl3d GetOutput] GetCenter]" work in C++?

liushuyan treestone0 at hotmail.com
Thu Apr 10 09:59:23 EDT 2008


yes, I have write in that way, but there still comes errors.     code: vtkPLOT3DReader *pl3d = vtkPLOT3DReader::New();    pl3d->SetXYZFileName("combxyz.bin");    pl3d->SetQFileName("combq.bin");    pl3d->SetScalarFunctionNumber(100);    pl3d->SetVectorFunctionNumber(202);    pl3d->Update(); vtkPlane *plane = vtkPlane::New();    plane->SetOrigin(pl3d->GetOutput()->GetCenter());   error at the last line of the code:error C2027: use of undefined type 'vtkStructuredGrid'error C2227: left of '->GetCenter' must point to class/struct/union


Subject: RE: [vtkusers] How to make "eval plane SetOrigin [[pl3d GetOutput] GetCenter]" work in C++?Date: Thu, 10 Apr 2008 08:45:27 -0500From: Blezek.Daniel at mayo.eduTo: treestone0 at hotmail.com


Hi,
 
  In C++ it would be:
 
plane->SetOrigin ( pl3d->GetOutput()->GetCenter() );
 
eval in TCL breaks the list returned by [[pl3d GetOutput] GetCenter] into 3 distinct components required by plane SetOrigin. 
-dan
 


From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of liushuyanSent: Thursday, April 10, 2008 8:41 AMTo: vtkusers at vtk.orgSubject: [vtkusers] How to make "eval plane SetOrigin [[pl3d GetOutput] GetCenter]" work in C++?
Hi, everyone,    I am learning to translate vtk into c++ style, and hit some problems.    Can someone explain how to translate "eval plane SetOrigin [[pl3d GetOutput] GetCenter]"?    What does the "eval" mean? piece of the source code: vtkPLOT3DReader pl3d    pl3d SetXYZFileName "$VTK_DATA/combxyz.bin"    pl3d SetQFileName "$VTK_DATA/combq.bin"    pl3d SetScalarFunctionNumber 100    pl3d SetVectorFunctionNumber 202    pl3d UpdatevtkPlane plane    eval plane SetOrigin [[pl3d GetOutput] GetCenter]    plane SetNormal -0.287 0 0.9579
_________________________________________________________________
新年换新颜,快来妆扮自己的MSN给心仪的TA一个惊喜!
http://im.live.cn/emoticons/?ID=18
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080410/74508fa5/attachment.htm>


More information about the vtkusers mailing list