VTK  9.1.0
Public Types | Public Member Functions | Friends | List of all members
vtkArrayRange Class Reference

Stores a half-open range of array coordinates. More...

#include <vtkArrayRange.h>

Public Types

typedef vtkArrayCoordinates::CoordinateT CoordinateT
 

Public Member Functions

 vtkArrayRange ()
 Creates an empty range.
 
 vtkArrayRange (CoordinateT begin, CoordinateT end)
 Creates a half-open range [begin, end).
 
CoordinateT GetBegin () const
 Returns the beginning of the range.
 
CoordinateT GetEnd () const
 Returns one-past-the-end of the range.
 
CoordinateT GetSize () const
 Returns the size of the range (the distance End - Begin).
 
bool Contains (const vtkArrayRange &range) const
 Returns true iff the given range is a non-overlapping subset of this range.
 
bool Contains (const CoordinateT coordinate) const
 Returns true iff the given coordinate falls within this range.
 

Friends

VTKCOMMONCORE_EXPORT friend ostream & operator<< (ostream &stream, const vtkArrayRange &rhs)
 Serialization.
 
VTKCOMMONCORE_EXPORT friend bool operator== (const vtkArrayRange &lhs, const vtkArrayRange &rhs)
 Equality comparisons.
 
VTKCOMMONCORE_EXPORT friend bool operator!= (const vtkArrayRange &lhs, const vtkArrayRange &rhs)
 Equality comparisons.
 

Detailed Description

Stores a half-open range of array coordinates.

vtkArrayRange stores a half-open range of array coordinates along a single dimension of a vtkArraySlice object.

See also
vtkArray, vtkArrayRange
Thanks:
Developed by Timothy M. Shead (tshea.nosp@m.d@sa.nosp@m.ndia..nosp@m.gov) at Sandia National Laboratories.
Online Examples:

Definition at line 64 of file vtkArrayRange.h.

Member Typedef Documentation

◆ CoordinateT

Definition at line 67 of file vtkArrayRange.h.

Constructor & Destructor Documentation

◆ vtkArrayRange() [1/2]

vtkArrayRange::vtkArrayRange ( )

Creates an empty range.

◆ vtkArrayRange() [2/2]

vtkArrayRange::vtkArrayRange ( CoordinateT  begin,
CoordinateT  end 
)

Creates a half-open range [begin, end).

Note that begin must be <= end, if not, creates the empty range [begin, begin).

Member Function Documentation

◆ GetBegin()

CoordinateT vtkArrayRange::GetBegin ( ) const

Returns the beginning of the range.

◆ GetEnd()

CoordinateT vtkArrayRange::GetEnd ( ) const

Returns one-past-the-end of the range.

◆ GetSize()

CoordinateT vtkArrayRange::GetSize ( ) const

Returns the size of the range (the distance End - Begin).

◆ Contains() [1/2]

bool vtkArrayRange::Contains ( const vtkArrayRange range) const

Returns true iff the given range is a non-overlapping subset of this range.

◆ Contains() [2/2]

bool vtkArrayRange::Contains ( const CoordinateT  coordinate) const

Returns true iff the given coordinate falls within this range.

Friends And Related Function Documentation

◆ operator==

VTKCOMMONCORE_EXPORT friend bool operator== ( const vtkArrayRange lhs,
const vtkArrayRange rhs 
)
friend

Equality comparisons.

◆ operator!=

VTKCOMMONCORE_EXPORT friend bool operator!= ( const vtkArrayRange lhs,
const vtkArrayRange rhs 
)
friend

Equality comparisons.

◆ operator<<

VTKCOMMONCORE_EXPORT friend ostream & operator<< ( ostream &  stream,
const vtkArrayRange rhs 
)
friend

The documentation for this class was generated from the following file: