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
60 typedef enum OSVR_MatrixMasks {
61 OSVR_MATRIX_MASK_ROWMAJOR = 0x1,
62 OSVR_MATRIX_MASK_ROWVECTORS = 0x2,
63 OSVR_MATRIX_MASK_LHINPUT = 0x4,
64 OSVR_MATRIX_MASK_UNSIGNEDZ = 0x8
171 template <
typename Scalar>
179 template <
typename Scalar>
Header declaring a type and values for simple C return codes.
Matrix takes vectors from a left-handed coordinate system.
Constant for the number of elements in the matrices we use - 4x4.
Header wrapping the C99 standard stdint header.
OSVR_ReturnCode osvrPose3ToMatrixd(OSVR_Pose3 const *pose, OSVR_MatrixConventions flags, double *mat)
Set a matrix of doubles based on a Pose3.
Matrix transforms column vectors (default)
Column-major memory order (default)
uint16_t OSVR_MatrixConventions
Type for passing matrix convention flags.
OSVR_MatrixOrderingFlags
Flag bit controlling output memory order.
Matrix transforms row vectors.
Header providing basic C macros for defining API headers.
OSVR_ReturnCode osvrPose3ToMatrixf(OSVR_Pose3 const *pose, OSVR_MatrixConventions flags, float *mat)
Set a matrix of floats based on a Pose3.
OSVR_EXTERN_C_END OSVR_ReturnCode osvrPose3ToMatrix(OSVR_Pose3 const *pose, OSVR_MatrixConventions flags, double *mat)
Set a matrix based on a Pose3. (C++-only overload - detecting scalar type)
Matrix takes vectors from a right-handed coordinate system (default)
A structure defining a 3D (6DOF) rigid body pose: translation and rotation.
Matrix maps the near and far planes to unsigned Z values (in the range [0, 1])
OSVR_ProjectionMatrixInputFlags
Flag bit to indicate coordinate system input to projection matrix.
OSVR_ProjectionMatrixZFlags
Flag bit to indicate the desired post-projection Z value convention.
Matrix maps the near and far planes to signed Z values (in the range [-1, 1]) (default) ...
double Scalar
Common scalar type.
OSVR_MatrixVectorFlags
Flag bit controlling expected input to matrices. (Related to OSVR_MatrixOrderingFlags - setting one t...