25 #ifndef __vtkStructuredExtent_h
26 #define __vtkStructuredExtent_h
38 static void Clamp(
int ext[6],
int wholeExt[6]);
42 static bool StrictlySmaller(
const int ext[6],
const int wholeExt[6]);
46 static bool Smaller(
const int ext[6],
const int wholeExt[6]);
49 static void Grow(
int ext[6],
int count);
52 static void Transform(
int ext[6],
int wholeExt[6]);
55 static void GetDimensions(
const int ext[6],
int dims[3]);
71 ext[0] = (ext[0] < wholeExt[0])? wholeExt[0] : ext[0];
72 ext[1] = (ext[1] > wholeExt[1])? wholeExt[1] : ext[1];
74 ext[2] = (ext[2] < wholeExt[2])? wholeExt[2] : ext[2];
75 ext[3] = (ext[3] > wholeExt[3])? wholeExt[3] : ext[3];
77 ext[4] = (ext[4] < wholeExt[4])? wholeExt[4] : ext[4];
78 ext[5] = (ext[5] > wholeExt[5])? wholeExt[5] : ext[5];
84 if (ext[0] < wholeExt[0] || ext[0] > wholeExt[0 + 1] ||
85 ext[0 + 1] < wholeExt[0] || ext[0 + 1] > wholeExt[0 + 1])
90 if (ext[2] < wholeExt[2] || ext[2] > wholeExt[2 + 1] ||
91 ext[2 + 1] < wholeExt[2] || ext[2 + 1] > wholeExt[2 + 1])
96 if (ext[4] < wholeExt[4] || ext[4] > wholeExt[4 + 1] ||
97 ext[4 + 1] < wholeExt[4] || ext[4 + 1] > wholeExt[4 + 1])
113 if (ext[0] > wholeExt[0] || ext[1] < wholeExt[1] ||
114 ext[2] > wholeExt[2] || ext[3] < wholeExt[3] ||
115 ext[4] > wholeExt[4] || ext[5] < wholeExt[5])
139 ext[0] -= wholeExt[0];
140 ext[1] -= wholeExt[0];
142 ext[2] -= wholeExt[2];
143 ext[3] -= wholeExt[2];
145 ext[4] -= wholeExt[4];
146 ext[5] -= wholeExt[4];
152 dims[0] = ext[1]-ext[0] + 1;
153 dims[1] = ext[3]-ext[2] + 1;
154 dims[2] = ext[5]-ext[4] + 1;
static void GetDimensions(const int ext[6], int dims[3])
abstract base class for most VTK objects
static bool Smaller(const int ext[6], const int wholeExt[6])
static void Grow(int ext[6], int count)
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
static bool StrictlySmaller(const int ext[6], const int wholeExt[6])
helper class to aid working with structured extents.
static void Clamp(int ext[6], int wholeExt[6])
static void Transform(int ext[6], int wholeExt[6])