/usr/include/vtk-7.1/vtkPlanes.h is in libvtk7-dev 7.1.1+dfsg1-2.
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 | /*=========================================================================
Program: Visualization Toolkit
Module: vtkPlanes.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 vtkPlanes
* @brief implicit function for convex set of planes
*
* vtkPlanes computes the implicit function and function gradient for a set
* of planes. The planes must define a convex space.
*
* The function value is the closest first order distance of a point to the
* convex region defined by the planes. The function gradient is the plane
* normal at the function value. Note that the normals must point outside of
* the convex region. Thus, a negative function value means that a point is
* inside the convex region.
*
* There are several methods to define the set of planes. The most general is
* to supply an instance of vtkPoints and an instance of vtkDataArray. (The
* points define a point on the plane, and the normals corresponding plane
* normals.) Two other specialized ways are to 1) supply six planes defining
* the view frustrum of a camera, and 2) provide a bounding box.
*
* @sa
* vtkCamera
*/
#ifndef vtkPlanes_h
#define vtkPlanes_h
#include "vtkCommonDataModelModule.h" // For export macro
#include "vtkImplicitFunction.h"
class vtkPlane;
class vtkPoints;
class vtkDataArray;
class VTKCOMMONDATAMODEL_EXPORT vtkPlanes : public vtkImplicitFunction
{
public:
static vtkPlanes *New();
vtkTypeMacro(vtkPlanes,vtkImplicitFunction);
void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
//@{
/**
* Evaluate plane equations. Return smallest absolute value.
*/
double EvaluateFunction(double x[3]) VTK_OVERRIDE;
double EvaluateFunction(double x, double y, double z)
{return this->vtkImplicitFunction::EvaluateFunction(x, y, z); } ;
//@}
/**
* Evaluate planes gradient.
*/
void EvaluateGradient(double x[3], double n[3]) VTK_OVERRIDE;
//@{
/**
* Specify a list of points defining points through which the planes pass.
*/
virtual void SetPoints(vtkPoints*);
vtkGetObjectMacro(Points,vtkPoints);
//@}
//@{
/**
* Specify a list of normal vectors for the planes. There is a one-to-one
* correspondence between plane points and plane normals.
*/
void SetNormals(vtkDataArray* normals);
vtkGetObjectMacro(Normals,vtkDataArray);
//@}
/**
* An alternative method to specify six planes defined by the camera view
* frustrum. See vtkCamera::GetFrustumPlanes() documentation.
*/
void SetFrustumPlanes(double planes[24]);
//@{
/**
* An alternative method to specify six planes defined by a bounding box.
* The bounding box is a six-vector defined as (xmin,xmax,ymin,ymax,zmin,zmax).
* It defines six planes orthogonal to the x-y-z coordinate axes.
*/
void SetBounds(const double bounds[6]);
void SetBounds(double xmin, double xmax, double ymin, double ymax,
double zmin, double zmax);
//@}
/**
* Return the number of planes in the set of planes.
*/
int GetNumberOfPlanes();
/**
* Create and return a pointer to a vtkPlane object at the ith
* position. Asking for a plane outside the allowable range returns NULL.
* This method always returns the same object.
* Use GetPlane(int i, vtkPlane *plane) instead.
*/
vtkPlane *GetPlane(int i);
/**
* If i is within the allowable range, mutates the given plane's
* Normal and Origin to match the vtkPlane object at the ith
* position. Does nothing if i is outside the allowable range.
*/
void GetPlane(int i, vtkPlane *plane);
protected:
vtkPlanes();
~vtkPlanes() VTK_OVERRIDE;
vtkPoints *Points;
vtkDataArray *Normals;
vtkPlane *Plane;
private:
double Planes[24];
double Bounds[6];
private:
vtkPlanes(const vtkPlanes&) VTK_DELETE_FUNCTION;
void operator=(const vtkPlanes&) VTK_DELETE_FUNCTION;
};
#endif
|