Loading...
Searching...
No Matches
GfSize3 Class Reference

Three-dimensional array of sizes. More...

#include <size3.h>

Public Member Functions

 GfSize3 ()
 Default constructor initializes components to zero.
 
 GfSize3 (const GfSize3 &o)
 Copy constructor.
 
 GfSize3 (const GfVec3i &o)
 Conversion from GfVec3i.
 
 GfSize3 (const size_t v[3])
 Construct from an array.
 
 GfSize3 (size_t v0, size_t v1, size_t v2)
 Construct from three values.
 
GfSize3Set (const size_t v[3])
 Set to the values in v.
 
GfSize3Set (size_t v0, size_t v1, size_t v2)
 Set to values passed directly.
 
size_t & operator[] (size_t i)
 Array operator.
 
const size_t & operator[] (size_t i) const
 Const array operator.
 
bool operator== (const GfSize3 &v) const
 Component-wise equality.
 
bool operator!= (const GfSize3 &v) const
 Component-wise inequality.
 
GfSize3operator+= (const GfSize3 &v)
 Component-wise in-place addition.
 
GfSize3operator-= (const GfSize3 &v)
 Component-wise in-place subtraction.
 
GfSize3operator*= (GfSize3 const &v)
 Component-wise in-place multiplication.
 
GfSize3operator*= (size_t d)
 Component-wise in-place multiplication by a scalar.
 
GfSize3operator/= (size_t d)
 Component-wise in-place division by a scalar.
 
 operator GfVec3i () const
 Conversion to GfVec3i.
 

Friends

GfSize3 operator+ (const GfSize3 &v1, const GfSize3 &v3)
 Component-wise addition.
 
GfSize3 operator- (const GfSize3 &v1, const GfSize3 &v3)
 Component-wise subtraction.
 
GfSize3 operator* (const GfSize3 &v1, const GfSize3 &v3)
 Component-wise multiplication.
 
GfSize3 operator* (const GfSize3 &v1, size_t s)
 Component-wise multiplication by a scalar.
 
GfSize3 operator* (size_t s, const GfSize3 &v1)
 Component-wise multiplication by a scalar.
 
GfSize3 operator/ (const GfSize3 &v1, size_t s)
 Component-wise division by a scalar.
 
GF_API std::ostream & operator<< (std::ostream &o, GfSize3 const &v)
 Output operator.
 

Detailed Description

Three-dimensional array of sizes.

GfSize3 is used to represent triples 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 GfVeci.

Usage of GfSize3 is similar to that of GfVec3i, except that all mathematical operations are componentwise (including multiplication).

Definition at line 51 of file size3.h.

Constructor & Destructor Documentation

◆ GfSize3() [1/5]

GfSize3 ( )
inline

Default constructor initializes components to zero.

Definition at line 54 of file size3.h.

◆ GfSize3() [2/5]

GfSize3 ( const GfSize3 o)
inline

Copy constructor.

Definition at line 59 of file size3.h.

◆ GfSize3() [3/5]

GfSize3 ( const GfVec3i o)
inlineexplicit

Conversion from GfVec3i.

Definition at line 64 of file size3.h.

◆ GfSize3() [4/5]

GfSize3 ( const size_t  v[3])
inline

Construct from an array.

Definition at line 69 of file size3.h.

◆ GfSize3() [5/5]

GfSize3 ( size_t  v0,
size_t  v1,
size_t  v2 
)
inline

Construct from three values.

Definition at line 74 of file size3.h.

Member Function Documentation

◆ operator GfVec3i()

operator GfVec3i ( ) const
inline

Conversion to GfVec3i.

Definition at line 201 of file size3.h.

◆ operator!=()

bool operator!= ( const GfSize3 v) const
inline

Component-wise inequality.

Definition at line 111 of file size3.h.

◆ operator*=() [1/2]

GfSize3 & operator*= ( GfSize3 const &  v)
inline

Component-wise in-place multiplication.

Definition at line 132 of file size3.h.

◆ operator*=() [2/2]

GfSize3 & operator*= ( size_t  d)
inline

Component-wise in-place multiplication by a scalar.

Definition at line 140 of file size3.h.

◆ operator+=()

GfSize3 & operator+= ( const GfSize3 v)
inline

Component-wise in-place addition.

Definition at line 116 of file size3.h.

◆ operator-=()

GfSize3 & operator-= ( const GfSize3 v)
inline

Component-wise in-place subtraction.

Definition at line 124 of file size3.h.

◆ operator/=()

GfSize3 & operator/= ( size_t  d)
inline

Component-wise in-place division by a scalar.

Definition at line 148 of file size3.h.

◆ operator==()

bool operator== ( const GfSize3 v) const
inline

Component-wise equality.

Definition at line 105 of file size3.h.

◆ operator[]() [1/2]

size_t & operator[] ( size_t  i)
inline

Array operator.

Definition at line 95 of file size3.h.

◆ operator[]() [2/2]

const size_t & operator[] ( size_t  i) const
inline

Const array operator.

Definition at line 100 of file size3.h.

◆ Set() [1/2]

GfSize3 & Set ( const size_t  v[3])
inline

Set to the values in v.

Definition at line 79 of file size3.h.

◆ Set() [2/2]

GfSize3 & Set ( size_t  v0,
size_t  v1,
size_t  v2 
)
inline

Set to values passed directly.

Definition at line 87 of file size3.h.

Friends And Related Function Documentation

◆ operator* [1/3]

GfSize3 operator* ( const GfSize3 v1,
const GfSize3 v3 
)
friend

Component-wise multiplication.

Definition at line 170 of file size3.h.

◆ operator* [2/3]

GfSize3 operator* ( const GfSize3 v1,
size_t  s 
)
friend

Component-wise multiplication by a scalar.

Definition at line 177 of file size3.h.

◆ operator* [3/3]

GfSize3 operator* ( size_t  s,
const GfSize3 v1 
)
friend

Component-wise multiplication by a scalar.

Definition at line 184 of file size3.h.

◆ operator+

GfSize3 operator+ ( const GfSize3 v1,
const GfSize3 v3 
)
friend

Component-wise addition.

Definition at line 156 of file size3.h.

◆ operator-

GfSize3 operator- ( const GfSize3 v1,
const GfSize3 v3 
)
friend

Component-wise subtraction.

Definition at line 163 of file size3.h.

◆ operator/

GfSize3 operator/ ( const GfSize3 v1,
size_t  s 
)
friend

Component-wise division by a scalar.

Definition at line 191 of file size3.h.

◆ operator<<

GF_API std::ostream & operator<< ( std::ostream &  o,
GfSize3 const &  v 
)
friend

Output operator.


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