Man Page for vtkLine
Table of Contents

NAME

vtkLine - cell represents a 1D line

SYNOPSIS


#include "/opt/vtk-c++/common/vtkLine.h"

class VTK_EXPORT vtkLine : public vtkCell

vtkLine();
vtkLine(const vtkLine& l);
static vtkLine *New() {return new vtkLine;};
const char *GetClassName() {return "vtkLine";};
vtkCell *MakeObject() {return new vtkLine(*this);};
int GetCellType() {return VTK_LINE;};
int GetCellDimension() {return 1;};
int GetNumberOfEdges() {return 0;};
int GetNumberOfFaces() {return 0;};
vtkCell *GetEdge(int) {return 0;};
vtkCell *GetFace(int) {return 0;};
int CellBoundary(int subId, float pcoords[3], vtkIdList& pts);
void Contour(float value, vtkFloatScalars *cellScalars,
vtkPointLocator *locator, vtkCellArray *verts,
vtkCellArray *lines, vtkCellArray *polys,
vtkPointData *inPd, vtkPointData *outPd);
void Clip(float value, vtkFloatScalars *cellScalars,
vtkPointLocator *locator, vtkCellArray *lines,
vtkPointData *inPd, vtkPointData *outPd, int insideOut);
int EvaluatePosition(float x[3], float closestPoint[3],
int& subId, float pcoords[3],
float& dist2, float *weights);
void EvaluateLocation(int& subId, float pcoords[3], float x[3],
float *weights);
int IntersectWithLine(float p1[3], float p2[3], float tol, float& t,
float x[3], float pcoords[3], int& subId);
int Triangulate(int index, vtkIdList &ptIds, vtkFloatPoints &pts);
void Derivatives(int subId, float pcoords[3], float *values,
int dim, float *derivs);
static int Intersection(float x[3], float xray[3], float x1[3], float x2[3],
float& u, float& v);
static float DistanceToLine(float x[3], float p1[3], float p2[3],
float &t, float closestPoint[3]);
static float DistanceToLine(float x[3], float p1[3], float p2[3]);

DESCRIPTION

vtkLine is a concrete implementation of vtkCell to represent a 1D line.

SUMMARY

vtkLine()
Construct the line with two points.

vtkLine(const vtkLine& l)
Deep copy of cell.

int Intersection (float a1[3], float a2[3], float b1[3], float b2[3],
float& u, float& v)
Performs intersection of two finite 3D lines. An intersection is found if the projection of the two lines onto the plane perpendicular to the cross product of the two lines intersect. The parameters (u,v) are the parametric coordinates of the lines at the position of closest approach.

float DistanceToLine(float x[3], float p1[3], float p2[3], float &t, float closestPoint[3]) Compute distance to finite line. Returns parametric coordinate t and point location on line.

float DistanceToLine (float x[3], float p1[3], float p2[3]) Determine the distance of the current vertex to the edge defined by the vertices provided. Returns distance squared. Note: line is assumed infinite in extent.

void Clip(float value, vtkFloatScalars *cellScalars,
vtkPointLocator *locator, vtkCellArray *lines,
vtkPointData *inPd, vtkPointData *outPd, int insideOut)
Clip this line using scalar value provided. Like contouring, except that it cuts the line to produce other
lines.


Table of Contents