HDK
|
#include <size2.h>
Public Member Functions | |
GfSize2 () | |
Default constructor initializes components to zero. More... | |
GfSize2 (const GfSize2 &o) | |
Copy constructor. More... | |
GfSize2 (const GfVec2i &o) | |
Conversion from GfVec2i. More... | |
GfSize2 (const size_t v[2]) | |
Construct from an array. More... | |
GfSize2 (size_t v0, size_t v1) | |
Construct from two values. More... | |
GfSize2 & | Set (const size_t v[2]) |
Set to the values in a given array. More... | |
GfSize2 & | Set (size_t v0, size_t v1) |
Set to values passed directly. More... | |
size_t & | operator[] (size_t i) |
Array operator. More... | |
const size_t & | operator[] (size_t i) const |
Const array operator. More... | |
bool | operator== (const GfSize2 &v) const |
Component-wise equality. More... | |
bool | operator!= (const GfSize2 &v) const |
Component-wise inequality. More... | |
GfSize2 & | operator+= (const GfSize2 &v) |
Component-wise in-place addition. More... | |
GfSize2 & | operator-= (const GfSize2 &v) |
Component-wise in-place subtraction. More... | |
GfSize2 & | operator*= (GfSize2 const &v) |
Component-wise in-place multiplication. More... | |
GfSize2 & | operator*= (int d) |
Component-wise in-place multiplication by a scalar. More... | |
GfSize2 & | operator/= (int d) |
Component-wise in-place division by a scalar. More... | |
operator GfVec2i () const | |
Conversion to GfVec2i. More... | |
Friends | |
GfSize2 | operator+ (const GfSize2 &v1, const GfSize2 &v2) |
Component-wise addition. More... | |
GfSize2 | operator- (const GfSize2 &v1, const GfSize2 &v2) |
Component-wise subtraction. More... | |
GfSize2 | operator* (const GfSize2 &v1, const GfSize2 &v2) |
Component-wise multiplication. More... | |
GfSize2 | operator* (const GfSize2 &v1, int s) |
Component-wise multiplication by a scalar. More... | |
GfSize2 | operator* (int s, const GfSize2 &v1) |
Component-wise multiplication by a scalar. More... | |
GfSize2 | operator/ (const GfSize2 &v1, int s) |
Component-wise division by a scalar. More... | |
GF_API friend std::ostream & | operator<< (std::ostream &o, GfSize2 const &v) |
Output operator. More... | |
Two-dimensional array of sizes
GfSize2 is used to represent pairs of counts. It is based on the datatype size_t, and thus can only represent non-negative values in each dimension. If you need to represent negative numbers as well, use GfVec2i.
Usage of GfSize2 is similar to that of GfVec2i, except that all mathematical operations are componentwise (including multiplication).
|
inline |
|
inline |
|
inlineexplicit |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Output operator.