131#include "vtkCommonDataModelModule.h"
137VTK_ABI_NAMESPACE_BEGIN
171 vtkGetVectorMacro(Normal,
double, 3);
181 vtkGetVectorMacro(Origin,
double, 3);
190 virtual
void SetOffset(
double _arg);
192 vtkGetMacro(Offset,
double);
199 virtual
void SetAxisAligned(
bool _arg);
200 vtkGetMacro(AxisAligned,
bool);
208 void Push(
double distance);
216 static
void ProjectPoint(
217 const
double x[3], const
double origin[3], const
double normal[3],
double xproj[3]);
218 void ProjectPoint(const
double x[3],
double xproj[3]);
226 static
void ProjectVector(
227 const
double v[3], const
double origin[3], const
double normal[3],
double vproj[3]);
228 void ProjectVector(const
double v[3],
double vproj[3]);
237 static
void GeneralizedProjectPoint(
238 const
double x[3], const
double origin[3], const
double normal[3],
double xproj[3]);
239 void GeneralizedProjectPoint(const
double x[3],
double xproj[3]);
245 static
double Evaluate(
double normal[3],
double origin[3],
double x[3]);
252 static
double DistanceToPlane(
double x[3],
double n[3],
double p0[3]);
253 double DistanceToPlane(
double x[3]);
265 static
int IntersectWithLine(
266 const
double p1[3], const
double p2[3],
double n[3],
double p0[3],
double& t,
double x[3]);
267 int IntersectWithLine(const
double p1[3], const
double p2[3],
double& t,
double x[3]);
281 static
int IntersectWithFinitePlane(
double n[3],
double o[3],
double pOrigin[3],
double px[3],
282 double py[3],
double x0[3],
double x1[3]);
283 int IntersectWithFinitePlane(
284 double pOrigin[3],
double px[3],
double py[3],
double x0[3],
double x1[3]);
295 static
bool ComputeBestFittingPlane(
vtkPoints* pts,
double* origin,
double* normal);
310 double Normal[3] = { 0.0, 0.0, 1.0 };
311 double Origin[3] = { 0.0, 0.0, 0.0 };
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])));
abstract superclass for arrays of numeric data
abstract interface for implicit functions
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.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void SetOrigin(const double origin[3])
Set/get point through which plane passes.
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 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.
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].
void EvaluateFunction(vtkDataArray *input, vtkDataArray *output) override
Evaluate plane equation for point x[3].
represent and manipulate 3D points
#define VTK_MARSHALEXCLUDE(reason)