The Transform struct.
More...
#include <nudge.h>
The Transform struct.
- Note
- This struct has been rearranged to use anomymous unions for improved flexibility, but now initializations must be done with and additional pair of curly parenthesis, otherwise some compiler can issue a warning; for example: Transform T = { {{0,0,0}} , {0} , {{0,0,0,1}} };
-
The 'vector' and 'quaternion' fields have been added only to allow partial assignments like: T2.quaternion = T1.quaternion;
-
By default this struct contains nested anonymous structs that allow to use {.px,.px,.pz} and {.rx,.rx,.rz,.rw}/{.qx,.qx,.qz,.qw} fields: this requires the C++11 standard (but in my tests g++ and clang++ with -std=c++98 is enough)
-
There is a definition named NUDGE_NO_ANONYMOUS_STRUCTS that can be used to remove anonymous structs, that usually require -std=c++11 (even if g++ and clang++ seem to work just fine with -std=c++98 in my tests)
◆ position
float nudge::Transform::position[3] |
position applied before rotation
float nudge::Transform::p[3] |
float nudge::Transform::x |
float nudge::Transform::y |
float nudge::Transform::z |
◆ [struct]
struct { ... } nudge::Transform::vector |
◆ px
float nudge::Transform::px |
◆ py
float nudge::Transform::py |
◆ pz
float nudge::Transform::pz |
◆ [union]
◆ body
uint32_t nudge::Transform::body |
the body index (used mainly inside colliders to retrieve the body)
◆ time
float nudge::Transform::time |
◆ [union]
◆ rotation
float nudge::Transform::rotation[4] |
the orientation in quaternion form
float nudge::Transform::r[4] |
float nudge::Transform::q[4] |
float nudge::Transform::w |
◆ [struct]
struct { ... } nudge::Transform::quaternion |
◆ rx
float nudge::Transform::rx |
◆ ry
float nudge::Transform::ry |
◆ rz
float nudge::Transform::rz |
◆ rw
float nudge::Transform::rw |
◆ qx
float nudge::Transform::qx |
◆ qy
float nudge::Transform::qy |
◆ qz
float nudge::Transform::qz |
◆ qw
float nudge::Transform::qw |
◆ [union]
The documentation for this struct was generated from the following file: