7#ifndef PXR_BASE_GF_SIZE2_H
8#define PXR_BASE_GF_SIZE2_H
16#include "pxr/base/gf/api.h"
20PXR_NAMESPACE_OPEN_SCOPE
87 return _vec[0] == v._vec[0] && _vec[1] == v._vec[1];
92 return ! (*
this == v);
104 _vec[0] -= v._vec[0];
105 _vec[1] -= v._vec[1];
111 _vec[0] *= v._vec[0];
112 _vec[1] *= v._vec[1];
118 _vec[0] = _vec[0] * d;
119 _vec[1] = _vec[1] * d;
125 _vec[0] = _vec[0] / d;
126 _vec[1] = _vec[1] / d;
132 return GfSize2(v1._vec[0]+v2._vec[0],
133 v1._vec[1]+v2._vec[1]);
138 return GfSize2(v1._vec[0]-v2._vec[0],
139 v1._vec[1]-v2._vec[1]);
144 return GfSize2(v1._vec[0]*v2._vec[0],
145 v1._vec[1]*v2._vec[1]);
172 return GfVec2i(_vec[0], _vec[1]);
181PXR_NAMESPACE_CLOSE_SCOPE
Two-dimensional array of sizes.
GfSize2()
Default constructor initializes components to zero.
GfSize2(const size_t v[2])
Construct from an array.
GfSize2 & operator*=(GfSize2 const &v)
Component-wise in-place multiplication.
friend GfSize2 operator/(const GfSize2 &v1, int s)
Component-wise division by a scalar.
GfSize2 & Set(const size_t v[2])
Set to the values in a given array.
friend GfSize2 operator-(const GfSize2 &v1, const GfSize2 &v2)
Component-wise subtraction.
bool operator!=(const GfSize2 &v) const
Component-wise inequality.
GfSize2(const GfVec2i &o)
Conversion from GfVec2i.
GfSize2 & operator/=(int d)
Component-wise in-place division by a scalar.
GfSize2(size_t v0, size_t v1)
Construct from two values.
GF_API friend std::ostream & operator<<(std::ostream &o, GfSize2 const &v)
Output operator.
bool operator==(const GfSize2 &v) const
Component-wise equality.
friend GfSize2 operator+(const GfSize2 &v1, const GfSize2 &v2)
Component-wise addition.
GfSize2 & Set(size_t v0, size_t v1)
Set to values passed directly.
GfSize2 & operator+=(const GfSize2 &v)
Component-wise in-place addition.
size_t & operator[](size_t i)
Array operator.
GfSize2(const GfSize2 &o)
Copy constructor.
friend GfSize2 operator*(const GfSize2 &v1, const GfSize2 &v2)
Component-wise multiplication.
GfSize2 & operator-=(const GfSize2 &v)
Component-wise in-place subtraction.
Basic type for a vector of 2 int components.
GF_API std::ostream & operator<<(std::ostream &, const GfBBox3d &)
Output a GfBBox3d using the format [(range) matrix zeroArea].