29 #ifndef INCLUDED_MatrixConventionsC_h_GUID_6FC7A4C6_E6C5_4A96_1C28_C3D21B909681 30 #define INCLUDED_MatrixConventionsC_h_GUID_6FC7A4C6_E6C5_4A96_1C28_C3D21B909681 33 #include <osvr/Util/Export.h> 56 #ifndef OSVR_DOXYGEN_EXTERNAL 61 OSVR_MATRIX_MASK_ROWMAJOR = 0x1,
62 OSVR_MATRIX_MASK_ROWVECTORS = 0x2,
63 OSVR_MATRIX_MASK_LHINPUT = 0x4,
64 OSVR_MATRIX_MASK_UNSIGNEDZ = 0x8
155 inline OSVR_ReturnCode osvrPose3ToMatrix(
OSVR_Pose3 const *pose,
163 inline OSVR_ReturnCode osvrPose3ToMatrix(
OSVR_Pose3 const *pose,
171 template <
typename Scalar>
172 inline OSVR_ReturnCode osvrPose3ToMatrix(
OSVR_Pose3 const *pose,
175 return osvrPose3ToMatrix(pose, flags, &(mat[0]));
179 template <
typename Scalar>
180 inline OSVR_ReturnCode osvrPose3ToMatrix(
OSVR_Pose3 const &pose,
182 Scalar mat[OSVR_MATRIX_SIZE]) {
183 return osvrPose3ToMatrix(&pose, flags, &(mat[0]));
Header declaring a type and values for simple C return codes.
Matrix takes vectors from a left-handed coordinate system.
Definition: MatrixConventionsC.h:107
Constant for the number of elements in the matrices we use - 4x4.
Definition: MatrixConventionsC.h:127
OSVR_UTIL_EXPORT OSVR_ReturnCode osvrPose3ToMatrixf(OSVR_Pose3 const *pose, OSVR_MatrixConventions flags, float *mat)
Set a matrix of floats based on a Pose3.
Definition: MatrixConventionsC.cpp:56
Header wrapping the C99 standard stdint header.
OSVR_MatrixMasks
Bitmasks for testing matrix conventions.
Definition: MatrixConventionsC.h:60
Matrix transforms column vectors (default)
Definition: MatrixConventionsC.h:96
Column-major memory order (default)
Definition: MatrixConventionsC.h:83
uint16_t OSVR_MatrixConventions
Type for passing matrix convention flags.
Definition: MatrixConventionsC.h:54
OSVR_MatrixOrderingFlags
Flag bit controlling output memory order.
Definition: MatrixConventionsC.h:81
Matrix transforms row vectors.
Definition: MatrixConventionsC.h:98
Header providing basic C macros for defining API headers.
Row-major memory order.
Definition: MatrixConventionsC.h:85
Matrix takes vectors from a right-handed coordinate system (default)
Definition: MatrixConventionsC.h:105
OSVR_UTIL_EXPORT OSVR_ReturnCode osvrPose3ToMatrixd(OSVR_Pose3 const *pose, OSVR_MatrixConventions flags, double *mat)
Set a matrix of doubles based on a Pose3.
Definition: MatrixConventionsC.cpp:51
A structure defining a 3D (6DOF) rigid body pose: translation and rotation.
Definition: Pose3C.h:54
Matrix maps the near and far planes to unsigned Z values (in the range [0, 1])
Definition: MatrixConventionsC.h:119
OSVR_ProjectionMatrixInputFlags
Flag bit to indicate coordinate system input to projection matrix.
Definition: MatrixConventionsC.h:102
OSVR_ProjectionMatrixZFlags
Flag bit to indicate the desired post-projection Z value convention.
Definition: MatrixConventionsC.h:113
Matrix maps the near and far planes to signed Z values (in the range [-1, 1]) (default) ...
Definition: MatrixConventionsC.h:116
OSVR_MatrixVectorFlags
Flag bit controlling expected input to matrices.
Definition: MatrixConventionsC.h:94