1 /*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkOptiXViewNodeFactory.cxx
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 =========================================================================*/
15 #include "vtkOptiXViewNodeFactory.h"
16 #include "vtkObjectFactory.h"
17
18 #include "vtkOptiXActorNode.h"
19 #include "vtkOptiXCameraNode.h"
20 #include "vtkOptiXCompositePolyDataMapper2Node.h"
21 #include "vtkOptiXLightNode.h"
22 #include "vtkOptiXRendererNode.h"
23 #include "vtkOptiXPolyDataMapperNode.h"
24
ren_maker()25 vtkViewNode *ren_maker()
26 {
27 vtkOptiXRendererNode *vn = vtkOptiXRendererNode::New();
28 return vn;
29 }
30
act_maker()31 vtkViewNode *act_maker()
32 {
33 vtkOptiXActorNode *vn = vtkOptiXActorNode::New();
34 return vn;
35 }
36
cam_maker()37 vtkViewNode *cam_maker()
38 {
39 vtkOptiXCameraNode *vn = vtkOptiXCameraNode::New();
40 return vn;
41 }
42
light_maker()43 vtkViewNode *light_maker()
44 {
45 vtkOptiXLightNode *vn = vtkOptiXLightNode::New();
46 return vn;
47 }
48
pd_maker()49 vtkViewNode *pd_maker()
50 {
51 vtkOptiXPolyDataMapperNode *vn = vtkOptiXPolyDataMapperNode::New();
52 return vn;
53 }
54
cpd_maker()55 vtkViewNode *cpd_maker()
56 {
57 vtkOptiXCompositePolyDataMapper2Node *vn =
58 vtkOptiXCompositePolyDataMapper2Node::New();
59 return vn;
60 }
61
62 //============================================================================
63 vtkStandardNewMacro(vtkOptiXViewNodeFactory);
64
65 //------------------------------------------------------------------------------
vtkOptiXViewNodeFactory()66 vtkOptiXViewNodeFactory::vtkOptiXViewNodeFactory()
67 {
68 //see vtkRenderWindow::GetRenderLibrary
69 this->RegisterOverride("vtkOpenGLRenderer", ren_maker);
70 this->RegisterOverride("vtkOpenGLActor", act_maker);
71 this->RegisterOverride("vtkPVLODActor", act_maker);
72 this->RegisterOverride("vtkOpenGLCamera", cam_maker);
73 this->RegisterOverride("vtkOpenGLLight", light_maker);
74 this->RegisterOverride("vtkPainterPolyDataMapper", pd_maker);
75 this->RegisterOverride("vtkOpenGLPolyDataMapper", pd_maker);
76 this->RegisterOverride("vtkCompositePolyDataMapper2", cpd_maker);
77 }
78
79 //------------------------------------------------------------------------------
~vtkOptiXViewNodeFactory()80 vtkOptiXViewNodeFactory::~vtkOptiXViewNodeFactory()
81 {
82 }
83
84 //------------------------------------------------------------------------------
PrintSelf(ostream & os,vtkIndent indent)85 void vtkOptiXViewNodeFactory::PrintSelf(ostream& os, vtkIndent indent)
86 {
87 this->Superclass::PrintSelf(os, indent);
88 }
89