![]() |
|
Basic type for a vector of 4 int components. More...
#include <vec4i.h>
Public Types | |
| typedef int | ScalarType |
| Scalar element type and dimension. | |
Public Member Functions | |
| GfVec4i ()=default | |
| GfVec4i value-initializes to zero and performs no default initialization, like float or double. | |
| constexpr | GfVec4i (int value) |
| Initialize all elements to a single value. | |
| constexpr | GfVec4i (int s0, int s1, int s2, int s3) |
| Initialize all elements with explicit arguments. | |
| template<class Scl > | |
| constexpr | GfVec4i (Scl const *p) |
| Construct with pointer to values. | |
| GfVec4i & | Set (int s0, int s1, int s2, int s3) |
| Set all elements with passed arguments. | |
| GfVec4i & | Set (int const *a) |
| Set all elements with a pointer to data. | |
| int const * | data () const |
| Direct data access. | |
| int * | data () |
| int const * | GetArray () const |
| int const & | operator[] (size_t i) const |
| Indexing. | |
| int & | operator[] (size_t i) |
| bool | operator== (GfVec4i const &other) const |
| Equality comparison. | |
| bool | operator!= (GfVec4i const &other) const |
| GF_API bool | operator== (class GfVec4d const &other) const |
| Equality comparison. | |
| GF_API bool | operator== (class GfVec4f const &other) const |
| Equality comparison. | |
| GF_API bool | operator== (class GfVec4h const &other) const |
| Equality comparison. | |
| GfVec4i | operator- () const |
| Create a vec with negated elements. | |
| GfVec4i & | operator+= (GfVec4i const &other) |
| Addition. | |
| GfVec4i & | operator-= (GfVec4i const &other) |
| Subtraction. | |
| GfVec4i & | operator*= (double s) |
| Multiplication by scalar. | |
| GfVec4i | operator* (double s) const |
| GfVec4i & | operator/= (int s) |
| Division by scalar. | |
| GfVec4i | operator/ (int s) const |
| int | operator* (GfVec4i const &v) const |
| See GfDot(). | |
| GfVec4i | GetProjection (GfVec4i const &v) const |
Returns the projection of this onto v. | |
| GfVec4i | GetComplement (GfVec4i const &b) const |
Returns the orthogonal complement of this->GetProjection(b). | |
| int | GetLengthSq () const |
| Squared length. | |
Swizzles | |
Each accessor returns a new vector built from this one's components, in the order named. For example wzyx() returns GfVec4i(w, z, y, x). Every permutation of 2 to 4 of the 4 components is available. Repeated components ( The results are ordinary GfVecs, so all the usual operators, GfDot() and so on apply to them. They are values, not references into this vector, so they cannot be assigned through. | |
| constexpr GfVec2i | xy () const |
| constexpr GfVec2i | xz () const |
| constexpr GfVec2i | xw () const |
| constexpr GfVec2i | yx () const |
| constexpr GfVec2i | yz () const |
| constexpr GfVec2i | yw () const |
| constexpr GfVec2i | zx () const |
| constexpr GfVec2i | zy () const |
| constexpr GfVec2i | zw () const |
| constexpr GfVec2i | wx () const |
| constexpr GfVec2i | wy () const |
| constexpr GfVec2i | wz () const |
| constexpr GfVec3i | xyz () const |
| constexpr GfVec3i | xyw () const |
| constexpr GfVec3i | xzy () const |
| constexpr GfVec3i | xzw () const |
| constexpr GfVec3i | xwy () const |
| constexpr GfVec3i | xwz () const |
| constexpr GfVec3i | yxz () const |
| constexpr GfVec3i | yxw () const |
| constexpr GfVec3i | yzx () const |
| constexpr GfVec3i | yzw () const |
| constexpr GfVec3i | ywx () const |
| constexpr GfVec3i | ywz () const |
| constexpr GfVec3i | zxy () const |
| constexpr GfVec3i | zxw () const |
| constexpr GfVec3i | zyx () const |
| constexpr GfVec3i | zyw () const |
| constexpr GfVec3i | zwx () const |
| constexpr GfVec3i | zwy () const |
| constexpr GfVec3i | wxy () const |
| constexpr GfVec3i | wxz () const |
| constexpr GfVec3i | wyx () const |
| constexpr GfVec3i | wyz () const |
| constexpr GfVec3i | wzx () const |
| constexpr GfVec3i | wzy () const |
| constexpr GfVec4i | xyzw () const |
| constexpr GfVec4i | xywz () const |
| constexpr GfVec4i | xzyw () const |
| constexpr GfVec4i | xzwy () const |
| constexpr GfVec4i | xwyz () const |
| constexpr GfVec4i | xwzy () const |
| constexpr GfVec4i | yxzw () const |
| constexpr GfVec4i | yxwz () const |
| constexpr GfVec4i | yzxw () const |
| constexpr GfVec4i | yzwx () const |
| constexpr GfVec4i | ywxz () const |
| constexpr GfVec4i | ywzx () const |
| constexpr GfVec4i | zxyw () const |
| constexpr GfVec4i | zxwy () const |
| constexpr GfVec4i | zyxw () const |
| constexpr GfVec4i | zywx () const |
| constexpr GfVec4i | zwxy () const |
| constexpr GfVec4i | zwyx () const |
| constexpr GfVec4i | wxyz () const |
| constexpr GfVec4i | wxzy () const |
| constexpr GfVec4i | wyxz () const |
| constexpr GfVec4i | wyzx () const |
| constexpr GfVec4i | wzxy () const |
| constexpr GfVec4i | wzyx () const |
Static Public Member Functions | |
| static GfVec4i | XAxis () |
| Create a unit vector along the X-axis. | |
| static GfVec4i | YAxis () |
| Create a unit vector along the Y-axis. | |
| static GfVec4i | ZAxis () |
| Create a unit vector along the Z-axis. | |
| static GfVec4i | WAxis () |
| Create a unit vector along the W-axis. | |
| static GfVec4i | Axis (size_t i) |
| Create a unit vector along the i-th axis, zero-based. | |
Public Attributes | |
Vector Components | |
The vector's components, which are also its storage. These are public and directly readable and writable. The components are contiguous and in declaration order, so For multi-component access see the swizzle accessors below, which return a new vector by value. | |
| int | x |
| int | y |
| int | z |
| int | w |
Static Public Attributes | |
| static const size_t | dimension = 4 |
Friends | |
| size_t | hash_value (GfVec4i const &vec) |
| Hash. | |
| GfVec4i | operator+ (GfVec4i const &l, GfVec4i const &r) |
| GfVec4i | operator- (GfVec4i const &l, GfVec4i const &r) |
| GfVec4i | operator* (double s, GfVec4i const &v) |
Basic type for a vector of 4 int components.
Represents a vector of 4 components of type int. It is intended to be fast and simple.
| int ScalarType |
|
default |
GfVec4i value-initializes to zero and performs no default initialization, like float or double.
|
inlineexplicitconstexpr |
|
inlineconstexpr |
|
inlineexplicitconstexpr |
|
inlinestatic |
|
inline |
Returns the orthogonal complement of this->GetProjection(b).
That is:
|
inline |
|
inline |
|
inline |
| GF_API bool operator== | ( | class GfVec4d const & | other | ) | const |
Equality comparison.
| GF_API bool operator== | ( | class GfVec4f const & | other | ) | const |
Equality comparison.
| GF_API bool operator== | ( | class GfVec4h const & | other | ) | const |
Equality comparison.
|
inline |
|
inline |
|
inline |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |