Developer documentation | Axl-2.5.1

axlRendererDelegate.h
Go to the documentation of this file.
1 /* axlRendererDelegate.h ---
2  *
3  * Author: Meriadeg Perrinel
4  * Copyright (C) 2008 - Meriadeg Perrinel, Inria.
5  * Created: Tue Nov 9 16:58:59 2010 (+0100)
6  * Version: $Id$
7  * Last-Updated: Tue Nov 9 17:09:38 2010 (+0100)
8  * By: Meriadeg Perrinel
9  * Update #: 19
10  */
11 
12 /* Commentary:
13  *
14  */
15 
16 /* Change log:
17  *
18  */
19 
20 /*=========================================================================
21 
22  Program: Visualization Toolkit
23  Module: axlRendererDelegate.h
24 
25  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
26  All rights reserved.
27  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
28 
29  This software is distributed WITHOUT ANY WARRANTY; without even
30  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
31  PURPOSE. See the above copyright notice for more information.
32 
33 =========================================================================*/
34 // .NAME axlRendererDelegate - Render the props of a axlRenderer
35 // .SECTION Description
36 // axlRendererDelegate is an abstract class with a pure virtual method Render.
37 // This method replaces the Render method of axlRenderer to allow custom
38 // rendering from an external project. A RendererDelegate is connected to
39 // a axlRenderer with method SetDelegate(). An external project just
40 // has to provide a concrete implementation of axlRendererDelegate.
41 
42 // .SECTION See Also
43 // axlRenderer
44 
45 #ifndef __axlRendererDelegate_h
46 #define __axlRendererDelegate_h
47 
48 #include "vtkObject.h"
49 
50 class axlRenderer;
51 
52 class VTK_RENDERING_EXPORT axlRendererDelegate : public vtkObject
53 {
54 public:
55  vtkTypeMacro(axlRendererDelegate,vtkObject);
56  void PrintSelf(ostream& os, vtkIndent indent);
57 
58  // Description:
59  // Render the props of axlRenderer if Used is on.
60  virtual void Render(axlRenderer *r)=0;
61 
62  // Description:
63  // Tells if the delegate has to be used by the renderer or not.
64  // Initial value is off.
65  vtkSetMacro(Used, bool);
66  vtkGetMacro(Used, bool);
67  vtkBooleanMacro(Used, bool);
68 
69 protected:
71  virtual ~axlRendererDelegate();
72 
73  bool Used;
74 
75 private:
76  axlRendererDelegate(const axlRendererDelegate&); // Not implemented.
77  void operator=(const axlRendererDelegate&); // Not implemented.
78 };
79 
80 #endif