Commit 8654bd94 authored by Will Schroeder's avatar Will Schroeder
Browse files

ENH: Added streamers.

parent f4d601c5
......@@ -87,6 +87,14 @@ public:
// Return the face cell from the faceId of the cell.
virtual vlCell *GetFace(int faceId) = 0;
// Description:
// Given parametric coordinates of a point, return the closest cell boundary,
// and whether the point is inside or outside of the cell. The cell boundary
// is defined by a list of points (pts) that specify a face (3D cell), edge
// (2D cell), or vertex (1D cell). If the return value of the method is != 0,
// then the point is inside the cell.
virtual int CellBoundary(int subId, float pcoords[3], vlIdList& pts) = 0;
// Description:
// Given a point x[3] return inside(=1) or outside(=0) cell; evaluate
// parametric coordinates, sub-cell id (!=0 only if cell is composite),
......
......@@ -92,8 +92,10 @@ public:
// Locate cell based on global coordinate x and tolerance squared. If
// cell is non-NULL, then search starts from this cell and looks at
// immediate neighbors. Returns cellId >= 0 if inside, < 0 otherwise.
// The parametric coordinates are provided in pcoords[3].
virtual int FindCell(float x[3], vlCell *cell, float tol2, int& subId, float pcoords[3]) = 0;
// The parametric coordinates are provided in pcoords[3]. The interpolation
// weights are returned in weights[]. Tolerance is used to control how close
// the point is to be considered "in" the cell.
virtual int FindCell(float x[3], vlCell *cell, float tol2, int& subId, float pcoords[3], float weights[MAX_CELL_SIZE]) = 0;
// Datasets are composite objects and need to check each part for MTime
unsigned long int GetMTime();
......
......@@ -38,6 +38,7 @@ public:
vlCell *GetEdge(int edgeId);
vlCell *GetFace(int faceId);
int CellBoundary(int subId, float pcoords[3], vlIdList& pts);
void Contour(float value, vlFloatScalars *cellScalars,
vlFloatPoints *points, vlCellArray *verts,
vlCellArray *lines, vlCellArray *polys, vlFloatScalars *s);
......@@ -49,8 +50,8 @@ public:
int IntersectWithLine(float p1[3], float p2[3], float tol, float& t,
float x[3], float pcoords[3], int& subId);
void ShapeFunctions(float pcoords[3], float sf[8]);
void ShapeDerivs(float pcoords[3], float derivs[24]);
void InterpolationFunctions(float pcoords[3], float weights[8]);
void InterpolationDerivs(float pcoords[3], float derivs[24]);
};
......
......@@ -37,6 +37,7 @@ public:
vlCell *GetEdge(int edgeId) {return 0;};
vlCell *GetFace(int faceId) {return 0;};
int CellBoundary(int subId, float pcoords[3], vlIdList& pts);
void Contour(float value, vlFloatScalars *cellScalars,
vlFloatPoints *points, vlCellArray *verts,
vlCellArray *lines, vlCellArray *polys,
......
......@@ -39,6 +39,7 @@ public:
vlCell *GetEdge(int edgeId);
vlCell *GetFace(int faceId) {return 0;};
int CellBoundary(int subId, float pcoords[3], vlIdList& pts);
void Contour(float value, vlFloatScalars *cellScalars,
vlFloatPoints *points, vlCellArray *verts,
vlCellArray *lines, vlCellArray *polys, vlFloatScalars *s);
......@@ -50,7 +51,7 @@ public:
int IntersectWithLine(float p1[3], float p2[3], float tol, float& t,
float x[3], float pcoords[3], int& subId);
void ShapeFunctions(float pcoords[3], float sf[4]);
void InterpolationFunctions(float pcoords[3], float weights[4]);
};
#endif
......
......@@ -31,6 +31,7 @@ class vlPlane : public vlImplicitFunction
public:
vlPlane();
char *GetClassName() {return "vlPlane";};
void PrintSelf(ostream& os, vlIndent indent);
// project point onto plane, returning coordinates
void ProjectPoint(float x[3], float origin[3], float normal[3], float xproj[3]);
......
......@@ -40,7 +40,8 @@ public:
int GetNumberOfPoints();
float *GetPoint(int ptId) {return this->Points->GetPoint(ptId);};
void GetPoint(int ptId, float x[3]) {this->Points->GetPoint(ptId,x);};
int FindCell(float x[3], vlCell *cell, float tol2, int& subId, float pcoords[3]);
int FindCell(float x[3], vlCell *cell, float tol2, int& subId,
float pcoords[3], float weights[MAX_CELL_SIZE]);
unsigned long int GetMTime();
......
......@@ -34,6 +34,7 @@ public:
char *GetClassName() {return "vlPolyLine";};
int GenerateNormals(vlPoints *, vlCellArray *, vlFloatNormals *);
int GenerateSlidingNormals(vlPoints *, vlCellArray *, vlFloatNormals *);
vlCell *MakeObject() {return new vlPolyLine(*this);};
int GetCellType() {return vlPOLY_LINE;};
......@@ -43,6 +44,7 @@ public:
vlCell *GetEdge(int edgeId) {return 0;};
vlCell *GetFace(int faceId) {return 0;};
int CellBoundary(int subId, float pcoords[3], vlIdList& pts);
void Contour(float value, vlFloatScalars *cellScalars,
vlFloatPoints *points, vlCellArray *verts,
vlCellArray *lines, vlCellArray *polys,
......
......@@ -38,6 +38,7 @@ public:
vlCell *GetEdge(int edgeId) {return 0;};
vlCell *GetFace(int faceId) {return 0;};
int CellBoundary(int subId, float pcoords[3], vlIdList& pts);
void Contour(float value, vlFloatScalars *cellScalars,
vlFloatPoints *points, vlCellArray *verts,
vlCellArray *lines, vlCellArray *polys, vlFloatScalars *s);
......
......@@ -44,6 +44,7 @@ public:
vlCell *GetEdge(int edgeId);
vlCell *GetFace(int faceId) {return 0;};
int CellBoundary(int subId, float pcoords[3], vlIdList& pts);
void Contour(float value, vlFloatScalars *cellScalars,
vlFloatPoints *points,vlCellArray *verts,
vlCellArray *lines, vlCellArray *polys, vlFloatScalars *s);
......
......@@ -38,6 +38,7 @@ public:
vlCell *GetEdge(int edgeId);
vlCell *GetFace(int faceId) {return 0;};
int CellBoundary(int subId, float pcoords[3], vlIdList& pts);
void Contour(float value, vlFloatScalars *cellScalars,
vlFloatPoints *points, vlCellArray *verts,
vlCellArray *lines, vlCellArray *polys, vlFloatScalars *s);
......@@ -48,8 +49,8 @@ public:
float weights[MAX_CELL_SIZE]);
int IntersectWithLine(float p1[3], float p2[3], float tol, float& t,
float x[3], float pcoords[3], int& subId);
void ShapeFunctions(float pcoords[3], float sf[4]);
void ShapeDerivs(float pcoords[3], float derivs[12]);
void InterpolationFunctions(float pcoords[3], float sf[4]);
void InterpolationDerivs(float pcoords[3], float derivs[12]);
};
......
......@@ -29,6 +29,7 @@ class vlQuadric : public vlImplicitFunction
public:
vlQuadric();
char *GetClassName() {return "vlQuadric";};
void PrintSelf(ostream& os, vlIndent indent);
// ImplicitFunction interface
float Evaluate(float x, float y, float z);
......
......@@ -46,7 +46,8 @@ public:
int GetCellType(int cellId);
float *GetPoint(int ptId);
void GetPoint(int ptId, float p[3]);
int FindCell(float x[3], vlCell *cell, float tol2, int& subId, float pcoords[3]) { return this->vlPointSet::FindCell(x,cell,tol2,subId,pcoords);}
int FindCell(float x[3], vlCell *cell, float tol2, int& subId,
float pcoords[3],float weights[MAX_CELL_SIZE]);
int GetNumberOfCells();
void GetCellPoints(int cellId, vlIdList& ptIds);
void GetPointCells(int ptId, vlIdList& cellIds);
......@@ -84,4 +85,15 @@ inline void vlStructuredGrid::GetPointCells(int ptId, vlIdList& cellIds)
this->vlStructuredData::_GetPointCells(ptId,cellIds);
}
inline int vlStructuredGrid::FindCell(float x[3], vlCell *cell, float tol2,
int& subId, float pcoords[3],
float weights[MAX_CELL_SIZE])
{
return this->vlPointSet::FindCell(x,cell,tol2,subId,pcoords,weights);
}
#endif
......@@ -13,7 +13,7 @@ without the express written consent of the authors.
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994
=========================================================================*/
// .NAME vlSphere - implicit function of a sphere
// .NAME vlSphere - implicit function for a sphere
// .SECTION Description
// vlSphere computes the implicit function and surface normal for a sphere.
// vlSphere is a concrete implementation of vlImplicitFunction.
......@@ -28,6 +28,7 @@ class vlSphere : public vlImplicitFunction
public:
vlSphere();
char *GetClassName() {return "vlSphere";};
void PrintSelf(ostream& os, vlIndent indent);
// ImplicitFunction interface
float Evaluate(float x, float y, float z);
......@@ -36,12 +37,12 @@ public:
vlSetMacro(Radius,float);
vlGetMacro(Radius,float);
vlSetVector3Macro(Origin,float);
vlGetVectorMacro(Origin,float,3);
vlSetVector3Macro(Center,float);
vlGetVectorMacro(Center,float,3);
protected:
float Radius;
float Origin[3];
float Center[3];
};
......
......@@ -45,7 +45,8 @@ public:
float *GetPoint(int ptId);
void GetPoint(int id, float x[3]);
vlCell *GetCell(int cellId);
int FindCell(float x[3], vlCell *cell, float tol2, int& subId, float pcoords[3]);
int FindCell(float x[3], vlCell *cell, float tol2, int& subId,
float pcoords[3], float weights[MAX_CELL_SIZE]);
int GetCellType(int cellId);
void GetCellPoints(int cellId, vlIdList& ptIds);
void GetPointCells(int ptId, vlIdList& cellIds);
......
......@@ -18,8 +18,8 @@ Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994
// vlStructuredPointsFilter is a filter that takes a single vlStructuredPoints
// data object as input.
#ifndef __vlStructuredPointsFilter_h
#define __vlStructuredPointsFilter_h
#ifndef __vlStructuredPointsFilter_hh
#define __vlStructuredPointsFilter_hh
#include "Filter.hh"
#include "StrPts.hh"
......
......@@ -38,6 +38,7 @@ public:
vlCell *GetEdge(int edgeId);
vlCell *GetFace(int faceId);
int CellBoundary(int subId, float pcoords[3], vlIdList& pts);
void Contour(float value, vlFloatScalars *cellScalars,
vlFloatPoints *points, vlCellArray *verts,
vlCellArray *lines, vlCellArray *polys, vlFloatScalars *s);
......
......@@ -42,6 +42,7 @@ public:
vlCell *GetEdge(int edgeId);
vlCell *GetFace(int faceId) {return 0;};
int CellBoundary(int subId, float pcoords[3], vlIdList& pts);
void Contour(float value, vlFloatScalars *cellScalars,
vlFloatPoints *points, vlCellArray *verts,
vlCellArray *lines, vlCellArray *polys,
......
......@@ -39,6 +39,7 @@ public:
vlCell *GetEdge(int edgeId);
vlCell *GetFace(int faceId) {return 0;};
int CellBoundary(int subId, float pcoords[3], vlIdList& pts);
void Contour(float value, vlFloatScalars *cellScalars,
vlFloatPoints *points, vlCellArray *verts,
vlCellArray *lines, vlCellArray *polys,
......
......@@ -36,6 +36,7 @@ public:
int GetNumberOfFaces() {return 0;};
vlCell *GetEdge(int edgeId) {return 0;};
vlCell *GetFace(int faceId) {return 0;};
int CellBoundary(int subId, float pcoords[3], vlIdList& pts);
void Contour(float value, vlFloatScalars *cellScalars,
vlFloatPoints *points, vlCellArray *verts,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment