mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 15:44:12 -06:00
Camera data moved to c++ - WIP
This commit is contained in:
parent
32063cbe23
commit
1fd59144c7
8 changed files with 190 additions and 50 deletions
|
@ -18,6 +18,20 @@ GLCanvas3D::Camera::Camera()
|
|||
{
|
||||
}
|
||||
|
||||
std::string GLCanvas3D::Camera::get_type_as_string() const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
default:
|
||||
case CT_Unknown:
|
||||
return "unknown";
|
||||
case CT_Perspective:
|
||||
return "perspective";
|
||||
case CT_Ortho:
|
||||
return "ortho";
|
||||
};
|
||||
}
|
||||
|
||||
GLCanvas3D::GLCanvas3D(wxGLCanvas* canvas, wxGLContext* context)
|
||||
: m_canvas(canvas)
|
||||
, m_context(context)
|
||||
|
@ -56,6 +70,11 @@ void GLCanvas3D::set_camera_type(GLCanvas3D::Camera::EType type)
|
|||
m_camera.type = type;
|
||||
}
|
||||
|
||||
std::string GLCanvas3D::get_camera_type_as_string() const
|
||||
{
|
||||
return m_camera.get_type_as_string();
|
||||
}
|
||||
|
||||
float GLCanvas3D::get_camera_zoom() const
|
||||
{
|
||||
return m_camera.zoom;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue