hmd orient, vr ui

This commit is contained in:
2018-10-28 22:25:15 +01:00
parent 0fff9f2010
commit b366d6b61f
11 changed files with 145 additions and 16 deletions

View File

@@ -1,7 +1,6 @@
#include "pch.h"
#include "log.h"
#include "brush.h"
#include "canvas.h"
void ui::BrushMesh::draw(const std::vector<StrokeSample>& samples, const glm::mat4& proj)
{
@@ -240,7 +239,7 @@ void ui::Stroke::start(const ui::Brush& brush)
m_last_kp = 0;
m_dist = 0.f;
m_brush = brush;
m_brush.m_tip_size *= 1.f / glm::tan(glm::radians(Canvas::I->m_cam_fov * 0.5f));
m_brush.m_tip_size *= 1.f / glm::tan(glm::radians(m_camera.fov * 0.5f));
m_step = glm::max(m_brush.m_tip_spacing * m_brush.m_tip_size * 800.f, 1.f);
prng.seed(0);
}