![]() |
|
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 | |
| Default constructor does no initialization. | |
| 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. | |
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. | |
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.
| typedef int ScalarType |
|
default |
Default constructor does no initialization.
|
inlineexplicitconstexpr |
|
inlineconstexpr |
|
inlineexplicitconstexpr |
|
inlinestatic |
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 |