24 #ifndef PXR_BASE_GF_SIZE3_H
25 #define PXR_BASE_GF_SIZE3_H
65 Set(o[0], o[1], o[2]);
106 return _vec[0] == v._vec[0] && _vec[1] == v._vec[1] &&
107 _vec[2] == v._vec[2];
112 return ! (*
this ==
v);
117 _vec[0] += v._vec[0];
118 _vec[1] += v._vec[1];
119 _vec[2] += v._vec[2];
125 _vec[0] -= v._vec[0];
126 _vec[1] -= v._vec[1];
127 _vec[2] -= v._vec[2];
133 _vec[0] *= v._vec[0];
134 _vec[1] *= v._vec[1];
135 _vec[2] *= v._vec[2];
141 _vec[0] = _vec[0] * d;
142 _vec[1] = _vec[1] * d;
143 _vec[2] = _vec[2] * d;
149 _vec[0] = _vec[0] / d;
150 _vec[1] = _vec[1] / d;
151 _vec[2] = _vec[2] / d;
157 return GfSize3(v1._vec[0]+v3._vec[0],
158 v1._vec[1]+v3._vec[1],
159 v1._vec[2]+v3._vec[2]);
164 return GfSize3(v1._vec[0]-v3._vec[0],
165 v1._vec[1]-v3._vec[1],
166 v1._vec[2]-v3._vec[2]);
171 return GfSize3(v1._vec[0]*v3._vec[0],
172 v1._vec[1]*v3._vec[1],
173 v1._vec[2]*v3._vec[2]);
202 return GfVec3i(_vec[0],_vec[1],_vec[2]);
213 #endif // PXR_BASE_GF_SIZE3_H
friend GfSize3 operator*(const GfSize3 &v1, const GfSize3 &v3)
Component-wise multiplication.
GfSize3 & operator/=(size_t d)
Component-wise in-place division by a scalar.
GfSize3 & Set(size_t v0, size_t v1, size_t v2)
Set to values passed directly.
GfSize3(const size_t v[3])
Construct from an array.
GF_API std::ostream & operator<<(std::ostream &o, GfSize3 const &v)
GfSize3 & operator*=(GfSize3 const &v)
Component-wise in-place multiplication.
GLfloat GLfloat GLfloat v2
GLfloat GLfloat GLfloat GLfloat v3
size_t & operator[](size_t i)
Array operator.
bool operator==(const GfSize3 &v) const
Component-wise equality.
GfSize3 & Set(const size_t v[3])
Set to the values in v.
friend GF_API std::ostream & operator<<(std::ostream &o, GfSize3 const &v)
Output operator.
friend GfSize3 operator/(const GfSize3 &v1, size_t s)
Component-wise division by a scalar.
GfSize3(size_t v0, size_t v1, size_t v2)
Construct from three values.
bool operator!=(const GfSize3 &v) const
Component-wise inequality.
GfSize3(const GfVec3i &o)
Conversion from GfVec3i.
GfSize3 & operator+=(const GfSize3 &v)
Component-wise in-place addition.
GfSize3 & operator-=(const GfSize3 &v)
Component-wise in-place subtraction.
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
friend GfSize3 operator-(const GfSize3 &v1, const GfSize3 &v3)
Component-wise subtraction.
GfSize3()
Default constructor initializes components to zero.
GfSize3(const GfSize3 &o)
Copy constructor.
#define PXR_NAMESPACE_CLOSE_SCOPE
friend GfSize3 operator+(const GfSize3 &v1, const GfSize3 &v3)
Component-wise addition.