Extract app runtime tail, canvas camera shell, and preview sample services
This commit is contained in:
40
src/legacy_canvas_camera_services.cpp
Normal file
40
src/legacy_canvas_camera_services.cpp
Normal file
@@ -0,0 +1,40 @@
|
||||
#include "pch.h"
|
||||
|
||||
#include "canvas.h"
|
||||
|
||||
#include "legacy_canvas_projection_services.h"
|
||||
#include "legacy_canvas_render_shell_services.h"
|
||||
|
||||
// return the 2d shape of the faces based on the current camera
|
||||
// this can be used for screen space shapes clipping
|
||||
std::vector<glm::vec2> Canvas::face_to_shape2D(int plane_index)
|
||||
{
|
||||
return pp::panopainter::legacy_canvas_face_to_shape_2d(*this, plane_index);
|
||||
}
|
||||
|
||||
void Canvas::push_camera()
|
||||
{
|
||||
pp::panopainter::legacy_canvas_push_camera(*this);
|
||||
}
|
||||
|
||||
void Canvas::pop_camera()
|
||||
{
|
||||
pp::panopainter::legacy_canvas_pop_camera(*this);
|
||||
}
|
||||
|
||||
CameraData Canvas::get_camera()
|
||||
{
|
||||
return pp::panopainter::legacy_canvas_render_shell_get_camera(*this);
|
||||
}
|
||||
|
||||
void Canvas::set_camera(const CameraData& c)
|
||||
{
|
||||
pp::panopainter::legacy_canvas_render_shell_set_camera(*this, c);
|
||||
}
|
||||
|
||||
void Canvas::timelapse_reset_encoder() noexcept
|
||||
{
|
||||
m_encoder = std::make_unique<MP4Encoder>();
|
||||
int res = glm::min<int>(m_width / 2, 1024);
|
||||
m_encoder->init(res * 4, res * 2, 30, 2000 << 10);
|
||||
}
|
||||
Reference in New Issue
Block a user