131#include "vtkCommonDataModelModule.h"
137VTK_ABI_NAMESPACE_BEGIN
192 vtkGetMacro(Offset,
double);
200 vtkGetMacro(AxisAligned,
bool);
217 const
double x[3], const
double origin[3], const
double normal[3],
double xproj[3]);
227 const
double v[3], const
double origin[3], const
double normal[3],
double vproj[3]);
238 const
double x[3], const
double origin[3], const
double normal[3],
double xproj[3]);
245 static
double Evaluate(
double normal[3],
double origin[3],
double x[3]);
266 const
double p1[3], const
double p2[3],
double n[3],
double p0[3],
double& t,
double x[3]);
282 double py[3],
double x0[3],
double x1[3]);
284 double pOrigin[3],
double px[3],
double py[3],
double x0[3],
double x1[3]);
315 void operator=(
const vtkPlane&) =
delete;
318 void ComputeInternalNormal();
320 void ComputeInternalOrigin();
322 void InternalUpdates();
325 bool AxisAligned =
false;
334 double InternalNormal[3] = { 0.0, 0.0, 1.0 };
335 double InternalOrigin[3] = { 0.0, 0.0, 0.0 };
342 return normal[0] * (x[0] - origin[0]) + normal[1] * (x[1] - origin[1]) +
343 normal[2] * (x[2] - origin[2]);
349 return (std::abs(n[0] * (x[0] - p0[0]) + n[1] * (x[1] - p0[1]) + n[2] * (x[2] - p0[2])));
virtual double EvaluateFunction(double x[3])=0
Evaluate function at position x-y-z and return value.
a simple class to control print indentation
perform various plane computations
virtual void SetOrigin(double x, double y, double z)
Set/get point through which plane passes.
virtual void SetOffset(double _arg)
The origin is shifted in the direction of the normal by the offset.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static void ProjectVector(const double v[3], const double origin[3], const double normal[3], double vproj[3])
Project a vector v onto plane defined by origin and normal.
virtual void SetAxisAligned(bool _arg)
Accessors for AxisAligned, which locks normal to plane to be aligned with x, y, or z axis.
virtual void SetOrigin(const double origin[3])
Set/get point through which plane passes.
void Push(double distance)
Translate the plane in the direction of the normal by the distance specified.
virtual void SetNormal(const double normal[3])
Set/get plane normal.
void EvaluateGradient(double x[3], double g[3]) override
Evaluate function gradient at point x[3].
static void GeneralizedProjectPoint(const double x[3], const double origin[3], const double normal[3], double xproj[3])
Project a point x onto plane defined by origin and normal.
static bool ComputeBestFittingPlane(vtkPoints *pts, double *origin, double *normal)
Given a set of points calculate the best-fitting origin and normal for the plane.
static vtkPlane * New()
Construct plane passing through origin and normal to z-axis.
virtual void SetNormal(double x, double y, double z)
Set/get plane normal.
static double Evaluate(double normal[3], double origin[3], double x[3])
Quick evaluation of plane equation n(x-origin)=0.
void DeepCopy(vtkPlane *plane)
Perform a deep copy of the given plane.
static double DistanceToPlane(double x[3], double n[3], double p0[3])
Return the distance of a point x to a plane defined by n(x-p0) = 0.
double EvaluateFunction(double x[3]) override
Evaluate plane equation for point x[3].
static int IntersectWithFinitePlane(double n[3], double o[3], double pOrigin[3], double px[3], double py[3], double x0[3], double x1[3])
Given two planes, one infinite and one finite, defined by the normal n and point o (infinite plane),...
static int IntersectWithLine(const double p1[3], const double p2[3], double n[3], double p0[3], double &t, double x[3])
Given a line defined by the two points p1,p2; and a plane defined by the normal n and point p0,...
void EvaluateFunction(vtkDataArray *input, vtkDataArray *output) override
Evaluate plane equation for point x[3].
static void ProjectPoint(const double x[3], const double origin[3], const double normal[3], double xproj[3])
Project a point x onto plane defined by origin and normal.
represent and manipulate 3D points
#define VTK_MARSHAL_EXCLUDE_REASON_IS_REDUNDANT
#define VTK_MARSHALEXCLUDE(reason)