mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-14 05:42:13 +08:00
43025c2836
* Refactor Driver Monitor Updating and Rendering add comments * rebase master * rename dmon to driver_monitoring old-commit-hash: af80a13716f2ba40b6652ab188d1881385b6aa71
25 lines
552 B
C++
25 lines
552 B
C++
#pragma once
|
|
|
|
#include <vector>
|
|
#include <QPainter>
|
|
#include "selfdrive/ui/ui.h"
|
|
|
|
class DriverMonitorRenderer {
|
|
public:
|
|
DriverMonitorRenderer();
|
|
void updateState(const UIState &s);
|
|
void draw(QPainter &painter, const QRect &surface_rect);
|
|
|
|
private:
|
|
float driver_pose_vals[3] = {};
|
|
float driver_pose_diff[3] = {};
|
|
float driver_pose_sins[3] = {};
|
|
float driver_pose_coss[3] = {};
|
|
bool is_visible = false;
|
|
bool is_active = false;
|
|
bool is_rhd = false;
|
|
float dm_fade_state = 1.0;
|
|
QPixmap dm_img;
|
|
std::vector<vec3> face_kpts_draw;
|
|
};
|