This document is for a version of USD that is under development. See this page for the current release.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 34 of file size3.h.

Constructor & Destructor Documentation

◆ GfSize3() [1/5]

GfSize3 ( )
inline

Default constructor initializes components to zero.

Definition at line 37 of file size3.h.

◆ GfSize3() [2/5]

GfSize3 ( const GfSize3 o)
inline

Copy constructor.

Definition at line 42 of file size3.h.

◆ GfSize3() [3/5]

GfSize3 ( const GfVec3i o)
inlineexplicit

Conversion from GfVec3i.

Definition at line 47 of file size3.h.

◆ GfSize3() [4/5]

GfSize3 ( const size_t  v[3])
inline

Construct from an array.

Definition at line 52 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 57 of file size3.h.

Member Function Documentation

◆ operator GfVec3i()

operator GfVec3i ( ) const
inline

Conversion to GfVec3i.

Definition at line 184 of file size3.h.

◆ operator!=()

bool operator!= ( const GfSize3 v) const
inline

Component-wise inequality.

Definition at line 94 of file size3.h.

◆ operator*=() [1/2]

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

Component-wise in-place multiplication.

Definition at line 115 of file size3.h.

◆ operator*=() [2/2]

GfSize3 & operator*= ( size_t  d)
inline

Component-wise in-place multiplication by a scalar.

Definition at line 123 of file size3.h.

◆ operator+=()

GfSize3 & operator+= ( const GfSize3 v)
inline

Component-wise in-place addition.

Definition at line 99 of file size3.h.

◆ operator-=()

GfSize3 & operator-= ( const GfSize3 v)
inline

Component-wise in-place subtraction.

Definition at line 107 of file size3.h.

◆ operator/=()

GfSize3 & operator/= ( size_t  d)
inline

Component-wise in-place division by a scalar.

Definition at line 131 of file size3.h.

◆ operator==()

bool operator== ( const GfSize3 v) const
inline

Component-wise equality.

Definition at line 88 of file size3.h.

◆ operator[]() [1/2]

size_t & operator[] ( size_t  i)
inline

Array operator.

Definition at line 78 of file size3.h.

◆ operator[]() [2/2]

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

Const array operator.

Definition at line 83 of file size3.h.

◆ Set() [1/2]

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

Set to the values in v.

Definition at line 62 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 70 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 153 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 160 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 167 of file size3.h.

◆ operator+

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

Component-wise addition.

Definition at line 139 of file size3.h.

◆ operator-

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

Component-wise subtraction.

Definition at line 146 of file size3.h.

◆ operator/

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

Component-wise division by a scalar.

Definition at line 174 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: