Commit 368b6fed authored by Will Schroeder's avatar Will Schroeder
Browse files

Fixed #defines

parent db04723f
......@@ -108,7 +108,7 @@ inline int vtkCellList::GetCellLocation(const int cellId)
// Delete cell by setting to NULL cell type.
inline void vtkCellList::DeleteCell(int cellId)
{
this->Array[cellId].type = vtkNULL_ELEMENT;
this->Array[cellId].type = VTK_NULL_ELEMENT;
}
#endif
......@@ -49,19 +49,19 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#ifndef __vtkCellTypes_h
#define __vtkCellTypes_h
#define vtkNULL_ELEMENT 0
#define vtkVERTEX 1
#define vtkPOLY_VERTEX 2
#define vtkLINE 3
#define vtkPOLY_LINE 4
#define vtkTRIANGLE 5
#define vtkTRIANGLE_STRIP 6
#define vtkPOLYGON 7
#define vtkPIXEL 8
#define vtkQUAD 9
#define vtkTETRA 10
#define vtkVOXEL 11
#define vtkHEXAHEDRON 12
#define VTK_NULL_ELEMENT 0
#define VTK_VERTEX 1
#define VTK_POLY_VERTEX 2
#define VTK_LINE 3
#define VTK_POLY_LINE 4
#define VTK_TRIANGLE 5
#define VTK_TRIANGLE_STRIP 6
#define VTK_POLYGON 7
#define VTK_PIXEL 8
#define VTK_QUAD 9
#define VTK_TETRA 10
#define VTK_VOXEL 11
#define VTK_HEXAHEDRON 12
#endif
......
......@@ -85,25 +85,6 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#include "vtkLine.hh"
#define VTK_NUMBER_STATISTICS 12
#define VTK_TOLERANCE 1.0e-05
#define VTK_MAX_TRIS_PER_VERTEX VTK_MAX_CELL_SIZE
#define VTK_MAX_SQUAWKS 10
#define VTK_COMPLEX_VERTEX 0
#define VTK_SIMPLE_VERTEX 1
#define VTK_BOUNDARY_VERTEX 2
#define VTK_INTERIOR_EDGE_VERTEX 3
#define VTK_CORNER_VERTEX 4
#define VTK_ELIMINATED_DISTANCE_TO_PLANE 5
#define VTK_ELIMINATED_DISTANCE_TO_EDGE 6
#define VTK_FAILED_DEGREE_TEST 7
#define VTK_FAILED_NON_MANIFOLD 8
#define VTK_FAILED_ZERO_AREA_TEST 9
#define VTK_FAILED_ZERO_NORMAL_TEST 10
#define VTK_FAILED_TO_TRIANGULATE 11
// Special structures for building loops
typedef struct _vtkLocalVertex
......
......@@ -57,7 +57,7 @@ public:
// cell methods
vtkCell *MakeObject() {return new vtkHexahedron(*this);};
int GetCellType() {return vtkHEXAHEDRON;};
int GetCellType() {return VTK_HEXAHEDRON;};
int GetCellDimension() {return 3;};
int GetNumberOfEdges() {return 12;};
int GetNumberOfFaces() {return 6;};
......
......@@ -56,7 +56,7 @@ public:
// cell methods
vtkCell *MakeObject() {return new vtkLine(*this);};
int GetCellType() {return vtkLINE;};
int GetCellType() {return VTK_LINE;};
int GetCellDimension() {return 1;};
int GetNumberOfEdges() {return 0;};
int GetNumberOfFaces() {return 0;};
......
......@@ -58,7 +58,7 @@ public:
// cell methods
vtkCell *MakeObject() {return new vtkPixel(*this);};
int GetCellType() {return vtkPIXEL;};
int GetCellType() {return VTK_PIXEL;};
int GetCellDimension() {return 2;};
int GetNumberOfEdges() {return 4;};
int GetNumberOfFaces() {return 0;};
......
......@@ -63,7 +63,7 @@ public:
// cell methods
vtkCell *MakeObject() {return new vtkPolyLine(*this);};
int GetCellType() {return vtkPOLY_LINE;};
int GetCellType() {return VTK_POLY_LINE;};
int GetCellDimension() {return 1;};
int GetNumberOfEdges() {return 0;};
int GetNumberOfFaces() {return 0;};
......
......@@ -57,7 +57,7 @@ public:
// cell methods
vtkCell *MakeObject() {return new vtkPolyVertex(*this);};
int GetCellType() {return vtkPOLY_VERTEX;};
int GetCellType() {return VTK_POLY_VERTEX;};
int GetCellDimension() {return 0;};
int GetNumberOfEdges() {return 0;};
int GetNumberOfFaces() {return 0;};
......
......@@ -63,7 +63,7 @@ public:
// Cell interface
vtkCell *MakeObject() {return new vtkPolygon(*this);};
int GetCellType() {return vtkPOLYGON;};
int GetCellType() {return VTK_POLYGON;};
int GetCellDimension() {return 2;};
int GetNumberOfEdges() {return this->GetNumberOfPoints();};
int GetNumberOfFaces() {return 0;};
......
......@@ -57,7 +57,7 @@ public:
// cell methods
vtkCell *MakeObject() {return new vtkQuad(*this);};
int GetCellType() {return vtkQUAD;};
int GetCellType() {return VTK_QUAD;};
int GetCellDimension() {return 2;};
int GetNumberOfEdges() {return 4;};
int GetNumberOfFaces() {return 0;};
......
......@@ -51,8 +51,5 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#define VTK_WIREFRAME 1
#define VTK_SURFACE 2
// some general macros
#define RANGE_CLIP(a,x,b) ((x)<(a)?(a):((x)>(b)?(b):(x)))
#endif
......@@ -249,7 +249,8 @@ void Set##name (type _arg[4]) \
#define vtkSetVectorMacro(name,type,count) \
void Set##name(type data[]) \
{ \
for (int i=0; i<count; i++) if ( data[i] != name[i] ) break; \
int i; \
for (i=0; i<count; i++) if ( data[i] != name[i] ) break; \
if ( i < count ) \
{ \
this->Modified(); \
......
......@@ -57,7 +57,7 @@ public:
// cell methods
vtkCell *MakeObject() {return new vtkTetra(*this);};
int GetCellType() {return vtkTETRA;};
int GetCellType() {return VTK_TETRA;};
int GetCellDimension() {return 3;};
int GetNumberOfEdges() {return 6;};
int GetNumberOfFaces() {return 4;};
......
......@@ -58,7 +58,7 @@ public:
// cell methods
vtkCell *MakeObject() {return new vtkTriangle(*this);};
int GetCellType() {return vtkTRIANGLE;};
int GetCellType() {return VTK_TRIANGLE;};
int GetCellDimension() {return 2;};
int GetNumberOfEdges() {return 3;};
int GetNumberOfFaces() {return 0;};
......
......@@ -61,7 +61,7 @@ public:
// cell methods
vtkCell *MakeObject() {return new vtkTriangleStrip(*this);};
int GetCellType() {return vtkTRIANGLE_STRIP;};
int GetCellType() {return VTK_TRIANGLE_STRIP;};
int GetCellDimension() {return 2;};
int GetNumberOfEdges() {return this->GetNumberOfPoints();};
int GetNumberOfFaces() {return 0;};
......
......@@ -55,7 +55,7 @@ public:
char *GetClassName() {return "vtkVertex";};
vtkCell *MakeObject() {return new vtkVertex(*this);};
int GetCellType() {return vtkVERTEX;};
int GetCellType() {return VTK_VERTEX;};
int GetCellDimension() {return 0;};
int GetNumberOfEdges() {return 0;};
int GetNumberOfFaces() {return 0;};
......
......@@ -59,7 +59,7 @@ public:
// cell methods
vtkCell *MakeObject() {return new vtkVoxel(*this);};
int GetCellType() {return vtkVOXEL;};
int GetCellType() {return VTK_VOXEL;};
int GetCellDimension() {return 3;};
int GetNumberOfEdges() {return 12;};
int GetNumberOfFaces() {return 6;};
......
......@@ -53,12 +53,12 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#include <xgl/xgl.h>
#include "vtkXglrRenderWindow.hh"
#define MAX_LIGHTS 12
#define VTK_MAX_LIGHTS 12
class vtkXglrRenderer : public vtkRenderer
{
protected:
Xgl_light XglrLights[MAX_LIGHTS];
Xgl_light XglrLights[VTK_MAX_LIGHTS];
int NumberOfLightsBound;
Xgl_3d_ctx Context;
......
......@@ -39,6 +39,26 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
=========================================================================*/
#include "vtkDecimate.hh"
#define VTK_TOLERANCE 1.0e-05
#define VTK_MAX_TRIS_PER_VERTEX VTK_MAX_CELL_SIZE
#define VTK_MAX_SQUAWKS 10
#define VTK_COMPLEX_VERTEX 0
#define VTK_SIMPLE_VERTEX 1
#define VTK_BOUNDARY_VERTEX 2
#define VTK_INTERIOR_EDGE_VERTEX 3
#define VTK_CORNER_VERTEX 4
#define VTK_ELIMINATED_DISTANCE_TO_PLANE 5
#define VTK_ELIMINATED_DISTANCE_TO_EDGE 6
#define VTK_FAILED_DEGREE_TEST 7
#define VTK_FAILED_NON_MANIFOLD 8
#define VTK_FAILED_ZERO_AREA_TEST 9
#define VTK_FAILED_ZERO_NORMAL_TEST 10
#define VTK_FAILED_TO_TRIANGULATE 11
//
// Static variables used by object
//
......@@ -393,7 +413,7 @@ void vtkDecimate::CreateOutput(int numPts, int numTris, int numEliminated,
for (cellId=0; cellId < numTris; cellId++)
{
if ( Mesh->GetCellType(cellId) == vtkTRIANGLE ) // non-null element
if ( Mesh->GetCellType(cellId) == VTK_TRIANGLE ) // non-null element
{
Mesh->GetCellPoints(cellId, npts, pts);
for (i=0; i<npts; i++) newCellPts[i] = map[pts[i]];
......
......@@ -245,6 +245,8 @@ void vtkImplicitModeller::SetSampleDimensions(int i, int j, int k)
void vtkImplicitModeller::SetSampleDimensions(int dim[3])
{
int dataDim, i;
vtkDebugMacro(<< " setting SampleDimensions to (" << dim[0] << "," << dim[1] << "," << dim[2] << ")");
if ( dim[0] != this->SampleDimensions[0] || dim[1] != SampleDimensions[1] ||
......@@ -256,7 +258,7 @@ void vtkImplicitModeller::SetSampleDimensions(int dim[3])
return;
}
for (int dataDim=0, i=0; i<3 ; i++) if (dim[i] > 1) dataDim++;
for (dataDim=0, i=0; i<3 ; i++) if (dim[i] > 1) dataDim++;
if ( dataDim < 3 )
{
......
Markdown is supported
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