File: vtkAbstractMapper3D.h

package info (click to toggle)
paraview 5.11.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 497,236 kB
  • sloc: cpp: 3,171,290; ansic: 1,315,072; python: 134,290; xml: 103,324; sql: 65,887; sh: 5,286; javascript: 4,901; yacc: 4,383; java: 3,977; perl: 2,363; lex: 1,909; f90: 1,255; objc: 143; makefile: 119; tcl: 59; pascal: 50; fortran: 29
file content (111 lines) | stat: -rw-r--r-- 3,308 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
/*=========================================================================

  Program:   Visualization Toolkit
  Module:    vtkAbstractMapper3D.h

  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
  All rights reserved.
  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.

     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE.  See the above copyright notice for more information.

=========================================================================*/
/**
 * @class   vtkAbstractMapper3D
 * @brief   abstract class specifies interface to map 3D data
 *
 * vtkAbstractMapper3D is an abstract class to specify interface between 3D
 * data and graphics primitives or software rendering techniques. Subclasses
 * of vtkAbstractMapper3D can be used for rendering geometry or rendering
 * volumetric data.
 *
 * This class also defines an API to support hardware clipping planes (at most
 * six planes can be defined). It also provides geometric data about the input
 * data it maps, such as the bounding box and center.
 *
 * @sa
 * vtkAbstractMapper vtkMapper vtkPolyDataMapper vtkVolumeMapper
 */

#ifndef vtkAbstractMapper3D_h
#define vtkAbstractMapper3D_h

#include "vtkAbstractMapper.h"
#include "vtkRenderingCoreModule.h" // For export macro

VTK_ABI_NAMESPACE_BEGIN
class vtkWindow;
class vtkDataSet;
class vtkMatrix4x4;

class VTKRENDERINGCORE_EXPORT vtkAbstractMapper3D : public vtkAbstractMapper
{
public:
  vtkTypeMacro(vtkAbstractMapper3D, vtkAbstractMapper);
  void PrintSelf(ostream& os, vtkIndent indent) override;

  /**
   * Return bounding box (array of six doubles) of data expressed as
   * (xmin,xmax, ymin,ymax, zmin,zmax).
   * Update this->Bounds as a side effect.
   */
  virtual double* GetBounds() VTK_SIZEHINT(6) = 0;

  /**
   * Get the bounds for this mapper as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
   */
  virtual void GetBounds(double bounds[6]);

  ///@{
  /**
   * Return the Center of this mapper's data.
   */
  double* GetCenter() VTK_SIZEHINT(3);
  void GetCenter(double center[3])
  {
    double* rc = this->GetCenter();
    center[0] = rc[0];
    center[1] = rc[1];
    center[2] = rc[2];
  }
  ///@}

  /**
   * Return the diagonal length of this mappers bounding box.
   */
  double GetLength();

  /**
   * Is this a ray cast mapper? A subclass would return 1 if the
   * ray caster is needed to generate an image from this mapper.
   */
  virtual vtkTypeBool IsARayCastMapper() { return 0; }

  /**
   * Is this a "render into image" mapper? A subclass would return 1 if the
   * mapper produces an image by rendering into a software image buffer.
   */
  virtual vtkTypeBool IsARenderIntoImageMapper() { return 0; }

  /**
   * Get the ith clipping plane as a homogeneous plane equation.
   * Use GetNumberOfClippingPlanes to get the number of planes.
   */
  void GetClippingPlaneInDataCoords(vtkMatrix4x4* propMatrix, int i, double planeEquation[4]);

protected:
  vtkAbstractMapper3D();
  ~vtkAbstractMapper3D() override = default;

  double Bounds[6];
  double Center[3];

private:
  vtkAbstractMapper3D(const vtkAbstractMapper3D&) = delete;
  void operator=(const vtkAbstractMapper3D&) = delete;
};

VTK_ABI_NAMESPACE_END
#endif