/usr/include/paraview/vtkSQPlaneSource.h is in paraview-dev 5.0.1+dfsg1-4.
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 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 | /*
* Copyright 2012 SciberQuest Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* * Neither name of SciberQuest Inc. nor the names of any contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*=========================================================================
Program: Visualization Toolkit
Module: $RCSfile: vtkSQPlaneSource.h,v $
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 vtkSQPlaneSource - create an array of quadrilaterals located in a plane
// .SECTION Description
// vtkSQPlaneSource creates an m x n array of quadrilaterals arranged as
// a regular tiling in a plane. The plane is defined by specifying an
// origin point, and then two other points that, together with the
// origin, define two axes for the plane. These axes do not have to be
// orthogonal - so you can create a parallelogram. (The axes must not
// be parallel.) The resolution of the plane (i.e., number of subdivisions) is
// controlled by the ivars XResolution and YResolution.
//
// By default, the plane is centered at the origin and perpendicular to the
// z-axis, with width and height of length 1 and resolutions set to 1.
//
// There are three convenience methods that allow you to easily move the
// plane. The first, SetNormal(), allows you to specify the plane
// normal. The effect of this method is to rotate the plane around the center
// of the plane, aligning the plane normal with the specified normal. The
// rotation is about the axis defined by the cross product of the current
// normal with the new normal. The second, SetCenter(), translates the center
// of the plane to the specified center point. The third method, Push(),
// allows you to translate the plane along the plane normal by the distance
// specified. (Negative Push values translate the plane in the negative
// normal direction.) Note that the SetNormal(), SetCenter() and Push()
// methods modify the Origin, Point1, and/or Point2 instance variables.
// .SECTION Caveats
// The normal to the plane will point in the direction of the cross product
// of the first axis (Origin->Point1) with the second (Origin->Point2). This
// also affects the normals to the generated polygons.
#ifndef vtkSQPlaneSource_h
#define vtkSQPlaneSource_h
#include "vtkSciberQuestModule.h" // for export macro
#include "vtkPolyDataAlgorithm.h"
class vtkPVXMLElement;
class VTKSCIBERQUEST_EXPORT vtkSQPlaneSource : public vtkPolyDataAlgorithm
{
public:
void PrintSelf(ostream& os, vtkIndent indent);
vtkTypeMacro(vtkSQPlaneSource,vtkPolyDataAlgorithm);
// Description:
// Construct plane perpendicular to z-axis, resolution 1x1, width
// and height 1.0, and centered at the origin.
static vtkSQPlaneSource *New();
// Description:
// Initialize the object from an xml document.
int Initialize(vtkPVXMLElement *root);
// Description:
// Mode controls how data is generated. Demand mode generates
// minimal pseudo dataset and places an object in the pipeline
// that can be accessed downstream and generate data as needed.
//BTX
enum {
MODE_IMMEDIATE=0,
MODE_DEMAND=1,
};
//ETX
vtkSetMacro(ImmediateMode,int);
vtkGetMacro(ImmediateMode,int);
// Description:
// Specify the resolution of the plane along the first axes.
vtkSetMacro(XResolution,int);
vtkGetMacro(XResolution,int);
// Description:
// Specify the resolution of the plane along the second axes.
vtkSetMacro(YResolution,int);
vtkGetMacro(YResolution,int);
// Description:
// Set the number of x-y subdivisions in the plane.
void SetResolution(const int xR, const int yR);
void SetResolution(int res[2]) {
this->SetResolution(res[0],res[1]); }
void GetResolution(int& xR,int& yR) {
xR=this->XResolution; yR=this->YResolution; }
//BTX
enum {
DECOMP_TYPE_PATCHES=0,
DECOMP_TYPE_STRIPS=1
};
//ETX
// Description:
// Specify the somain decomposition.
vtkSetMacro(DecompType,int);
vtkGetMacro(DecompType,int);
// Description:
// Specify a point defining the origin of the plane.
void SetOrigin(double x, double y, double z);
void SetOrigin(double pnt[3]);
vtkGetVectorMacro(Origin,double,3);
// Description:
// Specify a point defining the first axis of the plane.
void SetPoint1(double x, double y, double z);
void SetPoint1(double pnt[3]);
vtkGetVectorMacro(Point1,double,3);
// Description:
// Specify a point defining the second axis of the plane.
void SetPoint2(double x, double y, double z);
void SetPoint2(double pnt[3]);
vtkGetVectorMacro(Point2,double,3);
// Description:
// Set/Get the center of the plane. Works in conjunction with the plane
// normal to position the plane. Don't use this method to define the plane.
// Instead, use it to move the plane to a new center point.
void SetCenter(double x, double y, double z);
void SetCenter(double center[3]);
vtkGetVectorMacro(Center,double,3);
// Description:
// Set/Get the plane normal. Works in conjunction with the plane center to
// orient the plane. Don't use this method to define the plane. Instead, use
// it to rotate the plane around the current center point.
void SetNormal(double nx, double ny, double nz);
void SetNormal(double n[3]);
vtkGetVectorMacro(Normal,double,3);
// Desciption:
// Set/Get the constraint, one of: NONE, XY, XZ, or YZ.
void SetConstraint(int type);
vtkGetMacro(Constraint,int);
// Description:
// Applies the current constraint, by fixing one of the
// corrdinate values.
void ApplyConstraint();
// Description:
// Set a name that will be placed into the output vtkInformation object
// in the vtkSQMetaDataKeys::DESCRIPTIVE_NAME() key.
vtkSetStringMacro(DescriptiveName);
vtkGetStringMacro(DescriptiveName);
// Description:
// Translate the plane in the direction of the normal by the
// distance specified. Negative values move the plane in the
// opposite direction.
void Push(double distance);
// Description:
// Set the log level.
// 0 -- no logging
// 1 -- basic logging
// .
// n -- advanced logging
vtkSetMacro(LogLevel,int);
vtkGetMacro(LogLevel,int);
protected:
vtkSQPlaneSource();
virtual ~vtkSQPlaneSource();
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
int RequestInformation(vtkInformation *,vtkInformationVector **,vtkInformationVector *outInfos);
int UpdatePlane(double v1[3], double v2[3], bool quiet=false);
private:
int ImmediateMode;
int XResolution;
int YResolution;
int DecompType;
double Origin[3];
double Point1[3];
double Point2[3];
double Normal[3];
double Center[3];
int Constraint;
char *DescriptiveName;
int LogLevel;
private:
vtkSQPlaneSource(const vtkSQPlaneSource&); // Not implemented.
void operator=(const vtkSQPlaneSource&); // Not implemented.
};
#endif
|