VTK
vtkFollower.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkFollower.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
32 #ifndef vtkFollower_h
33 #define vtkFollower_h
34 
35 #include "vtkRenderingCoreModule.h" // For export macro
36 #include "vtkActor.h"
37 
38 class vtkCamera;
39 
40 class VTKRENDERINGCORE_EXPORT vtkFollower : public vtkActor
41 {
42  public:
43  vtkTypeMacro(vtkFollower,vtkActor);
44  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
45 
49  static vtkFollower *New();
50 
52 
56  virtual void SetCamera(vtkCamera*);
57  vtkGetObjectMacro(Camera, vtkCamera);
59 
61 
66  int RenderOpaqueGeometry(vtkViewport *viewport) VTK_OVERRIDE;
67  int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) VTK_OVERRIDE;
68  virtual void Render(vtkRenderer *ren);
70 
74  int HasTranslucentPolygonalGeometry() VTK_OVERRIDE;
75 
79  void ReleaseGraphicsResources(vtkWindow*) VTK_OVERRIDE;
80 
85  void ComputeMatrix() VTK_OVERRIDE;
86 
90  void ShallowCopy(vtkProp *prop) VTK_OVERRIDE;
91 
92 protected:
93  vtkFollower();
94  ~vtkFollower() VTK_OVERRIDE;
95 
96  vtkCamera *Camera;
97  vtkActor *Device;
98 
99 private:
100  vtkFollower(const vtkFollower&) VTK_DELETE_FUNCTION;
101  void operator=(const vtkFollower&) VTK_DELETE_FUNCTION;
102 
103  // hide the two parameter Render() method from the user and the compiler.
104  void Render(vtkRenderer *, vtkMapper *) VTK_OVERRIDE {}
105 
106  //Internal matrices to avoid New/Delete for performance reasons
107  vtkMatrix4x4 *InternalMatrix;
108 };
109 
110 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:44
virtual void Render(vtkRenderer *, vtkMapper *)
This causes the actor to be rendered.
Definition: vtkActor.h:84
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:45
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:35
abstract specification for Viewports
Definition: vtkViewport.h:44
int HasTranslucentPolygonalGeometry() override
Does this prop have some translucent polygonal geometry?
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
abstract specification for renderers
Definition: vtkRenderer.h:57
static vtkActor * New()
Creates an actor with the following defaults: origin(0,0,0) position=(0,0,0) scale=(1,1,1) visibility=1 pickable=1 dragable=1 orientation=(0,0,0).
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
a simple class to control print indentation
Definition: vtkIndent.h:33
a virtual camera for 3D rendering
Definition: vtkCamera.h:44
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:85
a subclass of actor that always faces the camera
Definition: vtkFollower.h:40
int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override
Support the standard render methods.
int RenderOpaqueGeometry(vtkViewport *viewport) override
Support the standard render methods.