Commit 1d82b166 authored by Will Schroeder's avatar Will Schroeder
Browse files

ENH: Made print methods and IVARS consistent.

parent 12352812
......@@ -9,18 +9,18 @@
class vlCellArray : public vlObject
{
public:
vlCellArray() : NumCells(0), Loc(0) {};
vlCellArray() : NumberOfCells(0), Location(0) {};
int Initialize(const int sz, const int ext=1000)
{return this->Ia.Initialize(sz,ext);};
vlCellArray (const int sz, const int ext=1000):NumCells(0),Loc(0),Ia(sz,ext){};
vlCellArray (const int sz, const int ext=1000):NumberOfCells(0),Location(0),Ia(sz,ext){};
~vlCellArray() {};
int GetNextCell(int& npts, int* &pts)
{
if ( this->Ia.GetMaxId() >= 0 && this->Loc <= this->Ia.GetMaxId() )
if ( this->Ia.GetMaxId() >= 0 && this->Location <= this->Ia.GetMaxId() )
{
npts = this->Ia.GetValue(this->Loc++);
pts = this->Ia.GetPtr(this->Loc);
this->Loc += npts;
npts = this->Ia.GetValue(this->Location++);
pts = this->Ia.GetPtr(this->Location);
this->Location += npts;
return 1;
}
else
......@@ -34,17 +34,17 @@ public:
this->Ia.InsertValue(id,pts[npts-1]);
this->Ia[id-npts] = npts;
for (int i=0; i<npts-1; i++) this->Ia[id-npts+i+1] = pts[i];
NumCells++;
NumberOfCells++;
}
int GetNumCells() {return NumCells;};
void InitTraversal() {this->Loc=0;};
int GetNumberOfCells() {return NumberOfCells;};
void InitTraversal() {this->Location=0;};
void Squeeze() {this->Ia.Squeeze();};
int EstimateSize(int numCells, int maxPtsPerCell)
{return numCells*(1+maxPtsPerCell);};
private:
int NumCells;
int Loc;
int NumberOfCells;
int Location;
vlIntArray Ia;
};
......
......@@ -31,8 +31,8 @@ public:
char *GetClassName() {return "vlDataSetToDataSetFilter";};
void PrintSelf(ostream& os, vlIndent indent);
vlDataSet *MakeObject() {return this->DataSet->MakeObject();};
int NumCells() {return this->DataSet->NumCells();}
int NumPoints() {return this->DataSet->NumPoints();}
int NumberOfCells() {return this->DataSet->NumberOfCells();}
int NumberOfPoints() {return this->DataSet->NumberOfPoints();}
int CellDimension(int cellId) {return this->DataSet->CellDimension(cellId);}
void CellPoints(int cellId, vlIdList& ptId)
{this->DataSet->CellPoints(cellId, ptId);}
......
......@@ -34,8 +34,8 @@ public:
char *GetClassName() {return "vlDataSet";};
void PrintSelf(ostream& os, vlIndent indent);
virtual vlDataSet *MakeObject() = 0;
virtual int NumCells() = 0;
virtual int NumPoints() = 0;
virtual int NumberOfCells() = 0;
virtual int NumberOfPoints() = 0;
virtual int CellDimension(int cellId) = 0;
virtual void CellPoints(int cellId, vlIdList& ptId) = 0;
virtual void Initialize();
......@@ -43,7 +43,7 @@ public:
virtual void GetPoints(vlIdList& ptId, vlFloatPoints& fp) = 0;
virtual void Update() {};
unsigned long int GetMtime();
unsigned long int GetMTime();
virtual void ComputeBounds();
float *GetBounds();
......
......@@ -35,7 +35,7 @@ public:
vlFloatNormals(const int sz, const int ext=1000):N(3*sz,3*ext){};
~vlFloatNormals() {};
char *GetClassName() {return "vlFloatNormals";};
int NumNormals() {return (N.GetMaxId()+1)/3;};
int NumberOfNormals() {return (N.GetMaxId()+1)/3;};
void Reset() {this->N.Reset();};
vlFloatNormals &operator=(const vlFloatNormals& fn);
void operator+=(const vlFloatNormals& fn);
......
......@@ -35,7 +35,7 @@ public:
vlFloatPoints(const int sz, const int ext=1000):P(3*sz,3*ext){};
~vlFloatPoints() {};
char *GetClassName() {return "vlFloatPoints";};
int NumPoints() {return (P.GetMaxId()+1)/3;};
int NumberOfPoints() {return (P.GetMaxId()+1)/3;};
void Reset() {this->P.Reset();};
vlFloatPoints &operator=(const vlFloatPoints& fp);
void operator+=(const vlFloatPoints& fp) {this->P += fp.P;};
......
......@@ -35,7 +35,7 @@ public:
vlFloatScalars(const int sz, const int ext=1000):S(sz,ext){};
~vlFloatScalars() {};
char *GetClassName() {return "vlFloatScalars";};
int NumScalars() {return (this->S.GetMaxId()+1);};
int NumberOfScalars() {return (this->S.GetMaxId()+1);};
void Reset() {this->S.Reset();};
vlFloatScalars &operator=(const vlFloatScalars& fs);
void operator+=(const vlFloatScalars& fs) {this->S += fs.S;};
......
......@@ -40,7 +40,7 @@ public:
char *GetClassName() {return "vlFloatTCoords";};
void operator+=(const vlFloatTCoords& ftc) {this->TC += ftc.TC;};
int NumTCoords() {return (this->TC.GetMaxId()+1)/this->Dimension;};
int NumberOfTCoords() {return (this->TC.GetMaxId()+1)/this->Dimension;};
void Reset() {this->TC.Reset();};
float *GetTCoord(int i) {return this->TC.GetPtr(this->Dimension*i);};
......
......@@ -35,7 +35,7 @@ public:
vlFloatVectors(const int sz, const int ext=1000):V(3*sz,3*ext){};
~vlFloatVectors() {};
char *GetClassName() {return "vlFloatVectors";};
int NumVectors() {return (V.GetMaxId()+1)/3;};
int NumberOfVectors() {return (V.GetMaxId()+1)/3;};
void Reset() {this->V.Reset();};
vlFloatVectors &operator=(const vlFloatVectors& fv);
void operator+=(const vlFloatVectors& fv){this->V += fv.V;};
......
......@@ -12,7 +12,7 @@ public:
~vlIdList() {};
int &operator[](const int id) {return this->Ia[id];};
void Reset() {this->Ia.Reset();};
int NumIds() {return (this->Ia.GetMaxId() + 1);};
int NumberOfIds() {return (this->Ia.GetMaxId() + 1);};
int InsertNextId(const int i) {return Ia.InsertNextValue(i);};
void operator+=(vlIdList& ids) {this->Ia += ids.Ia;};
void operator+=(const int i) {this->Ia += i;};
......
......@@ -29,7 +29,7 @@ class vlNormals : public vlObject
public:
virtual ~vlNormals() {};
virtual vlNormals *MakeObject(int sze, int ext=1000) = 0;
virtual int NumNormals() = 0;
virtual int NumberOfNormals() = 0;
virtual float *GetNormal(int i) = 0;
virtual void SetNormal(int i,float x[3]) = 0; // fast insert
virtual void InsertNormal(int i, float x[3]) = 0; // allocates memory as necessary
......
......@@ -28,8 +28,8 @@ public:
char *GetClassName() {return "vlPointSource";};
void PrintSelf(ostream& os, vlIndent indent);
vlSetClampMacro(NumPoints,int,1,LARGE_INTEGER);
vlGetMacro(NumPoints,int);
vlSetClampMacro(NumberOfPoints,int,1,LARGE_INTEGER);
vlGetMacro(NumberOfPoints,int);
vlSetVector3Macro(Center,float);
vlGetVectorMacro(Center,float);
......@@ -39,7 +39,7 @@ public:
protected:
void Execute();
int NumPoints;
int NumberOfPoints;
float Center[3];
float Radius;
};
......
......@@ -30,7 +30,7 @@ public:
vlPoints();
virtual ~vlPoints() {};
virtual vlPoints *MakeObject(int sze, int ext=1000) = 0;
virtual int NumPoints() = 0;
virtual int NumberOfPoints() = 0;
virtual float *GetPoint(int i) = 0;
virtual void SetPoint(int i,float x[3]) = 0; // fast insert
virtual void InsertPoint(int i, float x[3]) = 0; // allocates memory as necessary
......
......@@ -38,8 +38,8 @@ public:
vlDataSet *MakeObject();
char *GetClassName() {return "vlPolyData";};
void PrintSelf(ostream& os, vlIndent indent);
int NumCells();
int NumPoints();
int NumberOfCells();
int NumberOfPoints();
int CellDimension(int cellId);
void CellPoints(int cellId, vlIdList& ptId);
void Initialize();
......@@ -65,10 +65,10 @@ public:
void SetStrips (vlCellArray* s);
vlCellArray *GetStrips();
int NumVerts();
int NumLines();
int NumPolys();
int NumStrips();
int NumberOfVerts();
int NumberOfLines();
int NumberOfPolys();
int NumberOfStrips();
private:
// point data (i.e., scalars, vectors, normals, tcoords) inherited
......
......@@ -30,7 +30,7 @@ public:
vlScalars();
virtual ~vlScalars() {};
virtual vlScalars *MakeObject(int sze, int ext=1000) = 0;
virtual int NumScalars() = 0;
virtual int NumberOfScalars() = 0;
virtual float GetScalar(int i) = 0;
virtual void SetScalar(int i, float s) = 0; // fast insert
virtual void InsertScalar(int i, float s) = 0; // allocates memory as necessary
......
......@@ -30,7 +30,7 @@ public:
vlTCoords(int dim=2) {this->Dimension=dim;};
virtual ~vlTCoords() {};
virtual vlTCoords *MakeObject(int sze, int d=2, int ext=1000) = 0;
virtual int NumTCoords() = 0;
virtual int NumberOfTCoords() = 0;
virtual float *GetTCoord(int i) = 0;
virtual void SetTCoord(int i,float *x) = 0; // fast insert
virtual void InsertTCoord(int i, float *x) = 0; // allocates memory as necessary
......
......@@ -30,7 +30,7 @@ public:
vlVectors();
virtual ~vlVectors() {};
virtual vlVectors *MakeObject(int sze, int ext=1000) = 0;
virtual int NumVectors() = 0;
virtual int NumberOfVectors() = 0;
virtual float *GetVector(int i) = 0;
virtual void SetVector(int i,float x[3]) = 0; // fast insert
virtual void InsertVector(int i, float x[3]) = 0; // allocates memory as necessary
......
......@@ -157,13 +157,6 @@ void vlConeSource::PrintSelf(ostream& os, vlIndent indent)
os << indent << "Resolution: " << this->Resolution << "\n";
os << indent << "Height: " << this->Height << "\n";
os << indent << "Radius: " << this->Radius << "\n";
if ( this->Capping )
{
os << indent << "Capping is on.\n";
}
else
{
os << indent << "Capping is off.\n";
}
os << indent << "Capping: " << (this->Capping ? "On\n" : "Off\n");
}
}
......@@ -35,13 +35,13 @@ void vlContourFilter::Execute()
//
// Loop over all cells
//
for (cellId=0; cellId<Input->NumCells(); cellId++)
for (cellId=0; cellId<Input->NumberOfCells(); cellId++)
{
Input->CellPoints(cellId,cellPts);
inScalars->GetScalars(cellPts,cellScalars);
// Build the case table
for ( i=0, index = 0; i < cellPts.NumIds(); i++)
for ( i=0, index = 0; i < cellPts.NumberOfIds(); i++)
if (cellScalars.GetScalar(i) >= this->Value)
index |= CASE_MASK[i];
......
......@@ -118,8 +118,8 @@ void vlCubeSource::PrintSelf(ostream& os, vlIndent indent)
{
vlPolySource::PrintSelf(os,indent);
os << indent << "XLength: " << this->XLength << "\n";
os << indent << "YLength: " << this->YLength << "\n";
os << indent << "ZLength: " << this->ZLength << "\n";
os << indent << "X Length: " << this->XLength << "\n";
os << indent << "Y Length: " << this->YLength << "\n";
os << indent << "Z Length: " << this->ZLength << "\n";
}
}
......@@ -169,13 +169,6 @@ void vlCylinderSource::PrintSelf(ostream& os, vlIndent indent)
os << indent << "Resolution: " << this->Resolution << "\n";
os << indent << "Height: " << this->Height << "\n";
os << indent << "Radius: " << this->Radius << "\n";
if ( this->Capping )
{
os << indent << "Capping is on.\n";
}
else
{
os << indent << "Capping is off.\n";
}
os << indent << "Capping: " << (this->Capping ? "On\n" : "Off\n");
}
}
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