[vtkusers] Help subclassing a vtkActor

Alex Lear alear at cns.montana.edu
Mon Jul 26 12:51:19 EDT 2004


I am trying to subclass a vtkActor but it doesn't appear to be working
when I try to use my class.   The actor is not showing up in the
renderer when I change from vtkActor to my class, viewerActor.  The
header and source files are below.

Thanks for any help.
Alex


HEADER FILE:

#ifndef __viewerActor_h
#define __viewerActor_h

#include "vtkActor.h"

class VTK_RENDERING_EXPORT viewerActor : public vtkActor
{
public:
  static viewerActor *New();
  vtkTypeMacro(viewerActor,vtkActor);

protected:
  viewerActor();
  ~viewerActor();

private:

};
#endif




C++ SOURCE FILE:

#include "viewerActor.h"
#include "vtkActor.h"

viewerActor::viewerActor()
{
cout << "VIEWER ACTOR CREATED" << endl;
}

viewerActor::~viewerActor()
{
}

viewerActor* viewerActor::New()
{
  return new viewerActor;
}





More information about the vtkusers mailing list