This file is indexed.

/usr/include/vtk-5.8/vtkAreaPicker.h is in libvtk5-dev 5.8.0-5.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
/*=========================================================================

  Program:   Visualization Toolkit
  Module:    vtkAreaPicker.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.

=========================================================================*/
// .NAME vtkAreaPicker - Picks props behind a selection rectangle on a viewport.
//
// .SECTION Description
// The vtkAreaPicker picks all vtkProp3Ds that lie behind the screen space 
// rectangle from x0,y0 and x1,y1. The selection is based upon the bounding
// box of the prop and is thus not exact.
//
// Like vtkPicker, a pick results in a list of Prop3Ds because many props may 
// lie within the pick frustum. You can also get an AssemblyPath, which in this
// case is defined to be the path to the one particular prop in the Prop3D list
// that lies nearest to the near plane. 
//
// This picker also returns the selection frustum, defined as either a
// vtkPlanes, or a set of eight corner vertices in world space. The vtkPlanes 
// version is an ImplicitFunction, which is suitable for use with the
// vtkExtractGeometry. The six frustum planes are in order: left, right, 
// bottom, top, near, far
//
// Because this picker picks everything within a volume, the world pick point 
// result is ill-defined. Therefore if you ask this class for the world pick 
// position, you will get the centroid of the pick frustum. This may be outside
// of all props in the prop list.
//
// .SECTION See Also
// vtkInteractorStyleRubberBandPick, vtkExtractSelectedFrustum.

#ifndef __vtkAreaPicker_h
#define __vtkAreaPicker_h

#include "vtkAbstractPropPicker.h"

class vtkRenderer;
class vtkPoints;
class vtkPlanes;
class vtkProp3DCollection;
class vtkAbstractMapper3D;
class vtkDataSet;
class vtkExtractSelectedFrustum;
class vtkProp;
class vtkImageActor;

class VTK_RENDERING_EXPORT vtkAreaPicker : public vtkAbstractPropPicker
{
public:
  static vtkAreaPicker *New();
  vtkTypeMacro(vtkAreaPicker,vtkAbstractPropPicker);
  void PrintSelf(ostream& os, vtkIndent indent);

  // Description:
  // Set the default screen rectangle to pick in.
  void SetPickCoords(double x0, double y0, double x1, double y1);
  
  // Description:
  // Set the default renderer to pick on.
  void SetRenderer(vtkRenderer *);

  // Description:
  // Perform an AreaPick within the default screen rectangle and renderer.
  virtual int Pick();

  // Description:
  // Perform pick operation in volume behind the given screen coordinates.
  // Props intersecting the selection frustum will be accessible via GetProp3D.
  // GetPlanes returns a vtkImplicitFunciton suitable for vtkExtractGeometry.
  virtual int AreaPick(double x0, double y0, double x1, double y1, vtkRenderer *renderer = NULL);

  // Description:
  // Perform pick operation in volume behind the given screen coordinate.
  // This makes a thin frustum around the selected pixel.
  // Note: this ignores Z in order to pick everying in a volume from z=0 to z=1.
  virtual int Pick(double x0, double y0, double vtkNotUsed(z0), vtkRenderer *renderer = NULL)
    {return this->AreaPick(x0, y0, x0+1.0, y0+1.0, renderer);};

  // Description:
  // Return mapper that was picked (if any).
  vtkGetObjectMacro(Mapper,vtkAbstractMapper3D);

  // Description:
  // Get a pointer to the dataset that was picked (if any). If nothing 
  // was picked then NULL is returned.
  vtkGetObjectMacro(DataSet,vtkDataSet);

  // Description:
  // Return a collection of all the prop 3D's that were intersected
  // by the pick ray. This collection is not sorted.
  vtkProp3DCollection *GetProp3Ds() {return this->Prop3Ds;};

  // Description:
  // Return the six planes that define the selection frustum. The implicit 
  // function defined by the planes evaluates to negative inside and positive
  // outside.
  vtkGetObjectMacro(Frustum, vtkPlanes);

  // Description:
  // Return eight points that define the selection frustum.
  vtkGetObjectMacro(ClipPoints, vtkPoints);

protected:
  vtkAreaPicker();
  ~vtkAreaPicker();

  virtual void Initialize();
  void DefineFrustum(double x0, double y0, double x1, double y1, vtkRenderer *renderer);
  virtual int PickProps(vtkRenderer *renderer);  
  int TypeDecipher(vtkProp *, vtkImageActor **, vtkAbstractMapper3D **);

  int ABoxFrustumIsect(double bounds[], double &mindist);

  vtkPoints *ClipPoints;
  vtkPlanes *Frustum;

  vtkProp3DCollection *Prop3Ds; //candidate actors (based on bounding box)
  vtkAbstractMapper3D *Mapper; //selected mapper (if the prop has a mapper)
  vtkDataSet *DataSet; //selected dataset (if there is one)

  //used internally to do prop intersection tests
  vtkExtractSelectedFrustum *FrustumExtractor;

  double X0;
  double Y0;
  double X1;
  double Y1;

private:
  vtkAreaPicker(const vtkAreaPicker&);  // Not implemented.
  void operator=(const vtkAreaPicker&);  // Not implemented.
};

#endif