|  | VTK
    9.0.1
    | 
 
 
 
Go to the documentation of this file.
   44     this->
Data[2] = width;
 
   57   void Set(
const T& x, 
const T& y, 
const T& width, 
const T& 
height)
 
   61     this->
Data[2] = width;
 
   74   const T& 
GetX()
 const { 
return this->
Data[0]; }
 
   84   const T& 
GetY()
 const { 
return this->
Data[1]; }
 
  159       T dx = this->
GetX() - point[0];
 
  160       this->
SetX(point[0]);
 
  163     else if (point[0] > this->
GetX())
 
  171     if (point[1] < this->
GetY())
 
  173       T dy = this->
GetY() - point[1];
 
  174       this->
SetY(point[1]);
 
  177     else if (point[1] > this->
GetY())
 
  191     T 
point[2] = { x, y };
 
  202     if (rect.
GetX() < this->GetX())
 
  208     else if (rect.
GetX() > this->GetX())
 
  221     if (rect.
GetY() < this->GetY())
 
  227     else if (rect.
GetY() > this->GetY())
 
  248     bool intersects = 
true;
 
  250     if (rect.
GetX() < this->GetX())
 
  253       intersects &= (dx < rect.
GetWidth());
 
  255     else if (rect.
GetX() > this->
GetX())
 
  258       intersects &= (dx < this->
GetWidth());
 
  266     else if (rect.
GetY() > this->
GetY())
 
  302       this->
Data[0] = left;
 
  304       this->
Data[2] = (right - left);
 
  
T Data[Size]
The only thing stored in memory!
vtkRectf(const float *init)
vtkVector< T, 2 > GetTopRight() const
Get the bottom left corner of the rect as a vtkVector.
const T & GetY() const
Get the y component of the rectangle bottom corner, i.e.
const T & GetBottom() const
Get the bottom boundary of the rectangle along the Y direction.
templated base type for storage of vectors.
static T Max(const T &a, const T &b)
Returns the maximum of the two arguments provided.
T GetRight() const
Get the right boundary of the rectangle along the X direction.
T GetTop() const
Get the top boundary of the rectangle along the Y direction.
const T & GetLeft() const
Get the left boundary of the rectangle along the X direction.
bool IntersectsWith(const vtkRect< T > &rect) const
Returns true if the rect argument overlaps this rect.
templated base type for storage of 2D rectangles.
void Set(const T &x, const T &y, const T &width, const T &height)
Set the x, y components of the rectangle, and the width/height.
void AddPoint(T x, T y)
Expand this rect to contain the point passed in.
const T & GetX() const
Get the x component of the rectangle bottom corner, i.e.
void SetX(const T &x)
Set the x component of the rectangle bottom corner, i.e.
vtkRectd(const double *init)
const T & GetHeight() const
Get the height of the rectangle, i.e.
vtkRect(const T &x, const T &y, const T &width, const T &height)
void SetHeight(const T &height)
Set the height of the rectangle, i.e.
void SetWidth(const T &width)
Set the width of the rectanle, i.e.
void SetY(const T &y)
Set the y component of the rectangle bottom corner, i.e.
vtkRecti(int x, int y, int width, int height)
vtkVector< T, 2 > GetTopLeft() const
Get the top left corner of the rect as a vtkVector.
vtkRectf(float x, float y, float width, float height)
vtkVector2< T > GetBottomLeft() const
Get the bottom left corner of the rect as a vtkVector.
static T Min(const T &a, const T &b)
Returns the minimum of the two arguments provided.
bool Intersect(const vtkRect< T > &other)
Intersect with other rectangle.
void AddPoint(const T point[2])
Expand this rect to contain the point passed in.
void AddRect(const vtkRect< T > &rect)
Expand this rect to contain the rect passed in.
const T & GetWidth() const
Get the width of the rectangle, i.e.
void MoveTo(T x, T y)
Move the rectangle, moving the bottom-left corner to the given position.
vtkRectd(double x, double y, double width, double height)
vtkRecti(const int *init)
vtkVector< T, 2 > GetBottomRight() const
Get the bottom right corner of the rect as a vtkVector.