40 lines
739 B
C
40 lines
739 B
C
//
|
|
// Created by martin on 19.10.21.
|
|
//
|
|
|
|
#ifndef RBDLSIM_RENDER_UTILS_H
|
|
#define RBDLSIM_RENDER_UTILS_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include "vectorial/simd4x4f.h"
|
|
|
|
typedef struct {
|
|
simd4x4f mtxView;
|
|
float heading;
|
|
float pitch;
|
|
float vel[3];
|
|
float pos[3];
|
|
float forward[3];
|
|
float right[3];
|
|
float up[3];
|
|
} CameraState;
|
|
|
|
void CameraState_Init(CameraState* camera_state);
|
|
void CameraState_CalcFromMatrix(CameraState* camera_state, simd4x4f* mtx);
|
|
void CameraState_CalcToMatrix(CameraState* camera_state, simd4x4f* mtx);
|
|
void CameraState_Update(
|
|
CameraState* camera_state,
|
|
float dt,
|
|
float mouse_dx,
|
|
float mouse_dy,
|
|
float accel[3]);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif //RBDLSIM_RENDER_UTILS_H
|