Hermes
|
Represents a 2-dimensional transformation. More...
Public Member Functions | |
HERMES_DEVICE_CALLABLE | Transform2 () |
Default constructor. | |
HERMES_DEVICE_CALLABLE | Transform2 (const mat3 &mat) |
Constructs from matrix. More... | |
HERMES_DEVICE_CALLABLE | Transform2 (const bbox2 &bbox) |
Constructs from bounding box. More... | |
HERMES_DEVICE_CALLABLE void | operator() (const point2 &p, point2 *r) const |
Applies this transform to geometric point. More... | |
HERMES_DEVICE_CALLABLE void | operator() (const vec2 &v, vec2 *r) const |
Applies this transform to geometric vector. More... | |
HERMES_DEVICE_CALLABLE vec2 | operator() (const vec2 &v) const |
Applies this transform to geometric vector. More... | |
HERMES_DEVICE_CALLABLE point2 | operator() (const point2 &p) const |
Applies this transform to geometric point. More... | |
HERMES_DEVICE_CALLABLE bbox2 | operator() (const bbox2 &b) const |
Applies this transform to geometric box. More... | |
HERMES_DEVICE_CALLABLE Ray2 | operator() (const Ray2 &r) |
Applies this transform to geometric ray. More... | |
HERMES_DEVICE_CALLABLE Transform2 | operator* (const Transform2 &t) const |
Applies this transform to another transform. More... | |
HERMES_DEVICE_CALLABLE void | reset () |
Sets this transform back to identity. | |
HERMES_DEVICE_CALLABLE vec2 | getTranslate () const |
Extracts translation vector. More... | |
HERMES_DEVICE_CALLABLE vec2 | getScale () const |
Extracts scale vector. More... | |
HERMES_DEVICE_CALLABLE mat3 | getMatrix () const |
Extracts rotation matrix. More... | |
HERMES_DEVICE_CALLABLE const real_t * | operator[] (u32 row_index) const |
Gets transform matrix row. More... | |
HERMES_DEVICE_CALLABLE real_t * | operator[] (u32 row_index) |
Gets transform matrix row. More... | |
Static Public Member Functions | |
static HERMES_DEVICE_CALLABLE Transform2 | scale (const vec2 &s) |
Creates scale transform. More... | |
static HERMES_DEVICE_CALLABLE Transform2 | rotate (real_t angle) |
Creates rotation transform. More... | |
static HERMES_DEVICE_CALLABLE Transform2 | translate (const vec2 &v) |
Creates translation transform. More... | |
static MemoryDumper::RegionLayout | memoryDumpLayout () |
Gets memory layout. More... | |
Friends | |
Transform2 | inverse (const Transform2 &t) |
Gets inverse transform from t. More... | |
Represents a 2-dimensional transformation.
HERMES_DEVICE_CALLABLE hermes::Transform2::Transform2 | ( | const mat3 & | mat | ) |
Constructs from matrix.
mat |
HERMES_DEVICE_CALLABLE hermes::Transform2::Transform2 | ( | const bbox2 & | bbox | ) |
Constructs from bounding box.
bbox |
|
inline |
Extracts rotation matrix.
|
inline |
Extracts scale vector.
|
inline |
Extracts translation vector.
|
inlinestatic |
Gets memory layout.
|
inline |
Applies this transform to geometric box.
b |
|
inline |
Applies this transform to geometric point.
p |
|
inline |
Applies this transform to geometric point.
p | |
r |
|
inline |
Applies this transform to geometric ray.
r |
|
inline |
Applies this transform to geometric vector.
v |
|
inline |
Applies this transform to geometric vector.
v | |
r |
|
inline |
Applies this transform to another transform.
t |
|
inline |
Gets transform matrix row.
row_index |
|
inline |
Gets transform matrix row.
row_index |
|
static |
Creates rotation transform.
angle |
|
static |
Creates scale transform.
s |
|
static |
Creates translation transform.
v |
|
friend |
Gets inverse transform from t.
t |