HDK
|
2D Vector class. More...
#include <UT_Vector2.h>
Public Types | |
typedef T | value_type |
Static Public Member Functions | |
static int | entries () |
Returns the vector size. More... | |
Public Attributes | |
T | vec [tuple_size] |
Static Public Attributes | |
static constexpr int | tuple_size = 2 |
Friends | |
constexpr bool | isZero (const UT_Vector2T &a) noexcept |
constexpr auto | length2 (const UT_Vector2T &a) noexcept |
constexpr auto | distance2 (const UT_Vector2T &a, const UT_Vector2T &b) noexcept |
constexpr bool | operator== (const UT_Vector2T &a, const UT_Vector2T &b) noexcept |
constexpr bool | operator!= (const UT_Vector2T &a, const UT_Vector2T &b) noexcept |
constexpr bool | operator< (const UT_Vector2T &a, const UT_Vector2T &b) noexcept |
constexpr bool | operator<= (const UT_Vector2T &a, const UT_Vector2T &b) noexcept |
constexpr bool | operator> (const UT_Vector2T &a, const UT_Vector2T &b) noexcept |
constexpr bool | operator>= (const UT_Vector2T &a, const UT_Vector2T &b) noexcept |
std::ostream & | operator<< (std::ostream &os, const UT_Vector2T< T > &v) |
I/O friends. More... | |
2D Vector class.
Definition at line 159 of file UT_Vector2.h.
typedef T UT_Vector2T< T >::value_type |
Definition at line 162 of file UT_Vector2.h.
|
default |
Default constructor. No data is initialized! Use it for extra speed.
|
default |
|
default |
|
inlinenoexcept |
Definition at line 172 of file UT_Vector2.h.
|
inlineexplicitnoexcept |
Definition at line 176 of file UT_Vector2.h.
|
inlineexplicitnoexcept |
Definition at line 180 of file UT_Vector2.h.
|
inlineexplicitnoexcept |
Definition at line 183 of file UT_Vector2.h.
|
inlineexplicitnoexcept |
Definition at line 186 of file UT_Vector2.h.
|
inlineexplicitnoexcept |
Definition at line 189 of file UT_Vector2.h.
|
inlineexplicitnoexcept |
Definition at line 192 of file UT_Vector2.h.
|
inlineexplicitnoexcept |
Definition at line 196 of file UT_Vector2.h.
|
inlineexplicitnoexcept |
Definition at line 200 of file UT_Vector2.h.
|
inlinenoexcept |
Our own type of any given value_type.
Definition at line 206 of file UT_Vector2.h.
|
inline |
Set the values of the vector components.
Definition at line 446 of file UT_Vector2.h.
|
inline |
Set the values of the vector components.
Definition at line 451 of file UT_Vector2.h.
|
inlinenoexcept |
Definition at line 217 of file UT_Vector2.h.
|
inlinenoexcept |
Definition at line 222 of file UT_Vector2.h.
|
inline |
Express the point in homogeneous coordinates or vice-versa.
Definition at line 456 of file UT_Vector2.h.
|
inlinenoexcept |
Definition at line 304 of file UT_Vector2.h.
|
inlinenoexcept |
Definition at line 299 of file UT_Vector2.h.
|
inlinenoexcept |
Definition at line 399 of file UT_Vector2.h.
|
inlinestatic |
Returns the vector size.
Definition at line 474 of file UT_Vector2.h.
|
inlinenoexcept |
Definition at line 331 of file UT_Vector2.h.
|
inline |
These allow you to find out what indices to use for different axes.
Definition at line 390 of file UT_Vector2.h.
|
inline |
These allow you to find out what indices to use for different axes.
Definition at line 383 of file UT_Vector2.h.
UT_Vector3T<T> UT_Vector2T< T >::getBary | ( | const UT_Vector2T< T > & | t0, |
const UT_Vector2T< T > & | t1, | ||
const UT_Vector2T< T > & | t2, | ||
bool * | degen = NULL |
||
) | const |
Compute (homogeneous) barycentric co-ordinates of this point relative to the triangle defined by t0, t1 and t2. (The point is projected into the triangle's plane.)
|
inline |
Compute a hash.
Definition at line 441 of file UT_Vector2.h.
|
inline |
Express the point in homogeneous coordinates or vice-versa.
Definition at line 455 of file UT_Vector2.h.
|
inlinenoexcept |
Definition at line 336 of file UT_Vector2.h.
|
inlinenoexcept |
Definition at line 321 of file UT_Vector2.h.
|
inlinenoexcept |
Definition at line 316 of file UT_Vector2.h.
|
inlinenoexcept |
Definition at line 326 of file UT_Vector2.h.
|
inlinenoexcept |
Definition at line 294 of file UT_Vector2.h.
|
inlinenoexcept |
Definition at line 289 of file UT_Vector2.h.
bool UT_Vector2T< T >::load | ( | UT_IStream & | is | ) |
Protected I/O methods.
bool UT_Vector2T< T >::load | ( | UT_JSONParser & | p | ) |
Methods to serialize to a JSON stream. The vector is stored as an array of 2 reals.
|
inlinenoexcept |
Definition at line 341 of file UT_Vector2.h.
|
inline |
Definition at line 360 of file UT_Vector2.h.
|
inlinenoexcept |
Definition at line 284 of file UT_Vector2.h.
|
inlinenoexcept |
Definition at line 309 of file UT_Vector2.h.
|
inline |
Return the components of the vector. The () operator does NOT check for the boundary condition.
Definition at line 428 of file UT_Vector2.h.
|
inline |
Return the components of the vector. The () operator does NOT check for the boundary condition.
Definition at line 433 of file UT_Vector2.h.
|
inlinenoexcept |
Definition at line 265 of file UT_Vector2.h.
|
inlinenoexcept |
Definition at line 278 of file UT_Vector2.h.
|
inline |
Definition at line 378 of file UT_Vector2.h.
|
inlinenoexcept |
Definition at line 241 of file UT_Vector2.h.
|
inlinenoexcept |
Definition at line 253 of file UT_Vector2.h.
|
inline |
Definition at line 356 of file UT_Vector2.h.
|
inlinenoexcept |
Definition at line 247 of file UT_Vector2.h.
|
inlinenoexcept |
Definition at line 259 of file UT_Vector2.h.
|
inlinenoexcept |
Definition at line 271 of file UT_Vector2.h.
|
default |
|
default |
|
inline |
Definition at line 214 of file UT_Vector2.h.
UT_Vector2T<T>& UT_Vector2T< T >::operator= | ( | const UT_Vector3T< T > & | v | ) |
Assignment operator that truncates a V3 to a V2.
UT_Vector2T<T>& UT_Vector2T< T >::operator= | ( | const UT_Vector4T< T > & | v | ) |
Assignment operator that truncates a V4 to a V2.
|
noexcept |
Definition at line 539 of file UT_Vector2.h.
|
inlinenoexcept |
Definition at line 227 of file UT_Vector2.h.
|
inlinenoexcept |
Definition at line 234 of file UT_Vector2.h.
UT_Vector2T<T> UT_Vector2T< T >::project | ( | const UT_Vector2T< T > & | u | ) | const |
Calculates the orthogonal projection of a vector u on the *this vector.
UT_Vector2T<T> UT_Vector2T< T >::projection | ( | const UT_Vector2T< T > & | p, |
const UT_Vector2T< T > & | v | ||
) | const |
Vector p (representing a point in 2-space) and vector v define a line. This member returns the projection of "this" onto the line (the point on the line that is closest to this point).
void UT_Vector2T< T >::save | ( | std::ostream & | os, |
int | binary = 0 |
||
) | const |
Protected I/O methods.
bool UT_Vector2T< T >::save | ( | UT_JSONWriter & | w | ) | const |
Methods to serialize to a JSON stream. The vector is stored as an array of 2 reals.
bool UT_Vector2T< T >::save | ( | UT_JSONValue & | v | ) | const |
Methods to serialize to a JSON stream. The vector is stored as an array of 2 reals.
|
inline |
Given an oriented line from e1 passing through e2, determine on which side of the line the point p lies. Alternatively, determine in which half plane, positive or negative, the point lies. If the segment degenerates to a point, then the point is always on it.
Definition at line 371 of file UT_Vector2.h.
|
inlinenoexcept |
Return the components of the vector. The () operator does NOT check for the boundary condition.
Definition at line 423 of file UT_Vector2.h.
|
inlinenoexcept |
Return the components of the vector. The () operator does NOT check for the boundary condition.
Definition at line 424 of file UT_Vector2.h.
|
inlinenoexcept |
Return the components of the vector. The () operator does NOT check for the boundary condition.
Definition at line 425 of file UT_Vector2.h.
|
inlinenoexcept |
Return the components of the vector. The () operator does NOT check for the boundary condition.
Definition at line 426 of file UT_Vector2.h.
|
friend |
Definition at line 490 of file UT_Vector2.h.
|
friend |
Definition at line 480 of file UT_Vector2.h.
|
friend |
Definition at line 485 of file UT_Vector2.h.
|
friend |
Definition at line 500 of file UT_Vector2.h.
|
friend |
Lexicographic order comparison operators
Definition at line 507 of file UT_Vector2.h.
|
friend |
I/O friends.
Definition at line 530 of file UT_Vector2.h.
|
friend |
Lexicographic order comparison operators
Definition at line 512 of file UT_Vector2.h.
|
friend |
Definition at line 495 of file UT_Vector2.h.
|
friend |
Lexicographic order comparison operators
Definition at line 517 of file UT_Vector2.h.
|
friend |
Lexicographic order comparison operators
Definition at line 522 of file UT_Vector2.h.
|
static |
Definition at line 163 of file UT_Vector2.h.
T UT_Vector2T< T >::vec[tuple_size] |
Definition at line 476 of file UT_Vector2.h.