Commit 257d6003 authored by Ken Martin's avatar Ken Martin
Browse files

new organization of dependency

parent 743a68ef
......@@ -25,7 +25,6 @@ Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994
#include "IdList.hh"
#include "FPoints.hh"
#include "PtData.hh"
#include "Mapper.hh"
#include "Cell.hh"
class vlDataSet : virtual public vlObject
......@@ -35,8 +34,6 @@ public:
char *GetClassName() {return "vlDataSet";};
void PrintSelf(ostream& os, vlIndent indent);
// Instantiate appropriate mapper object for this dataset
virtual vlMapper *MakeMapper() = 0;
// restore data to initial state (i.e., release memory, etc.)
virtual void Initialize();
// absorb update methods which propagate through network
......@@ -44,6 +41,8 @@ public:
// Create concrete instance of this dataset
virtual vlDataSet *MakeObject() = 0;
// return class name of data type
virtual char *GetDataType() = 0;
// Determine number of points and cells composing dataset
virtual int GetNumberOfPoints() = 0;
......@@ -75,7 +74,7 @@ public:
float *GetBounds();
float *GetCenter();
float GetLength();
// return pointer to this dataset's point data
vlPointData *GetPointData() {return &this->PointData;};
......@@ -83,7 +82,6 @@ protected:
vlPointData PointData; // Scalars, vectors, etc. associated w/ each point
vlTimeStamp ComputeTime; // Time at which bounds, center, etc. computed
float Bounds[6]; // (xmin,xmax, ymin,ymax, zmin,zmax) geometric bounds
vlMapper *Mapper; // object used to map data to graphics
};
#endif
......
......@@ -33,6 +33,7 @@ public:
vlPolyData(const vlPolyData& pd);
~vlPolyData();
char *GetClassName() {return "vlPolyData";};
char *GetDataType() {return "vlPolyData";};
void PrintSelf(ostream& os, vlIndent indent);
// dataset interface
......@@ -40,7 +41,6 @@ public:
int GetNumberOfCells();
vlCell *GetCell(int cellId);
int GetCellType(int cellId);
vlMapper *MakeMapper();
void Initialize();
void GetCellPoints(int cellId, vlIdList *ptIds);
void GetPointCells(int ptId, vlIdList *cellIds);
......
......@@ -30,11 +30,11 @@ public:
vlStructuredGrid(const vlStructuredGrid& sg);
~vlStructuredGrid();
char *GetClassName() {return "vlStructuredGrid";};
char *GetDataType() {return "vlStructuredGrid";};
void PrintSelf(ostream& os, vlIndent indent);
// dataset interface
vlDataSet *MakeObject() {return new vlStructuredGrid(*this);};
vlMapper *MakeMapper() {return (vlMapper *)0;};
void Initialize();
int GetNumberOfPoints() {vlPointSet::GetNumberOfPoints();};
vlCell *GetCell(int cellId);
......
......@@ -29,13 +29,13 @@ public:
vlStructuredPoints(const vlStructuredPoints& v);
~vlStructuredPoints();
char *GetClassName() {return "vlStructuredPoints";};
char *GetDataType() {return "vlStructuredPoints";};
void PrintSelf(ostream& os, vlIndent indent);
// dataset interface
vlDataSet *MakeObject() {return new vlStructuredPoints(*this);};
float *GetPoint(int ptId);
vlCell *GetCell(int cellId);
vlMapper *MakeMapper() {return (vlMapper *)0;};
void Initialize();
int FindCell(float x[3], vlCell *cell, float tol2,
int& subId, float pcoords[3]);
......
......@@ -34,6 +34,7 @@ public:
~vlUnstructuredGrid();
void Allocate(int numCells=1000, int extSize=1000);
char *GetClassName() {return "vlUnstructuredGrid";};
char *GetDataType() {return "vlUnstructuredGrid";};
void PrintSelf(ostream& os, vlIndent indent);
// cell creation methods
......@@ -45,7 +46,6 @@ public:
// dataset interface
vlDataSet *MakeObject() {return new vlUnstructuredGrid(*this);};
vlMapper *MakeMapper();
void Initialize();
int GetNumberOfCells();
vlCell *GetCell(int cellId);
......
......@@ -27,8 +27,6 @@ vlDataSet::vlDataSet ()
this->Bounds[3] = 1.0;
this->Bounds[4] = 0.0;
this->Bounds[5] = 1.0;
this->Mapper = NULL;
}
void vlDataSet::Initialize()
......
......@@ -14,7 +14,6 @@ Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994
=========================================================================*/
#include "PolyData.hh"
#include "PolyMap.hh"
#include "Point.hh"
#include "PolyPts.hh"
#include "Line.hh"
......@@ -295,19 +294,6 @@ int vlPolyData::GetNumberOfStrips()
return (this->Strips ? this->Strips->GetNumberOfCells() : 0);
}
vlMapper *vlPolyData::MakeMapper()
{
vlPolyMapper *mapper;
if ( this->Mapper == NULL )
{
this->Mapper = mapper = new vlPolyMapper;
this->Mapper->Register(this);
mapper->SetInput(this);
}
return this->Mapper;
}
void vlPolyData::PrintSelf(ostream& os, vlIndent indent)
{
if (this->ShouldIPrint(vlPolyData::GetClassName()))
......
......@@ -28,7 +28,6 @@ Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994
#include "Tetra.hh"
#include "Hexa.hh"
#include "Brick.hh"
#include "UGridMap.hh"
vlUnstructuredGrid::vlUnstructuredGrid ()
{
......@@ -69,19 +68,6 @@ vlUnstructuredGrid::~vlUnstructuredGrid()
vlUnstructuredGrid::Initialize();
}
vlMapper *vlUnstructuredGrid::MakeMapper()
{
vlUnstructuredGridMapper *mapper;
if ( this->Mapper == NULL )
{
this->Mapper = mapper = new vlUnstructuredGridMapper;
this->Mapper->Register(this);
mapper->SetInput(this);
}
return this->Mapper;
}
void vlUnstructuredGrid::Initialize()
{
vlPointSet::Initialize();
......
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