OSVR-Core  0.6-1962-g59773924
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
MatrixConventionsC.h File Reference

Header. More...

#include <osvr/Util/Export.h>
#include <osvr/Util/APIBaseC.h>
#include <osvr/Util/StdInt.h>
#include <osvr/Util/Pose3C.h>
#include <osvr/Util/ReturnCodesC.h>

Go to the source code of this file.

Typedefs

typedef uint16_t OSVR_MatrixConventions
 Type for passing matrix convention flags.
 
typedef enum
OSVR_MatrixOrderingFlags 
OSVR_MatrixOrderingFlags
 Flag bit controlling output memory order.
 
typedef enum OSVR_MatrixVectorFlags OSVR_MatrixVectorFlags
 Flag bit controlling expected input to matrices. (Related to OSVR_MatrixOrderingFlags - setting one to non-default results in an output change, but setting both to non-default results in effectively no change in the output. If this blows your mind, just ignore this aside and carry on.)
 
typedef enum
OSVR_ProjectionMatrixInputFlags 
OSVR_ProjectionMatrixInputFlags
 Flag bit to indicate coordinate system input to projection matrix.
 
typedef enum
OSVR_ProjectionMatrixZFlags 
OSVR_ProjectionMatrixZFlags
 Flag bit to indicate the desired post-projection Z value convention.
 

Enumerations

enum  OSVR_MatrixOrderingFlags { OSVR_MATRIX_COLMAJOR = 0x0, OSVR_MATRIX_ROWMAJOR = OSVR_MATRIX_MASK_ROWMAJOR }
 Flag bit controlling output memory order. More...
 
enum  OSVR_MatrixVectorFlags { OSVR_MATRIX_COLVECTORS = 0x0, OSVR_MATRIX_ROWVECTORS = OSVR_MATRIX_MASK_ROWVECTORS }
 Flag bit controlling expected input to matrices. (Related to OSVR_MatrixOrderingFlags - setting one to non-default results in an output change, but setting both to non-default results in effectively no change in the output. If this blows your mind, just ignore this aside and carry on.) More...
 
enum  OSVR_ProjectionMatrixInputFlags { OSVR_MATRIX_RHINPUT = 0x0, OSVR_MATRIX_LHINPUT = OSVR_MATRIX_MASK_LHINPUT }
 Flag bit to indicate coordinate system input to projection matrix. More...
 
enum  OSVR_ProjectionMatrixZFlags { OSVR_MATRIX_SIGNEDZ = 0x0, OSVR_MATRIX_UNSIGNEDZ = OSVR_MATRIX_MASK_UNSIGNEDZ }
 Flag bit to indicate the desired post-projection Z value convention. More...
 
enum  { OSVR_MATRIX_SIZE = 16 }
 

Functions

OSVR_ReturnCode osvrPose3ToMatrixd (OSVR_Pose3 const *pose, OSVR_MatrixConventions flags, double *mat)
 Set a matrix of doubles based on a Pose3. More...
 
OSVR_ReturnCode osvrPose3ToMatrixf (OSVR_Pose3 const *pose, OSVR_MatrixConventions flags, float *mat)
 Set a matrix of floats based on a Pose3. More...
 
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)
 
OSVR_ReturnCode osvrPose3ToMatrix (OSVR_Pose3 const *pose, OSVR_MatrixConventions flags, float *mat)
 Set a matrix based on a Pose3. (C++-only overload - detecting scalar type)
 
template<typename Scalar >
OSVR_ReturnCode osvrPose3ToMatrix (OSVR_Pose3 const *pose, OSVR_MatrixConventions flags, Scalar mat[OSVR_MATRIX_SIZE])
 Set a matrix based on a Pose3. (C++-only overload - detects scalar and takes array rather than pointer)
 
template<typename Scalar >
OSVR_ReturnCode osvrPose3ToMatrix (OSVR_Pose3 const &pose, OSVR_MatrixConventions flags, Scalar mat[OSVR_MATRIX_SIZE])
 Set a matrix based on a Pose3. (C++-only overload - detects scalar, takes array, takes pose by reference)
 

Detailed Description

Header.

Must be c-safe!

Date
2015
Author
Sensics, Inc. http://sensics.com/osvr

Definition in file MatrixConventionsC.h.

Enumeration Type Documentation

anonymous enum
Enumerator
OSVR_MATRIX_SIZE 

Constant for the number of elements in the matrices we use - 4x4.

Definition at line 123 of file MatrixConventionsC.h.