[vtkusers] How to find proper member function of a particular class in vtk

TzuYi Yu tyyu01 at mail.apol.com.tw
Sun Mar 11 23:29:25 EST 2001


Dear VTK Users:

  In the graphics\examplesCxx\Cone4.cxx, 
there are some statements listed as follows:
----------Code Segment included -----------------
  vtkActor *cone1 = vtkActor::New();
    cone1->SetMapper(coneMapper);
    cone1->GetProperty()->SetColor(0.2000,0.6300,0.7900);
    cone1->GetProperty()->SetDiffuse(0.7);
    cone1->GetProperty()->SetSpecular(0.4);
    cone1->GetProperty()->SetSpecularPower(20);

----------End of included -----------------------
The cone1 is a pointer and points to vtkActor, 
however, when I check vtkActor, I can NOT find 
that vtkActor has member functions of GetProperty 
and SetMapper, so I assume that the superclass of 
vtkActor should have these member functions and 
the vtkActor just inherits them. But when I go to
the online menual page, and check for vtkActor, 
I found vtkActor->vtkProp3D->vtkProp->vtkObject, 
BUT vtkProp3D, vtkProp and vtkObject DON'T have 
GetProperty() member function!  Did I miss anything?
Can anyone tell me how the inheritance relationship?
(ie, why cone1->GetProperty() is legal?) 

Thanks, 


Robert Yu 





More information about the vtkusers mailing list