1 /*=========================================================================
2 
3   Program:   Visualization Toolkit
4   Module:    vtkVolumeNode.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 "vtkVolumeNode.h"
16 
17 #include "vtkAbstractVolumeMapper.h"
18 #include "vtkCellArray.h"
19 #include "vtkMapper.h"
20 #include "vtkMath.h"
21 #include "vtkMatrix4x4.h"
22 #include "vtkObjectFactory.h"
23 #include "vtkPoints.h"
24 #include "vtkPolyData.h"
25 #include "vtkPolygon.h"
26 #include "vtkProperty.h"
27 #include "vtkVolume.h"
28 
29 //============================================================================
30 vtkStandardNewMacro(vtkVolumeNode);
31 
32 //------------------------------------------------------------------------------
33 vtkVolumeNode::vtkVolumeNode() = default;
34 
35 //------------------------------------------------------------------------------
36 vtkVolumeNode::~vtkVolumeNode() = default;
37 
38 //------------------------------------------------------------------------------
Build(bool prepass)39 void vtkVolumeNode::Build(bool prepass)
40 {
41   if (prepass)
42   {
43     vtkVolume* mine = vtkVolume::SafeDownCast(this->GetRenderable());
44     if (!mine)
45     {
46       return;
47     }
48     if (!mine->GetMapper())
49     {
50       return;
51     }
52 
53     this->PrepareNodes();
54     this->AddMissingNode(mine->GetMapper());
55     this->RemoveUnusedNodes();
56   }
57 }
58 
59 //------------------------------------------------------------------------------
PrintSelf(ostream & os,vtkIndent indent)60 void vtkVolumeNode::PrintSelf(ostream& os, vtkIndent indent)
61 {
62   this->Superclass::PrintSelf(os, indent);
63 }
64