Refactoring and cleanup
This commit is contained in:
parent
2bccb43122
commit
364134515b
@ -34,7 +34,7 @@ use Slic3r::Geometry qw(PI);
|
||||
# volumes: reference to vector of Slic3r::GUI::3DScene::Volume.
|
||||
# _camera_type: 'perspective' or 'ortho'
|
||||
#==============================================================================================================================
|
||||
__PACKAGE__->mk_accessors( qw(_quat init
|
||||
__PACKAGE__->mk_accessors( qw(init
|
||||
on_viewport_changed
|
||||
on_select
|
||||
volumes
|
||||
@ -160,9 +160,7 @@ sub new {
|
||||
#
|
||||
# $self->{can_multisample} = $can_multisample;
|
||||
# $self->background(1);
|
||||
#==============================================================================================================================
|
||||
$self->_quat((0, 0, 0, 1));
|
||||
#==============================================================================================================================
|
||||
# $self->_quat((0, 0, 0, 1));
|
||||
# $self->_stheta(45);
|
||||
# $self->_sphi(45);
|
||||
# $self->_zoom(1);
|
||||
@ -268,7 +266,6 @@ sub new {
|
||||
sub Destroy {
|
||||
my ($self) = @_;
|
||||
#==============================================================================================================================
|
||||
Slic3r::GUI::_3DScene::stop_timer($self);
|
||||
# $self->{layer_height_edit_timer}->Stop;
|
||||
#==============================================================================================================================
|
||||
$self->DestroyGL;
|
||||
|
@ -56,13 +56,6 @@ sub new {
|
||||
# $self->on_move(sub {
|
||||
#==============================================================================================================================
|
||||
my @volume_idxs = @_;
|
||||
|
||||
|
||||
#==============================================================================================================================
|
||||
print "cucu";
|
||||
#==============================================================================================================================
|
||||
|
||||
|
||||
my %done = (); # prevent moving instances twice
|
||||
my $object_moved;
|
||||
my $wipe_tower_moved;
|
||||
|
@ -1757,31 +1757,11 @@ bool _3DScene::init(wxGLCanvas* canvas, bool useVBOs)
|
||||
return s_canvas_mgr.init(canvas, useVBOs);
|
||||
}
|
||||
|
||||
bool _3DScene::is_dirty(wxGLCanvas* canvas)
|
||||
{
|
||||
return s_canvas_mgr.is_dirty(canvas);
|
||||
}
|
||||
|
||||
void _3DScene::set_dirty(wxGLCanvas* canvas, bool dirty)
|
||||
{
|
||||
s_canvas_mgr.set_dirty(canvas, dirty);
|
||||
}
|
||||
|
||||
bool _3DScene::is_shown_on_screen(wxGLCanvas* canvas)
|
||||
{
|
||||
return s_canvas_mgr.is_shown_on_screen(canvas);
|
||||
}
|
||||
|
||||
void _3DScene::resize(wxGLCanvas* canvas, unsigned int w, unsigned int h)
|
||||
{
|
||||
s_canvas_mgr.resize(canvas, w, h);
|
||||
}
|
||||
|
||||
GLVolumeCollection* _3DScene::get_volumes(wxGLCanvas* canvas)
|
||||
{
|
||||
return s_canvas_mgr.get_volumes(canvas);
|
||||
}
|
||||
|
||||
void _3DScene::set_volumes(wxGLCanvas* canvas, GLVolumeCollection* volumes)
|
||||
{
|
||||
s_canvas_mgr.set_volumes(canvas, volumes);
|
||||
@ -1822,37 +1802,11 @@ void _3DScene::set_auto_bed_shape(wxGLCanvas* canvas)
|
||||
return s_canvas_mgr.set_auto_bed_shape(canvas);
|
||||
}
|
||||
|
||||
BoundingBoxf3 _3DScene::get_bed_bounding_box(wxGLCanvas* canvas)
|
||||
{
|
||||
return s_canvas_mgr.get_bed_bounding_box(canvas);
|
||||
}
|
||||
|
||||
BoundingBoxf3 _3DScene::get_volumes_bounding_box(wxGLCanvas* canvas)
|
||||
{
|
||||
return s_canvas_mgr.get_volumes_bounding_box(canvas);
|
||||
}
|
||||
|
||||
BoundingBoxf3 _3DScene::get_max_bounding_box(wxGLCanvas* canvas)
|
||||
{
|
||||
return s_canvas_mgr.get_max_bounding_box(canvas);
|
||||
}
|
||||
|
||||
Pointf3 _3DScene::get_axes_origin(wxGLCanvas* canvas)
|
||||
{
|
||||
return s_canvas_mgr.get_axes_origin(canvas);
|
||||
}
|
||||
|
||||
void _3DScene::set_axes_origin(wxGLCanvas* canvas, const Pointf3* origin)
|
||||
{
|
||||
if (origin != nullptr)
|
||||
s_canvas_mgr.set_axes_origin(canvas, *origin);
|
||||
}
|
||||
|
||||
float _3DScene::get_axes_length(wxGLCanvas* canvas)
|
||||
{
|
||||
return s_canvas_mgr.get_axes_length(canvas);
|
||||
}
|
||||
|
||||
void _3DScene::set_axes_length(wxGLCanvas* canvas, float length)
|
||||
{
|
||||
s_canvas_mgr.set_axes_length(canvas, length);
|
||||
@ -1863,97 +1817,16 @@ void _3DScene::set_cutting_plane(wxGLCanvas* canvas, float z, const ExPolygons&
|
||||
return s_canvas_mgr.set_cutting_plane(canvas, z, polygons);
|
||||
}
|
||||
|
||||
unsigned int _3DScene::get_camera_type(wxGLCanvas* canvas)
|
||||
{
|
||||
return s_canvas_mgr.get_camera_type(canvas);
|
||||
}
|
||||
|
||||
void _3DScene::set_camera_type(wxGLCanvas* canvas, unsigned int type)
|
||||
{
|
||||
s_canvas_mgr.set_camera_type(canvas, type);
|
||||
}
|
||||
|
||||
std::string _3DScene::get_camera_type_as_string(wxGLCanvas* canvas)
|
||||
{
|
||||
return s_canvas_mgr.get_camera_type_as_string(canvas);
|
||||
}
|
||||
|
||||
float _3DScene::get_camera_zoom(wxGLCanvas* canvas)
|
||||
{
|
||||
return s_canvas_mgr.get_camera_zoom(canvas);
|
||||
}
|
||||
|
||||
void _3DScene::set_camera_zoom(wxGLCanvas* canvas, float zoom)
|
||||
{
|
||||
s_canvas_mgr.set_camera_zoom(canvas, zoom);
|
||||
}
|
||||
|
||||
float _3DScene::get_camera_phi(wxGLCanvas* canvas)
|
||||
{
|
||||
return s_canvas_mgr.get_camera_phi(canvas);
|
||||
}
|
||||
|
||||
void _3DScene::set_camera_phi(wxGLCanvas* canvas, float phi)
|
||||
{
|
||||
s_canvas_mgr.set_camera_phi(canvas, phi);
|
||||
}
|
||||
|
||||
float _3DScene::get_camera_theta(wxGLCanvas* canvas)
|
||||
{
|
||||
return s_canvas_mgr.get_camera_theta(canvas);
|
||||
}
|
||||
|
||||
void _3DScene::set_camera_theta(wxGLCanvas* canvas, float theta)
|
||||
{
|
||||
s_canvas_mgr.set_camera_theta(canvas, theta);
|
||||
}
|
||||
|
||||
float _3DScene::get_camera_distance(wxGLCanvas* canvas)
|
||||
{
|
||||
return s_canvas_mgr.get_camera_distance(canvas);
|
||||
}
|
||||
|
||||
void _3DScene::set_camera_distance(wxGLCanvas* canvas, float distance)
|
||||
{
|
||||
s_canvas_mgr.set_camera_distance(canvas, distance);
|
||||
}
|
||||
|
||||
Pointf3 _3DScene::get_camera_target(wxGLCanvas* canvas)
|
||||
{
|
||||
return s_canvas_mgr.get_camera_target(canvas);
|
||||
}
|
||||
|
||||
void _3DScene::set_camera_target(wxGLCanvas* canvas, const Pointf3* target)
|
||||
{
|
||||
if (target != nullptr)
|
||||
s_canvas_mgr.set_camera_target(canvas, *target);
|
||||
}
|
||||
|
||||
bool _3DScene::is_layers_editing_enabled(wxGLCanvas* canvas)
|
||||
{
|
||||
return s_canvas_mgr.is_layers_editing_enabled(canvas);
|
||||
}
|
||||
|
||||
bool _3DScene::is_picking_enabled(wxGLCanvas* canvas)
|
||||
{
|
||||
return s_canvas_mgr.is_picking_enabled(canvas);
|
||||
}
|
||||
|
||||
bool _3DScene::is_moving_enabled(wxGLCanvas* canvas)
|
||||
{
|
||||
return s_canvas_mgr.is_moving_enabled(canvas);
|
||||
}
|
||||
|
||||
bool _3DScene::is_layers_editing_allowed(wxGLCanvas* canvas)
|
||||
{
|
||||
return s_canvas_mgr.is_layers_editing_allowed(canvas);
|
||||
}
|
||||
|
||||
bool _3DScene::is_multisample_allowed(wxGLCanvas* canvas)
|
||||
{
|
||||
return s_canvas_mgr.is_multisample_allowed(canvas);
|
||||
}
|
||||
|
||||
void _3DScene::enable_layers_editing(wxGLCanvas* canvas, bool enable)
|
||||
{
|
||||
s_canvas_mgr.enable_layers_editing(canvas, enable);
|
||||
@ -1989,116 +1862,6 @@ void _3DScene::allow_multisample(wxGLCanvas* canvas, bool allow)
|
||||
s_canvas_mgr.allow_multisample(canvas, allow);
|
||||
}
|
||||
|
||||
bool _3DScene::is_mouse_dragging(wxGLCanvas* canvas)
|
||||
{
|
||||
return s_canvas_mgr.is_mouse_dragging(canvas);
|
||||
}
|
||||
|
||||
void _3DScene::set_mouse_dragging(wxGLCanvas* canvas, bool dragging)
|
||||
{
|
||||
s_canvas_mgr.set_mouse_dragging(canvas, dragging);
|
||||
}
|
||||
|
||||
int _3DScene::get_hover_volume_id(wxGLCanvas* canvas)
|
||||
{
|
||||
return s_canvas_mgr.get_hover_volume_id(canvas);
|
||||
}
|
||||
|
||||
void _3DScene::set_hover_volume_id(wxGLCanvas* canvas, int id)
|
||||
{
|
||||
s_canvas_mgr.set_hover_volume_id(canvas, id);
|
||||
}
|
||||
|
||||
unsigned int _3DScene::get_layers_editing_z_texture_id(wxGLCanvas* canvas)
|
||||
{
|
||||
return s_canvas_mgr.get_layers_editing_z_texture_id(canvas);
|
||||
}
|
||||
|
||||
unsigned int _3DScene::get_layers_editing_state(wxGLCanvas* canvas)
|
||||
{
|
||||
return s_canvas_mgr.get_layers_editing_state(canvas);
|
||||
}
|
||||
|
||||
void _3DScene::set_layers_editing_state(wxGLCanvas* canvas, unsigned int state)
|
||||
{
|
||||
s_canvas_mgr.set_layers_editing_state(canvas, state);
|
||||
}
|
||||
|
||||
float _3DScene::get_layers_editing_band_width(wxGLCanvas* canvas)
|
||||
{
|
||||
return s_canvas_mgr.get_layers_editing_band_width(canvas);
|
||||
}
|
||||
|
||||
void _3DScene::set_layers_editing_band_width(wxGLCanvas* canvas, float band_width)
|
||||
{
|
||||
s_canvas_mgr.set_layers_editing_band_width(canvas, band_width);
|
||||
}
|
||||
|
||||
float _3DScene::get_layers_editing_strength(wxGLCanvas* canvas)
|
||||
{
|
||||
return s_canvas_mgr.get_layers_editing_strength(canvas);
|
||||
}
|
||||
|
||||
void _3DScene::set_layers_editing_strength(wxGLCanvas* canvas, float strength)
|
||||
{
|
||||
s_canvas_mgr.set_layers_editing_strength(canvas, strength);
|
||||
}
|
||||
|
||||
int _3DScene::get_layers_editing_last_object_id(wxGLCanvas* canvas)
|
||||
{
|
||||
return s_canvas_mgr.get_layers_editing_last_object_id(canvas);
|
||||
}
|
||||
|
||||
void _3DScene::set_layers_editing_last_object_id(wxGLCanvas* canvas, int id)
|
||||
{
|
||||
s_canvas_mgr.set_layers_editing_last_object_id(canvas, id);
|
||||
}
|
||||
|
||||
float _3DScene::get_layers_editing_last_z(wxGLCanvas* canvas)
|
||||
{
|
||||
return s_canvas_mgr.get_layers_editing_last_z(canvas);
|
||||
}
|
||||
|
||||
void _3DScene::set_layers_editing_last_z(wxGLCanvas* canvas, float z)
|
||||
{
|
||||
s_canvas_mgr.set_layers_editing_last_z(canvas, z);
|
||||
}
|
||||
|
||||
unsigned int _3DScene::get_layers_editing_last_action(wxGLCanvas* canvas)
|
||||
{
|
||||
return s_canvas_mgr.get_layers_editing_last_action(canvas);
|
||||
}
|
||||
|
||||
void _3DScene::set_layers_editing_last_action(wxGLCanvas* canvas, unsigned int action)
|
||||
{
|
||||
s_canvas_mgr.set_layers_editing_last_action(canvas, action);
|
||||
}
|
||||
|
||||
const GLShader* _3DScene::get_layers_editing_shader(wxGLCanvas* canvas)
|
||||
{
|
||||
return s_canvas_mgr.get_layers_editing_shader(canvas);
|
||||
}
|
||||
|
||||
float _3DScene::get_layers_editing_cursor_z_relative(wxGLCanvas* canvas)
|
||||
{
|
||||
return s_canvas_mgr.get_layers_editing_cursor_z_relative(canvas);
|
||||
}
|
||||
|
||||
int _3DScene::get_layers_editing_first_selected_object_id(wxGLCanvas* canvas, unsigned int objects_count)
|
||||
{
|
||||
return s_canvas_mgr.get_layers_editing_first_selected_object_id(canvas, objects_count);
|
||||
}
|
||||
|
||||
bool _3DScene::bar_rect_contains(wxGLCanvas* canvas, float x, float y)
|
||||
{
|
||||
return s_canvas_mgr.bar_rect_contains(canvas, x, y);
|
||||
}
|
||||
|
||||
bool _3DScene::reset_rect_contains(wxGLCanvas* canvas, float x, float y)
|
||||
{
|
||||
return s_canvas_mgr.reset_rect_contains(canvas, x, y);
|
||||
}
|
||||
|
||||
void _3DScene::zoom_to_bed(wxGLCanvas* canvas)
|
||||
{
|
||||
s_canvas_mgr.zoom_to_bed(canvas);
|
||||
@ -2124,46 +1887,11 @@ void _3DScene::update_volumes_colors_by_extruder(wxGLCanvas* canvas)
|
||||
s_canvas_mgr.update_volumes_colors_by_extruder(canvas);
|
||||
}
|
||||
|
||||
bool _3DScene::start_using_shader(wxGLCanvas* canvas)
|
||||
{
|
||||
return s_canvas_mgr.start_using_shader(canvas);
|
||||
}
|
||||
|
||||
void _3DScene::stop_using_shader(wxGLCanvas* canvas)
|
||||
{
|
||||
s_canvas_mgr.stop_using_shader(canvas);
|
||||
}
|
||||
|
||||
void _3DScene::render(wxGLCanvas* canvas)
|
||||
{
|
||||
s_canvas_mgr.render(canvas);
|
||||
}
|
||||
|
||||
void _3DScene::render_volumes(wxGLCanvas* canvas, bool fake_colors)
|
||||
{
|
||||
s_canvas_mgr.render_volumes(canvas, fake_colors);
|
||||
}
|
||||
|
||||
void _3DScene::render_texture(wxGLCanvas* canvas, unsigned int tex_id, float left, float right, float bottom, float top)
|
||||
{
|
||||
s_canvas_mgr.render_texture(canvas, tex_id, left, right, bottom, top);
|
||||
}
|
||||
|
||||
void _3DScene::start_timer(wxGLCanvas* canvas)
|
||||
{
|
||||
s_canvas_mgr.start_timer(canvas);
|
||||
}
|
||||
|
||||
void _3DScene::stop_timer(wxGLCanvas* canvas)
|
||||
{
|
||||
s_canvas_mgr.stop_timer(canvas);
|
||||
}
|
||||
|
||||
void _3DScene::perform_layer_editing_action(wxGLCanvas* canvas, int y, bool shift_down, bool right_down)
|
||||
{
|
||||
s_canvas_mgr.perform_layer_editing_action(canvas, y, shift_down, right_down);
|
||||
}
|
||||
|
||||
void _3DScene::register_on_viewport_changed_callback(wxGLCanvas* canvas, void* callback)
|
||||
{
|
||||
s_canvas_mgr.register_on_viewport_changed_callback(canvas, callback);
|
||||
|
@ -546,14 +546,8 @@ public:
|
||||
|
||||
static bool init(wxGLCanvas* canvas, bool useVBOs);
|
||||
|
||||
static bool is_dirty(wxGLCanvas* canvas);
|
||||
static void set_dirty(wxGLCanvas* canvas, bool dirty);
|
||||
|
||||
static bool is_shown_on_screen(wxGLCanvas* canvas);
|
||||
|
||||
static void resize(wxGLCanvas* canvas, unsigned int w, unsigned int h);
|
||||
|
||||
static GLVolumeCollection* get_volumes(wxGLCanvas* canvas);
|
||||
static void set_volumes(wxGLCanvas* canvas, GLVolumeCollection* volumes);
|
||||
static void reset_volumes(wxGLCanvas* canvas);
|
||||
static void deselect_volumes(wxGLCanvas* canvas);
|
||||
@ -565,42 +559,14 @@ public:
|
||||
static void set_bed_shape(wxGLCanvas* canvas, const Pointfs& shape);
|
||||
static void set_auto_bed_shape(wxGLCanvas* canvas);
|
||||
|
||||
static BoundingBoxf3 get_bed_bounding_box(wxGLCanvas* canvas);
|
||||
static BoundingBoxf3 get_volumes_bounding_box(wxGLCanvas* canvas);
|
||||
static BoundingBoxf3 get_max_bounding_box(wxGLCanvas* canvas);
|
||||
|
||||
static Pointf3 get_axes_origin(wxGLCanvas* canvas);
|
||||
static void set_axes_origin(wxGLCanvas* canvas, const Pointf3* origin);
|
||||
|
||||
static float get_axes_length(wxGLCanvas* canvas);
|
||||
static void set_axes_length(wxGLCanvas* canvas, float length);
|
||||
|
||||
static void set_cutting_plane(wxGLCanvas* canvas, float z, const ExPolygons& polygons);
|
||||
|
||||
static unsigned int get_camera_type(wxGLCanvas* canvas);
|
||||
static void set_camera_type(wxGLCanvas* canvas, unsigned int type);
|
||||
static std::string get_camera_type_as_string(wxGLCanvas* canvas);
|
||||
|
||||
static float get_camera_zoom(wxGLCanvas* canvas);
|
||||
static void set_camera_zoom(wxGLCanvas* canvas, float zoom);
|
||||
|
||||
static float get_camera_phi(wxGLCanvas* canvas);
|
||||
static void set_camera_phi(wxGLCanvas* canvas, float phi);
|
||||
|
||||
static float get_camera_theta(wxGLCanvas* canvas);
|
||||
static void set_camera_theta(wxGLCanvas* canvas, float theta);
|
||||
|
||||
static float get_camera_distance(wxGLCanvas* canvas);
|
||||
static void set_camera_distance(wxGLCanvas* canvas, float distance);
|
||||
|
||||
static Pointf3 get_camera_target(wxGLCanvas* canvas);
|
||||
static void set_camera_target(wxGLCanvas* canvas, const Pointf3* target);
|
||||
|
||||
static bool is_layers_editing_enabled(wxGLCanvas* canvas);
|
||||
static bool is_picking_enabled(wxGLCanvas* canvas);
|
||||
static bool is_moving_enabled(wxGLCanvas* canvas);
|
||||
static bool is_layers_editing_allowed(wxGLCanvas* canvas);
|
||||
static bool is_multisample_allowed(wxGLCanvas* canvas);
|
||||
|
||||
static void enable_layers_editing(wxGLCanvas* canvas, bool enable);
|
||||
static void enable_warning_texture(wxGLCanvas* canvas, bool enable);
|
||||
@ -610,39 +576,6 @@ public:
|
||||
static void enable_shader(wxGLCanvas* canvas, bool enable);
|
||||
static void allow_multisample(wxGLCanvas* canvas, bool allow);
|
||||
|
||||
static bool is_mouse_dragging(wxGLCanvas* canvas);
|
||||
static void set_mouse_dragging(wxGLCanvas* canvas, bool dragging);
|
||||
|
||||
static int get_hover_volume_id(wxGLCanvas* canvas);
|
||||
static void set_hover_volume_id(wxGLCanvas* canvas, int id);
|
||||
|
||||
static unsigned int get_layers_editing_z_texture_id(wxGLCanvas* canvas);
|
||||
|
||||
static unsigned int get_layers_editing_state(wxGLCanvas* canvas);
|
||||
static void set_layers_editing_state(wxGLCanvas* canvas, unsigned int state);
|
||||
|
||||
static float get_layers_editing_band_width(wxGLCanvas* canvas);
|
||||
static void set_layers_editing_band_width(wxGLCanvas* canvas, float band_width);
|
||||
|
||||
static float get_layers_editing_strength(wxGLCanvas* canvas);
|
||||
static void set_layers_editing_strength(wxGLCanvas* canvas, float strength);
|
||||
|
||||
static int get_layers_editing_last_object_id(wxGLCanvas* canvas);
|
||||
static void set_layers_editing_last_object_id(wxGLCanvas* canvas, int id);
|
||||
|
||||
static float get_layers_editing_last_z(wxGLCanvas* canvas);
|
||||
static void set_layers_editing_last_z(wxGLCanvas* canvas, float z);
|
||||
|
||||
static unsigned int get_layers_editing_last_action(wxGLCanvas* canvas);
|
||||
static void set_layers_editing_last_action(wxGLCanvas* canvas, unsigned int action);
|
||||
|
||||
static const GLShader* get_layers_editing_shader(wxGLCanvas* canvas);
|
||||
|
||||
static float get_layers_editing_cursor_z_relative(wxGLCanvas* canvas);
|
||||
static int get_layers_editing_first_selected_object_id(wxGLCanvas* canvas, unsigned int objects_count);
|
||||
static bool bar_rect_contains(wxGLCanvas* canvas, float x, float y);
|
||||
static bool reset_rect_contains(wxGLCanvas* canvas, float x, float y);
|
||||
|
||||
static void zoom_to_bed(wxGLCanvas* canvas);
|
||||
static void zoom_to_volumes(wxGLCanvas* canvas);
|
||||
static void select_view(wxGLCanvas* canvas, const std::string& direction);
|
||||
@ -650,16 +583,7 @@ public:
|
||||
|
||||
static void update_volumes_colors_by_extruder(wxGLCanvas* canvas);
|
||||
|
||||
static bool start_using_shader(wxGLCanvas* canvas);
|
||||
static void stop_using_shader(wxGLCanvas* canvas);
|
||||
|
||||
static void render(wxGLCanvas* canvas);
|
||||
static void render_volumes(wxGLCanvas* canvas, bool fake_colors);
|
||||
static void render_texture(wxGLCanvas* canvas, unsigned int tex_id, float left, float right, float bottom, float top);
|
||||
|
||||
static void start_timer(wxGLCanvas* canvas);
|
||||
static void stop_timer(wxGLCanvas* canvas);
|
||||
static void perform_layer_editing_action(wxGLCanvas* canvas, int y, bool shift_down, bool right_down);
|
||||
|
||||
static void register_on_viewport_changed_callback(wxGLCanvas* canvas, void* callback);
|
||||
static void register_on_double_click_callback(wxGLCanvas* canvas, void* callback);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -81,46 +81,32 @@ public:
|
||||
class GLCanvas3D
|
||||
{
|
||||
public:
|
||||
class Camera
|
||||
struct Camera
|
||||
{
|
||||
public:
|
||||
enum EType : unsigned char
|
||||
{
|
||||
CT_Unknown,
|
||||
CT_Perspective,
|
||||
CT_Ortho,
|
||||
CT_Count
|
||||
Unknown,
|
||||
Perspective,
|
||||
Ortho,
|
||||
Num_types
|
||||
};
|
||||
|
||||
EType type;
|
||||
float zoom;
|
||||
float phi;
|
||||
float distance;
|
||||
Pointf3 target;
|
||||
|
||||
private:
|
||||
EType m_type;
|
||||
float m_zoom;
|
||||
float m_phi;
|
||||
float m_theta;
|
||||
float m_distance;
|
||||
Pointf3 m_target;
|
||||
|
||||
public:
|
||||
Camera();
|
||||
|
||||
Camera::EType get_type() const;
|
||||
void set_type(Camera::EType type);
|
||||
std::string get_type_as_string() const;
|
||||
|
||||
float get_zoom() const;
|
||||
void set_zoom(float zoom);
|
||||
|
||||
float get_phi() const;
|
||||
void set_phi(float phi);
|
||||
|
||||
float get_theta() const;
|
||||
void set_theta(float theta);
|
||||
|
||||
float get_distance() const;
|
||||
void set_distance(float distance);
|
||||
|
||||
const Pointf3& get_target() const;
|
||||
void set_target(const Pointf3& target);
|
||||
};
|
||||
|
||||
class Bed
|
||||
@ -147,20 +133,13 @@ public:
|
||||
void _calc_gridlines(const ExPolygon& poly, const BoundingBox& bed_bbox);
|
||||
};
|
||||
|
||||
class Axes
|
||||
struct Axes
|
||||
{
|
||||
Pointf3 m_origin;
|
||||
float m_length;
|
||||
Pointf3 origin;
|
||||
float length;
|
||||
|
||||
public:
|
||||
Axes();
|
||||
|
||||
const Pointf3& get_origin() const;
|
||||
void set_origin(const Pointf3& origin);
|
||||
|
||||
float get_length() const;
|
||||
void set_length(float length);
|
||||
|
||||
void render() const;
|
||||
};
|
||||
|
||||
@ -226,28 +205,26 @@ public:
|
||||
GLTextureData(unsigned int id, int width, int height);
|
||||
};
|
||||
|
||||
EState m_state;
|
||||
bool m_use_legacy_opengl;
|
||||
bool m_enabled;
|
||||
Shader m_shader;
|
||||
unsigned int m_z_texture_id;
|
||||
mutable GLTextureData m_tooltip_texture;
|
||||
mutable GLTextureData m_reset_texture;
|
||||
float m_band_width;
|
||||
float m_strength;
|
||||
int m_last_object_id;
|
||||
float m_last_z;
|
||||
unsigned int m_last_action;
|
||||
|
||||
public:
|
||||
EState state;
|
||||
float band_width;
|
||||
float strength;
|
||||
int last_object_id;
|
||||
float last_z;
|
||||
unsigned int last_action;
|
||||
|
||||
LayersEditing();
|
||||
~LayersEditing();
|
||||
|
||||
bool init(const std::string& vertex_shader_filename, const std::string& fragment_shader_filename);
|
||||
|
||||
EState get_state() const;
|
||||
void set_state(EState state);
|
||||
|
||||
bool is_allowed() const;
|
||||
void set_use_legacy_opengl(bool use_legacy_opengl);
|
||||
|
||||
@ -256,24 +233,9 @@ public:
|
||||
|
||||
unsigned int get_z_texture_id() const;
|
||||
|
||||
float get_band_width() const;
|
||||
void set_band_width(float band_width);
|
||||
|
||||
float get_strength() const;
|
||||
void set_strength(float strength);
|
||||
|
||||
int get_last_object_id() const;
|
||||
void set_last_object_id(int id);
|
||||
|
||||
float get_last_z() const;
|
||||
void set_last_z(float z);
|
||||
|
||||
unsigned int get_last_action() const;
|
||||
void set_last_action(unsigned int action);
|
||||
|
||||
void render(const GLCanvas3D& canvas, const PrintObject& print_object, const GLVolume& volume) const;
|
||||
|
||||
const GLShader* get_shader() const;
|
||||
int get_shader_program_id() const;
|
||||
|
||||
static float get_cursor_z_relative(const GLCanvas3D& canvas);
|
||||
static int get_first_selected_object_id(const GLVolumeCollection& volumes, unsigned int objects_count);
|
||||
@ -293,45 +255,33 @@ public:
|
||||
static GLTextureData _load_texture_from_file(const std::string& filename);
|
||||
};
|
||||
|
||||
class Mouse
|
||||
struct Mouse
|
||||
{
|
||||
bool m_dragging;
|
||||
Pointf m_position;
|
||||
|
||||
public:
|
||||
Mouse();
|
||||
|
||||
bool is_dragging() const;
|
||||
void set_dragging(bool dragging);
|
||||
|
||||
const Pointf& get_position() const;
|
||||
void set_position(const Pointf& position);
|
||||
};
|
||||
|
||||
class Drag
|
||||
struct Drag
|
||||
{
|
||||
Point m_start_position_2D;
|
||||
Pointf3 m_start_position_3D;
|
||||
Vectorf3 m_volume_center_offset;
|
||||
int m_volume_idx;
|
||||
static const Point Invalid_2D_Point;
|
||||
static const Pointf3 Invalid_3D_Point;
|
||||
|
||||
Point start_position_2D;
|
||||
Pointf3 start_position_3D;
|
||||
Vectorf3 volume_center_offset;
|
||||
int volume_idx;
|
||||
|
||||
public:
|
||||
Drag();
|
||||
};
|
||||
|
||||
const Point& get_start_position_2D() const;
|
||||
void set_start_position_2D(const Point& position);
|
||||
bool dragging;
|
||||
Pointf position;
|
||||
Drag drag;
|
||||
|
||||
const Pointf3& get_start_position_3D() const;
|
||||
void set_start_position_3D(const Pointf3& position);
|
||||
Mouse();
|
||||
|
||||
void set_start_position_2D_as_invalid();
|
||||
void set_start_position_3D_as_invalid();
|
||||
|
||||
bool is_start_position_2D_defined() const;
|
||||
bool is_start_position_3D_defined() const;
|
||||
|
||||
const Vectorf3& get_volume_center_offset() const;
|
||||
void set_volume_center_offset(const Vectorf3& offset);
|
||||
|
||||
int get_volume_idx() const;
|
||||
void set_volume_idx(int idx);
|
||||
};
|
||||
|
||||
private:
|
||||
@ -345,7 +295,6 @@ private:
|
||||
LayersEditing m_layers_editing;
|
||||
Shader m_shader;
|
||||
Mouse m_mouse;
|
||||
Drag m_drag;
|
||||
|
||||
GLVolumeCollection* m_volumes;
|
||||
DynamicPrintConfig* m_config;
|
||||
@ -376,14 +325,8 @@ public:
|
||||
|
||||
bool set_current();
|
||||
|
||||
bool is_dirty() const;
|
||||
void set_dirty(bool dirty);
|
||||
|
||||
bool is_shown_on_screen() const;
|
||||
|
||||
void resize(unsigned int w, unsigned int h);
|
||||
|
||||
GLVolumeCollection* get_volumes();
|
||||
void set_volumes(GLVolumeCollection* volumes);
|
||||
void reset_volumes();
|
||||
void deselect_volumes();
|
||||
@ -400,42 +343,16 @@ public:
|
||||
// Used by ObjectCutDialog and ObjectPartsPanel to generate a rectangular ground plane to support the scene objects.
|
||||
void set_auto_bed_shape();
|
||||
|
||||
const Pointf3& get_axes_origin() const;
|
||||
void set_axes_origin(const Pointf3& origin);
|
||||
|
||||
float get_axes_length() const;
|
||||
void set_axes_length(float length);
|
||||
|
||||
void set_cutting_plane(float z, const ExPolygons& polygons);
|
||||
|
||||
Camera::EType get_camera_type() const;
|
||||
void set_camera_type(Camera::EType type);
|
||||
std::string get_camera_type_as_string() const;
|
||||
|
||||
float get_camera_zoom() const;
|
||||
void set_camera_zoom(float zoom);
|
||||
|
||||
float get_camera_phi() const;
|
||||
void set_camera_phi(float phi);
|
||||
|
||||
float get_camera_theta() const;
|
||||
void set_camera_theta(float theta);
|
||||
|
||||
float get_camera_distance() const;
|
||||
void set_camera_distance(float distance);
|
||||
|
||||
const Pointf3& get_camera_target() const;
|
||||
void set_camera_target(const Pointf3& target);
|
||||
|
||||
BoundingBoxf3 bed_bounding_box() const;
|
||||
BoundingBoxf3 volumes_bounding_box() const;
|
||||
BoundingBoxf3 max_bounding_box() const;
|
||||
|
||||
bool is_layers_editing_enabled() const;
|
||||
bool is_picking_enabled() const;
|
||||
bool is_moving_enabled() const;
|
||||
bool is_layers_editing_allowed() const;
|
||||
bool is_multisample_allowed() const;
|
||||
|
||||
void enable_layers_editing(bool enable);
|
||||
void enable_warning_texture(bool enable);
|
||||
@ -445,42 +362,6 @@ public:
|
||||
void enable_shader(bool enable);
|
||||
void allow_multisample(bool allow);
|
||||
|
||||
bool is_mouse_dragging() const;
|
||||
void set_mouse_dragging(bool dragging);
|
||||
|
||||
const Pointf& get_mouse_position() const;
|
||||
void set_mouse_position(const Pointf& position);
|
||||
|
||||
int get_hover_volume_id() const;
|
||||
void set_hover_volume_id(int id);
|
||||
|
||||
unsigned int get_layers_editing_z_texture_id() const;
|
||||
|
||||
unsigned int get_layers_editing_state() const;
|
||||
void set_layers_editing_state(unsigned int state);
|
||||
|
||||
float get_layers_editing_band_width() const;
|
||||
void set_layers_editing_band_width(float band_width);
|
||||
|
||||
float get_layers_editing_strength() const;
|
||||
void set_layers_editing_strength(float strength);
|
||||
|
||||
int get_layers_editing_last_object_id() const;
|
||||
void set_layers_editing_last_object_id(int id);
|
||||
|
||||
float get_layers_editing_last_z() const;
|
||||
void set_layers_editing_last_z(float z);
|
||||
|
||||
unsigned int get_layers_editing_last_action() const;
|
||||
void set_layers_editing_last_action(unsigned int action);
|
||||
|
||||
const GLShader* get_layers_editing_shader() const;
|
||||
|
||||
float get_layers_editing_cursor_z_relative() const;
|
||||
int get_layers_editing_first_selected_object_id(unsigned int objects_count) const;
|
||||
bool bar_rect_contains(float x, float y) const;
|
||||
bool reset_rect_contains(float x, float y) const;
|
||||
|
||||
void zoom_to_bed();
|
||||
void zoom_to_volumes();
|
||||
void select_view(const std::string& direction);
|
||||
@ -488,11 +369,7 @@ public:
|
||||
|
||||
void update_volumes_colors_by_extruder();
|
||||
|
||||
bool start_using_shader() const;
|
||||
void stop_using_shader() const;
|
||||
|
||||
void render(bool useVBOs) const;
|
||||
void render_volumes(bool fake_colors) const;
|
||||
void render_texture(unsigned int tex_id, float left, float right, float bottom, float top) const;
|
||||
|
||||
void register_on_viewport_changed_callback(void* callback);
|
||||
@ -512,11 +389,11 @@ public:
|
||||
Size get_canvas_size() const;
|
||||
Point get_local_mouse_position() const;
|
||||
|
||||
void start_timer();
|
||||
void stop_timer();
|
||||
void perform_layer_editing_action(int y, bool shift_down, bool right_down);
|
||||
|
||||
private:
|
||||
void _resize(unsigned int w, unsigned int h);
|
||||
|
||||
BoundingBoxf3 _max_bounding_box() const;
|
||||
|
||||
void _zoom_to_bounding_box(const BoundingBoxf3& bbox);
|
||||
float _get_zoom_to_bounding_box_factor(const BoundingBoxf3& bbox) const;
|
||||
|
||||
@ -535,12 +412,21 @@ private:
|
||||
void _render_warning_texture() const;
|
||||
void _render_legend_texture() const;
|
||||
void _render_layer_editing_overlay() const;
|
||||
void _render_volumes(bool fake_colors) const;
|
||||
|
||||
float _get_layers_editing_cursor_z_relative() const;
|
||||
int _get_layers_editing_first_selected_object_id(unsigned int objects_count) const;
|
||||
void _perform_layer_editing_action(wxMouseEvent* evt = nullptr);
|
||||
|
||||
bool _bar_rect_contains(float x, float y) const;
|
||||
bool _reset_rect_contains(float x, float y) const;
|
||||
|
||||
// Convert the screen space coordinate to an object space coordinate.
|
||||
// If the Z screen space coordinate is not provided, a depth buffer value is substituted.
|
||||
Pointf3 _mouse_to_3d(const Point& mouse_pos, float* z = nullptr);
|
||||
|
||||
void _start_timer();
|
||||
void _stop_timer();
|
||||
};
|
||||
|
||||
} // namespace GUI
|
||||
|
@ -158,38 +158,12 @@ bool GLCanvas3DManager::init(wxGLCanvas* canvas, bool useVBOs)
|
||||
return (it != m_canvases.end()) ? it->second->init(useVBOs, m_use_legacy_opengl) : false;
|
||||
}
|
||||
|
||||
bool GLCanvas3DManager::is_dirty(wxGLCanvas* canvas) const
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
return (it != m_canvases.end()) ? it->second->is_dirty() : false;
|
||||
}
|
||||
|
||||
void GLCanvas3DManager::set_dirty(wxGLCanvas* canvas, bool dirty)
|
||||
{
|
||||
CanvasesMap::iterator it = _get_canvas(canvas);
|
||||
if (it != m_canvases.end())
|
||||
it->second->set_dirty(dirty);
|
||||
}
|
||||
|
||||
bool GLCanvas3DManager::is_shown_on_screen(wxGLCanvas* canvas) const
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
return (it != m_canvases.end()) ? it->second->is_shown_on_screen() : false;
|
||||
}
|
||||
|
||||
void GLCanvas3DManager::resize(wxGLCanvas* canvas, unsigned int w, unsigned int h)
|
||||
{
|
||||
CanvasesMap::iterator it = _get_canvas(canvas);
|
||||
if (it != m_canvases.end())
|
||||
it->second->resize(w, h);
|
||||
}
|
||||
|
||||
GLVolumeCollection* GLCanvas3DManager::get_volumes(wxGLCanvas* canvas)
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
return (it != m_canvases.end()) ? it->second->get_volumes() : nullptr;
|
||||
}
|
||||
|
||||
void GLCanvas3DManager::set_volumes(wxGLCanvas* canvas, GLVolumeCollection* volumes)
|
||||
{
|
||||
CanvasesMap::iterator it = _get_canvas(canvas);
|
||||
@ -246,43 +220,12 @@ void GLCanvas3DManager::set_auto_bed_shape(wxGLCanvas* canvas)
|
||||
it->second->set_auto_bed_shape();
|
||||
}
|
||||
|
||||
BoundingBoxf3 GLCanvas3DManager::get_bed_bounding_box(wxGLCanvas* canvas)
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
return (it != m_canvases.end()) ? it->second->bed_bounding_box() : BoundingBoxf3();
|
||||
}
|
||||
|
||||
BoundingBoxf3 GLCanvas3DManager::get_volumes_bounding_box(wxGLCanvas* canvas)
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
return (it != m_canvases.end()) ? it->second->volumes_bounding_box() : BoundingBoxf3();
|
||||
}
|
||||
|
||||
BoundingBoxf3 GLCanvas3DManager::get_max_bounding_box(wxGLCanvas* canvas)
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
return (it != m_canvases.end()) ? it->second->max_bounding_box() : BoundingBoxf3();
|
||||
}
|
||||
|
||||
Pointf3 GLCanvas3DManager::get_axes_origin(wxGLCanvas* canvas) const
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
return (it != m_canvases.end()) ? it->second->get_axes_origin() : Pointf3();
|
||||
}
|
||||
|
||||
void GLCanvas3DManager::set_axes_origin(wxGLCanvas* canvas, const Pointf3& origin)
|
||||
{
|
||||
CanvasesMap::iterator it = _get_canvas(canvas);
|
||||
if (it != m_canvases.end())
|
||||
it->second->set_axes_origin(origin);
|
||||
}
|
||||
|
||||
float GLCanvas3DManager::get_axes_length(wxGLCanvas* canvas) const
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
return (it != m_canvases.end()) ? it->second->get_axes_length() : 0.0f;
|
||||
}
|
||||
|
||||
void GLCanvas3DManager::set_axes_length(wxGLCanvas* canvas, float length)
|
||||
{
|
||||
CanvasesMap::iterator it = _get_canvas(canvas);
|
||||
@ -297,123 +240,18 @@ void GLCanvas3DManager::set_cutting_plane(wxGLCanvas* canvas, float z, const ExP
|
||||
it->second->set_cutting_plane(z, polygons);
|
||||
}
|
||||
|
||||
unsigned int GLCanvas3DManager::get_camera_type(wxGLCanvas* canvas) const
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
return (it != m_canvases.end()) ? (unsigned int)it->second->get_camera_type() : 0;
|
||||
}
|
||||
|
||||
void GLCanvas3DManager::set_camera_type(wxGLCanvas* canvas, unsigned int type)
|
||||
{
|
||||
if ((type <= (unsigned int)GLCanvas3D::Camera::CT_Unknown) || ((unsigned int)GLCanvas3D::Camera::CT_Count <= type))
|
||||
return;
|
||||
|
||||
CanvasesMap::iterator it = _get_canvas(canvas);
|
||||
if (it != m_canvases.end())
|
||||
it->second->set_camera_type((GLCanvas3D::Camera::EType)type);
|
||||
}
|
||||
|
||||
std::string GLCanvas3DManager::get_camera_type_as_string(wxGLCanvas* canvas) const
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
return (it != m_canvases.end()) ? it->second->get_camera_type_as_string() : "unknown";
|
||||
}
|
||||
|
||||
float GLCanvas3DManager::get_camera_zoom(wxGLCanvas* canvas) const
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
return (it != m_canvases.end()) ? it->second->get_camera_zoom() : 1.0f;
|
||||
}
|
||||
|
||||
void GLCanvas3DManager::set_camera_zoom(wxGLCanvas* canvas, float zoom)
|
||||
{
|
||||
CanvasesMap::iterator it = _get_canvas(canvas);
|
||||
if (it != m_canvases.end())
|
||||
it->second->set_camera_zoom(zoom);
|
||||
}
|
||||
|
||||
float GLCanvas3DManager::get_camera_phi(wxGLCanvas* canvas) const
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
return (it != m_canvases.end()) ? it->second->get_camera_phi() : 0.0f;
|
||||
}
|
||||
|
||||
void GLCanvas3DManager::set_camera_phi(wxGLCanvas* canvas, float phi)
|
||||
{
|
||||
CanvasesMap::iterator it = _get_canvas(canvas);
|
||||
if (it != m_canvases.end())
|
||||
it->second->set_camera_phi(phi);
|
||||
}
|
||||
|
||||
float GLCanvas3DManager::get_camera_theta(wxGLCanvas* canvas) const
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
return (it != m_canvases.end()) ? it->second->get_camera_theta() : 0.0f;
|
||||
}
|
||||
|
||||
void GLCanvas3DManager::set_camera_theta(wxGLCanvas* canvas, float theta)
|
||||
{
|
||||
CanvasesMap::iterator it = _get_canvas(canvas);
|
||||
if (it != m_canvases.end())
|
||||
it->second->set_camera_theta(theta);
|
||||
}
|
||||
|
||||
float GLCanvas3DManager::get_camera_distance(wxGLCanvas* canvas) const
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
return (it != m_canvases.end()) ? it->second->get_camera_distance() : 0.0f;
|
||||
}
|
||||
|
||||
void GLCanvas3DManager::set_camera_distance(wxGLCanvas* canvas, float distance)
|
||||
{
|
||||
CanvasesMap::iterator it = _get_canvas(canvas);
|
||||
if (it != m_canvases.end())
|
||||
it->second->set_camera_distance(distance);
|
||||
}
|
||||
|
||||
Pointf3 GLCanvas3DManager::get_camera_target(wxGLCanvas* canvas) const
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
return (it != m_canvases.end()) ? it->second->get_camera_target() : Pointf3(0.0, 0.0, 0.0);
|
||||
}
|
||||
|
||||
void GLCanvas3DManager::set_camera_target(wxGLCanvas* canvas, const Pointf3& target)
|
||||
{
|
||||
CanvasesMap::iterator it = _get_canvas(canvas);
|
||||
if (it != m_canvases.end())
|
||||
it->second->set_camera_target(target);
|
||||
}
|
||||
|
||||
bool GLCanvas3DManager::is_layers_editing_enabled(wxGLCanvas* canvas) const
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
return (it != m_canvases.end()) ? it->second->is_layers_editing_enabled() : false;
|
||||
}
|
||||
|
||||
bool GLCanvas3DManager::is_picking_enabled(wxGLCanvas* canvas) const
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
return (it != m_canvases.end()) ? it->second->is_picking_enabled() : false;
|
||||
}
|
||||
|
||||
bool GLCanvas3DManager::is_moving_enabled(wxGLCanvas* canvas) const
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
return (it != m_canvases.end()) ? it->second->is_moving_enabled() : false;
|
||||
}
|
||||
|
||||
bool GLCanvas3DManager::is_layers_editing_allowed(wxGLCanvas* canvas) const
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
return (it != m_canvases.end()) ? it->second->is_layers_editing_allowed() : false;
|
||||
}
|
||||
|
||||
bool GLCanvas3DManager::is_multisample_allowed(wxGLCanvas* canvas) const
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
return (it != m_canvases.end()) ? it->second->is_multisample_allowed() : false;
|
||||
}
|
||||
|
||||
void GLCanvas3DManager::enable_layers_editing(wxGLCanvas* canvas, bool enable)
|
||||
{
|
||||
CanvasesMap::iterator it = _get_canvas(canvas);
|
||||
@ -463,146 +301,6 @@ void GLCanvas3DManager::allow_multisample(wxGLCanvas* canvas, bool allow)
|
||||
it->second->allow_multisample(allow);
|
||||
}
|
||||
|
||||
bool GLCanvas3DManager::is_mouse_dragging(wxGLCanvas* canvas) const
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
return (it != m_canvases.end()) ? it->second->is_mouse_dragging() : false;
|
||||
}
|
||||
|
||||
void GLCanvas3DManager::set_mouse_dragging(wxGLCanvas* canvas, bool dragging)
|
||||
{
|
||||
CanvasesMap::iterator it = _get_canvas(canvas);
|
||||
if (it != m_canvases.end())
|
||||
it->second->set_mouse_dragging(dragging);
|
||||
}
|
||||
|
||||
int GLCanvas3DManager::get_hover_volume_id(wxGLCanvas* canvas) const
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
return (it != m_canvases.end()) ? it->second->get_hover_volume_id() : -1;
|
||||
}
|
||||
|
||||
void GLCanvas3DManager::set_hover_volume_id(wxGLCanvas* canvas, int id)
|
||||
{
|
||||
CanvasesMap::iterator it = _get_canvas(canvas);
|
||||
if (it != m_canvases.end())
|
||||
it->second->set_hover_volume_id(id);
|
||||
}
|
||||
|
||||
unsigned int GLCanvas3DManager::get_layers_editing_z_texture_id(wxGLCanvas* canvas) const
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
return (it != m_canvases.end()) ? it->second->get_layers_editing_z_texture_id() : 0;
|
||||
}
|
||||
|
||||
unsigned int GLCanvas3DManager::get_layers_editing_state(wxGLCanvas* canvas) const
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
return (it != m_canvases.end()) ? it->second->get_layers_editing_state() : 0;
|
||||
}
|
||||
|
||||
void GLCanvas3DManager::set_layers_editing_state(wxGLCanvas* canvas, unsigned int state)
|
||||
{
|
||||
CanvasesMap::iterator it = _get_canvas(canvas);
|
||||
if (it != m_canvases.end())
|
||||
it->second->set_layers_editing_state(state);
|
||||
}
|
||||
|
||||
float GLCanvas3DManager::get_layers_editing_band_width(wxGLCanvas* canvas) const
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
return (it != m_canvases.end()) ? it->second->get_layers_editing_band_width() : 0.0f;
|
||||
}
|
||||
|
||||
void GLCanvas3DManager::set_layers_editing_band_width(wxGLCanvas* canvas, float band_width)
|
||||
{
|
||||
CanvasesMap::iterator it = _get_canvas(canvas);
|
||||
if (it != m_canvases.end())
|
||||
it->second->set_layers_editing_band_width(band_width);
|
||||
}
|
||||
|
||||
float GLCanvas3DManager::get_layers_editing_strength(wxGLCanvas* canvas) const
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
return (it != m_canvases.end()) ? it->second->get_layers_editing_strength() : 0.0f;
|
||||
}
|
||||
|
||||
void GLCanvas3DManager::set_layers_editing_strength(wxGLCanvas* canvas, float strength)
|
||||
{
|
||||
CanvasesMap::iterator it = _get_canvas(canvas);
|
||||
if (it != m_canvases.end())
|
||||
it->second->set_layers_editing_strength(strength);
|
||||
}
|
||||
|
||||
int GLCanvas3DManager::get_layers_editing_last_object_id(wxGLCanvas* canvas) const
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
return (it != m_canvases.end()) ? it->second->get_layers_editing_last_object_id() : -1;
|
||||
}
|
||||
|
||||
void GLCanvas3DManager::set_layers_editing_last_object_id(wxGLCanvas* canvas, int id)
|
||||
{
|
||||
CanvasesMap::iterator it = _get_canvas(canvas);
|
||||
if (it != m_canvases.end())
|
||||
it->second->set_layers_editing_last_object_id(id);
|
||||
}
|
||||
|
||||
float GLCanvas3DManager::get_layers_editing_last_z(wxGLCanvas* canvas) const
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
return (it != m_canvases.end()) ? it->second->get_layers_editing_last_z() : 0.0f;
|
||||
}
|
||||
|
||||
void GLCanvas3DManager::set_layers_editing_last_z(wxGLCanvas* canvas, float z)
|
||||
{
|
||||
CanvasesMap::iterator it = _get_canvas(canvas);
|
||||
if (it != m_canvases.end())
|
||||
it->second->set_layers_editing_last_z(z);
|
||||
}
|
||||
|
||||
unsigned int GLCanvas3DManager::get_layers_editing_last_action(wxGLCanvas* canvas) const
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
return (it != m_canvases.end()) ? it->second->get_layers_editing_last_action() : 0;
|
||||
}
|
||||
|
||||
void GLCanvas3DManager::set_layers_editing_last_action(wxGLCanvas* canvas, unsigned int action)
|
||||
{
|
||||
CanvasesMap::iterator it = _get_canvas(canvas);
|
||||
if (it != m_canvases.end())
|
||||
it->second->set_layers_editing_last_action(action);
|
||||
}
|
||||
|
||||
const GLShader* GLCanvas3DManager::get_layers_editing_shader(wxGLCanvas* canvas) const
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
return (it != m_canvases.end()) ? it->second->get_layers_editing_shader() : nullptr;
|
||||
}
|
||||
|
||||
float GLCanvas3DManager::get_layers_editing_cursor_z_relative(wxGLCanvas* canvas) const
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
return (it != m_canvases.end()) ? it->second->get_layers_editing_cursor_z_relative() : 0.0f;
|
||||
}
|
||||
|
||||
int GLCanvas3DManager::get_layers_editing_first_selected_object_id(wxGLCanvas* canvas, unsigned int objects_count) const
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
return (it != m_canvases.end()) ? it->second->get_layers_editing_first_selected_object_id(objects_count) : 0.;
|
||||
}
|
||||
|
||||
bool GLCanvas3DManager::bar_rect_contains(wxGLCanvas* canvas, float x, float y) const
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
return (it != m_canvases.end()) ? it->second->bar_rect_contains(x, y) : false;
|
||||
}
|
||||
|
||||
bool GLCanvas3DManager::reset_rect_contains(wxGLCanvas* canvas, float x, float y) const
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
return (it != m_canvases.end()) ? it->second->reset_rect_contains(x, y) : false;
|
||||
}
|
||||
|
||||
void GLCanvas3DManager::zoom_to_bed(wxGLCanvas* canvas)
|
||||
{
|
||||
CanvasesMap::iterator it = _get_canvas(canvas);
|
||||
@ -642,19 +340,6 @@ void GLCanvas3DManager::update_volumes_colors_by_extruder(wxGLCanvas* canvas)
|
||||
it->second->update_volumes_colors_by_extruder();
|
||||
}
|
||||
|
||||
bool GLCanvas3DManager::start_using_shader(wxGLCanvas* canvas) const
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
return (it != m_canvases.end()) ? it->second->start_using_shader() : false;
|
||||
}
|
||||
|
||||
void GLCanvas3DManager::stop_using_shader(wxGLCanvas* canvas) const
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
if (it != m_canvases.end())
|
||||
it->second->stop_using_shader();
|
||||
}
|
||||
|
||||
void GLCanvas3DManager::render(wxGLCanvas* canvas) const
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
@ -662,41 +347,6 @@ void GLCanvas3DManager::render(wxGLCanvas* canvas) const
|
||||
it->second->render(m_use_VBOs);
|
||||
}
|
||||
|
||||
void GLCanvas3DManager::render_volumes(wxGLCanvas* canvas, bool fake_colors) const
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
if (it != m_canvases.end())
|
||||
it->second->render_volumes(fake_colors);
|
||||
}
|
||||
|
||||
void GLCanvas3DManager::render_texture(wxGLCanvas* canvas, unsigned int tex_id, float left, float right, float bottom, float top) const
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
if (it != m_canvases.end())
|
||||
it->second->render_texture(tex_id, left, right, bottom, top);
|
||||
}
|
||||
|
||||
void GLCanvas3DManager::start_timer(wxGLCanvas* canvas)
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
if (it != m_canvases.end())
|
||||
it->second->start_timer();
|
||||
}
|
||||
|
||||
void GLCanvas3DManager::stop_timer(wxGLCanvas* canvas)
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
if (it != m_canvases.end())
|
||||
it->second->stop_timer();
|
||||
}
|
||||
|
||||
void GLCanvas3DManager::perform_layer_editing_action(wxGLCanvas* canvas, int y, bool shift_down, bool right_down)
|
||||
{
|
||||
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||
if (it != m_canvases.end())
|
||||
it->second->perform_layer_editing_action(y, shift_down, right_down);
|
||||
}
|
||||
|
||||
void GLCanvas3DManager::register_on_viewport_changed_callback(wxGLCanvas* canvas, void* callback)
|
||||
{
|
||||
CanvasesMap::iterator it = _get_canvas(canvas);
|
||||
|
@ -46,14 +46,8 @@ public:
|
||||
|
||||
bool init(wxGLCanvas* canvas, bool useVBOs);
|
||||
|
||||
bool is_dirty(wxGLCanvas* canvas) const;
|
||||
void set_dirty(wxGLCanvas* canvas, bool dirty);
|
||||
|
||||
bool is_shown_on_screen(wxGLCanvas* canvas) const;
|
||||
|
||||
void resize(wxGLCanvas* canvas, unsigned int w, unsigned int h);
|
||||
|
||||
GLVolumeCollection* get_volumes(wxGLCanvas* canvas);
|
||||
void set_volumes(wxGLCanvas* canvas, GLVolumeCollection* volumes);
|
||||
void reset_volumes(wxGLCanvas* canvas);
|
||||
void deselect_volumes(wxGLCanvas* canvas);
|
||||
@ -65,42 +59,14 @@ public:
|
||||
void set_bed_shape(wxGLCanvas* canvas, const Pointfs& shape);
|
||||
void set_auto_bed_shape(wxGLCanvas* canvas);
|
||||
|
||||
BoundingBoxf3 get_bed_bounding_box(wxGLCanvas* canvas);
|
||||
BoundingBoxf3 get_volumes_bounding_box(wxGLCanvas* canvas);
|
||||
BoundingBoxf3 get_max_bounding_box(wxGLCanvas* canvas);
|
||||
|
||||
Pointf3 get_axes_origin(wxGLCanvas* canvas) const;
|
||||
void set_axes_origin(wxGLCanvas* canvas, const Pointf3& origin);
|
||||
|
||||
float get_axes_length(wxGLCanvas* canvas) const;
|
||||
void set_axes_length(wxGLCanvas* canvas, float length);
|
||||
|
||||
void set_cutting_plane(wxGLCanvas* canvas, float z, const ExPolygons& polygons);
|
||||
|
||||
unsigned int get_camera_type(wxGLCanvas* canvas) const;
|
||||
void set_camera_type(wxGLCanvas* canvas, unsigned int type);
|
||||
std::string get_camera_type_as_string(wxGLCanvas* canvas) const;
|
||||
|
||||
float get_camera_zoom(wxGLCanvas* canvas) const;
|
||||
void set_camera_zoom(wxGLCanvas* canvas, float zoom);
|
||||
|
||||
float get_camera_phi(wxGLCanvas* canvas) const;
|
||||
void set_camera_phi(wxGLCanvas* canvas, float phi);
|
||||
|
||||
float get_camera_theta(wxGLCanvas* canvas) const;
|
||||
void set_camera_theta(wxGLCanvas* canvas, float theta);
|
||||
|
||||
float get_camera_distance(wxGLCanvas* canvas) const;
|
||||
void set_camera_distance(wxGLCanvas* canvas, float distance);
|
||||
|
||||
Pointf3 get_camera_target(wxGLCanvas* canvas) const;
|
||||
void set_camera_target(wxGLCanvas* canvas, const Pointf3& target);
|
||||
|
||||
bool is_layers_editing_enabled(wxGLCanvas* canvas) const;
|
||||
bool is_picking_enabled(wxGLCanvas* canvas) const;
|
||||
bool is_moving_enabled(wxGLCanvas* canvas) const;
|
||||
bool is_layers_editing_allowed(wxGLCanvas* canvas) const;
|
||||
bool is_multisample_allowed(wxGLCanvas* canvas) const;
|
||||
|
||||
void enable_layers_editing(wxGLCanvas* canvas, bool enable);
|
||||
void enable_warning_texture(wxGLCanvas* canvas, bool enable);
|
||||
@ -110,39 +76,6 @@ public:
|
||||
void enable_shader(wxGLCanvas* canvas, bool enable);
|
||||
void allow_multisample(wxGLCanvas* canvas, bool allow);
|
||||
|
||||
bool is_mouse_dragging(wxGLCanvas* canvas) const;
|
||||
void set_mouse_dragging(wxGLCanvas* canvas, bool dragging);
|
||||
|
||||
int get_hover_volume_id(wxGLCanvas* canvas) const;
|
||||
void set_hover_volume_id(wxGLCanvas* canvas, int id);
|
||||
|
||||
unsigned int get_layers_editing_z_texture_id(wxGLCanvas* canvas) const;
|
||||
|
||||
unsigned int get_layers_editing_state(wxGLCanvas* canvas) const;
|
||||
void set_layers_editing_state(wxGLCanvas* canvas, unsigned int state);
|
||||
|
||||
float get_layers_editing_band_width(wxGLCanvas* canvas) const;
|
||||
void set_layers_editing_band_width(wxGLCanvas* canvas, float band_width);
|
||||
|
||||
float get_layers_editing_strength(wxGLCanvas* canvas) const;
|
||||
void set_layers_editing_strength(wxGLCanvas* canvas, float strength);
|
||||
|
||||
int get_layers_editing_last_object_id(wxGLCanvas* canvas) const;
|
||||
void set_layers_editing_last_object_id(wxGLCanvas* canvas, int id);
|
||||
|
||||
float get_layers_editing_last_z(wxGLCanvas* canvas) const;
|
||||
void set_layers_editing_last_z(wxGLCanvas* canvas, float z);
|
||||
|
||||
unsigned int get_layers_editing_last_action(wxGLCanvas* canvas) const;
|
||||
void set_layers_editing_last_action(wxGLCanvas* canvas, unsigned int action);
|
||||
|
||||
const GLShader* get_layers_editing_shader(wxGLCanvas* canvas) const;
|
||||
|
||||
float get_layers_editing_cursor_z_relative(wxGLCanvas* canvas) const;
|
||||
int get_layers_editing_first_selected_object_id(wxGLCanvas* canvas, unsigned int objects_count) const;
|
||||
bool bar_rect_contains(wxGLCanvas* canvas, float x, float y) const;
|
||||
bool reset_rect_contains(wxGLCanvas* canvas, float x, float y) const;
|
||||
|
||||
void zoom_to_bed(wxGLCanvas* canvas);
|
||||
void zoom_to_volumes(wxGLCanvas* canvas);
|
||||
void select_view(wxGLCanvas* canvas, const std::string& direction);
|
||||
@ -150,16 +83,7 @@ public:
|
||||
|
||||
void update_volumes_colors_by_extruder(wxGLCanvas* canvas);
|
||||
|
||||
bool start_using_shader(wxGLCanvas* canvas) const;
|
||||
void stop_using_shader(wxGLCanvas* canvas) const;
|
||||
|
||||
void render(wxGLCanvas* canvas) const;
|
||||
void render_volumes(wxGLCanvas* canvas, bool fake_colors) const;
|
||||
void render_texture(wxGLCanvas* canvas, unsigned int tex_id, float left, float right, float bottom, float top) const;
|
||||
|
||||
void start_timer(wxGLCanvas* canvas);
|
||||
void stop_timer(wxGLCanvas* canvas);
|
||||
void perform_layer_editing_action(wxGLCanvas* canvas, int y, bool shift_down, bool right_down);
|
||||
|
||||
void register_on_viewport_changed_callback(wxGLCanvas* canvas, void* callback);
|
||||
void register_on_double_click_callback(wxGLCanvas* canvas, void* callback);
|
||||
|
@ -199,21 +199,6 @@ init(canvas, useVBOs)
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
bool
|
||||
is_dirty(canvas)
|
||||
SV *canvas;
|
||||
CODE:
|
||||
RETVAL = _3DScene::is_dirty((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"));
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
void
|
||||
set_dirty(canvas, dirty)
|
||||
SV *canvas;
|
||||
bool dirty;
|
||||
CODE:
|
||||
_3DScene::set_dirty((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), dirty);
|
||||
|
||||
bool
|
||||
is_shown_on_screen(canvas)
|
||||
SV *canvas;
|
||||
@ -222,22 +207,6 @@ is_shown_on_screen(canvas)
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
void
|
||||
resize(canvas, w, h)
|
||||
SV *canvas;
|
||||
unsigned int w;
|
||||
unsigned int h;
|
||||
CODE:
|
||||
_3DScene::resize((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), w, h);
|
||||
|
||||
GLVolumeCollection*
|
||||
get_volumes(canvas)
|
||||
SV *canvas;
|
||||
CODE:
|
||||
RETVAL = _3DScene::get_volumes((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"));
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
void
|
||||
set_volumes(canvas, volumes)
|
||||
SV *canvas;
|
||||
@ -291,14 +260,6 @@ set_auto_bed_shape(canvas)
|
||||
CODE:
|
||||
_3DScene::set_auto_bed_shape((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"));
|
||||
|
||||
Clone<BoundingBoxf3>
|
||||
get_bed_bounding_box(canvas)
|
||||
SV *canvas;
|
||||
CODE:
|
||||
RETVAL = _3DScene::get_bed_bounding_box((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"));
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
Clone<BoundingBoxf3>
|
||||
get_volumes_bounding_box(canvas)
|
||||
SV *canvas;
|
||||
@ -307,37 +268,6 @@ get_volumes_bounding_box(canvas)
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
Clone<BoundingBoxf3>
|
||||
get_max_bounding_box(canvas)
|
||||
SV *canvas;
|
||||
CODE:
|
||||
RETVAL = _3DScene::get_max_bounding_box((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"));
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
Clone<Pointf3>
|
||||
get_axes_origin(canvas)
|
||||
SV *canvas;
|
||||
CODE:
|
||||
RETVAL = _3DScene::get_axes_origin((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"));
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
void
|
||||
set_axes_origin(canvas, origin)
|
||||
SV *canvas;
|
||||
Pointf3 *origin;
|
||||
CODE:
|
||||
_3DScene::set_axes_origin((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), origin);
|
||||
|
||||
float
|
||||
get_axes_length(canvas)
|
||||
SV *canvas;
|
||||
CODE:
|
||||
RETVAL = _3DScene::get_axes_length((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"));
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
void
|
||||
set_axes_length(canvas, length)
|
||||
SV *canvas;
|
||||
@ -353,104 +283,6 @@ set_cutting_plane(canvas, z, polygons)
|
||||
CODE:
|
||||
_3DScene::set_cutting_plane((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), z, polygons);
|
||||
|
||||
unsigned int
|
||||
get_camera_type(canvas)
|
||||
SV *canvas;
|
||||
CODE:
|
||||
RETVAL = _3DScene::get_camera_type((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"));
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
void
|
||||
set_camera_type(canvas, type)
|
||||
SV *canvas;
|
||||
unsigned int type;
|
||||
CODE:
|
||||
_3DScene::set_camera_type((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), type);
|
||||
|
||||
std::string
|
||||
get_camera_type_as_string(canvas)
|
||||
SV *canvas;
|
||||
CODE:
|
||||
RETVAL = _3DScene::get_camera_type_as_string((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"));
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
float
|
||||
get_camera_zoom(canvas)
|
||||
SV *canvas;
|
||||
CODE:
|
||||
RETVAL = _3DScene::get_camera_zoom((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"));
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
void
|
||||
set_camera_zoom(canvas, zoom)
|
||||
SV *canvas;
|
||||
float zoom;
|
||||
CODE:
|
||||
_3DScene::set_camera_zoom((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), zoom);
|
||||
|
||||
float
|
||||
get_camera_phi(canvas)
|
||||
SV *canvas;
|
||||
CODE:
|
||||
RETVAL = _3DScene::get_camera_phi((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"));
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
void
|
||||
set_camera_phi(canvas, phi)
|
||||
SV *canvas;
|
||||
float phi;
|
||||
CODE:
|
||||
_3DScene::set_camera_phi((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), phi);
|
||||
|
||||
float
|
||||
get_camera_theta(canvas)
|
||||
SV *canvas;
|
||||
CODE:
|
||||
RETVAL = _3DScene::get_camera_theta((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"));
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
void
|
||||
set_camera_theta(canvas, theta)
|
||||
SV *canvas;
|
||||
float theta;
|
||||
CODE:
|
||||
_3DScene::set_camera_theta((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), theta);
|
||||
|
||||
float
|
||||
get_camera_distance(canvas)
|
||||
SV *canvas;
|
||||
CODE:
|
||||
RETVAL = _3DScene::get_camera_distance((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"));
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
void
|
||||
set_camera_distance(canvas, distance)
|
||||
SV *canvas;
|
||||
float distance;
|
||||
CODE:
|
||||
_3DScene::set_camera_distance((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), distance);
|
||||
|
||||
Clone<Pointf3>
|
||||
get_camera_target(canvas)
|
||||
SV *canvas;
|
||||
CODE:
|
||||
RETVAL = _3DScene::get_camera_target((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"));
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
void
|
||||
set_camera_target(canvas, target)
|
||||
SV *canvas;
|
||||
Pointf3 *target;
|
||||
CODE:
|
||||
_3DScene::set_camera_target((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), target);
|
||||
|
||||
bool
|
||||
is_layers_editing_enabled(canvas)
|
||||
SV *canvas;
|
||||
@ -459,22 +291,6 @@ is_layers_editing_enabled(canvas)
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
bool
|
||||
is_picking_enabled(canvas)
|
||||
SV *canvas;
|
||||
CODE:
|
||||
RETVAL = _3DScene::is_picking_enabled((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"));
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
bool
|
||||
is_moving_enabled(canvas)
|
||||
SV *canvas;
|
||||
CODE:
|
||||
RETVAL = _3DScene::is_moving_enabled((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"));
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
bool
|
||||
is_layers_editing_allowed(canvas)
|
||||
SV *canvas;
|
||||
@ -483,14 +299,6 @@ is_layers_editing_allowed(canvas)
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
bool
|
||||
is_multisample_allowed(canvas)
|
||||
SV *canvas;
|
||||
CODE:
|
||||
RETVAL = _3DScene::is_multisample_allowed((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"));
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
void
|
||||
enable_layers_editing(canvas, enable)
|
||||
SV *canvas;
|
||||
@ -540,179 +348,6 @@ allow_multisample(canvas, allow)
|
||||
CODE:
|
||||
_3DScene::allow_multisample((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), allow);
|
||||
|
||||
bool
|
||||
is_mouse_dragging(canvas)
|
||||
SV *canvas;
|
||||
CODE:
|
||||
RETVAL = _3DScene::is_mouse_dragging((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"));
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
void
|
||||
set_mouse_dragging(canvas, dragging)
|
||||
SV *canvas;
|
||||
bool dragging;
|
||||
CODE:
|
||||
_3DScene::set_mouse_dragging((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), dragging);
|
||||
|
||||
int
|
||||
get_hover_volume_id(canvas)
|
||||
SV *canvas;
|
||||
CODE:
|
||||
RETVAL = _3DScene::get_hover_volume_id((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"));
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
void
|
||||
set_hover_volume_id(canvas, id)
|
||||
SV *canvas;
|
||||
int id;
|
||||
CODE:
|
||||
_3DScene::set_hover_volume_id((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), id);
|
||||
|
||||
unsigned int
|
||||
get_layers_editing_z_texture_id(canvas)
|
||||
SV *canvas;
|
||||
CODE:
|
||||
RETVAL = _3DScene::get_layers_editing_z_texture_id((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"));
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
unsigned int
|
||||
get_layers_editing_state(canvas)
|
||||
SV *canvas;
|
||||
CODE:
|
||||
RETVAL = _3DScene::get_layers_editing_state((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"));
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
void
|
||||
set_layers_editing_state(canvas, state)
|
||||
SV *canvas;
|
||||
unsigned int state;
|
||||
CODE:
|
||||
_3DScene::set_layers_editing_state((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), state);
|
||||
|
||||
float
|
||||
get_layers_editing_band_width(canvas)
|
||||
SV *canvas;
|
||||
CODE:
|
||||
RETVAL = _3DScene::get_layers_editing_band_width((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"));
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
void
|
||||
set_layers_editing_band_width(canvas, band_width)
|
||||
SV *canvas;
|
||||
float band_width;
|
||||
CODE:
|
||||
_3DScene::set_layers_editing_band_width((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), band_width);
|
||||
|
||||
float
|
||||
get_layers_editing_strength(canvas)
|
||||
SV *canvas;
|
||||
CODE:
|
||||
RETVAL = _3DScene::get_layers_editing_strength((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"));
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
void
|
||||
set_layers_editing_strength(canvas, strength)
|
||||
SV *canvas;
|
||||
float strength;
|
||||
CODE:
|
||||
_3DScene::set_layers_editing_strength((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), strength);
|
||||
|
||||
int
|
||||
get_layers_editing_last_object_id(canvas)
|
||||
SV *canvas;
|
||||
CODE:
|
||||
RETVAL = _3DScene::get_layers_editing_last_object_id((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"));
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
void
|
||||
set_layers_editing_last_object_id(canvas, id)
|
||||
SV *canvas;
|
||||
int id;
|
||||
CODE:
|
||||
_3DScene::set_layers_editing_last_object_id((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), id);
|
||||
|
||||
float
|
||||
get_layers_editing_last_z(canvas)
|
||||
SV *canvas;
|
||||
CODE:
|
||||
RETVAL = _3DScene::get_layers_editing_last_z((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"));
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
void
|
||||
set_layers_editing_last_z(canvas, z)
|
||||
SV *canvas;
|
||||
float z;
|
||||
CODE:
|
||||
_3DScene::set_layers_editing_last_z((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), z);
|
||||
|
||||
unsigned int
|
||||
get_layers_editing_last_action(canvas)
|
||||
SV *canvas;
|
||||
CODE:
|
||||
RETVAL = _3DScene::get_layers_editing_last_action((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"));
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
void
|
||||
set_layers_editing_last_action(canvas, action)
|
||||
SV *canvas;
|
||||
unsigned int action;
|
||||
CODE:
|
||||
_3DScene::set_layers_editing_last_action((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), action);
|
||||
|
||||
Ref<GLShader>
|
||||
get_layers_editing_shader(canvas)
|
||||
SV *canvas;
|
||||
CODE:
|
||||
RETVAL = _3DScene::get_layers_editing_shader((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"));
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
float
|
||||
get_layers_editing_cursor_z_relative(canvas)
|
||||
SV *canvas;
|
||||
CODE:
|
||||
RETVAL = _3DScene::get_layers_editing_cursor_z_relative((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"));
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
int
|
||||
get_layers_editing_first_selected_object_id(canvas, objects_count)
|
||||
SV *canvas;
|
||||
unsigned int objects_count;
|
||||
CODE:
|
||||
RETVAL = _3DScene::get_layers_editing_first_selected_object_id((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), objects_count);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
bool
|
||||
bar_rect_contains(canvas, x, y)
|
||||
SV *canvas;
|
||||
float x;
|
||||
float y;
|
||||
CODE:
|
||||
RETVAL = _3DScene::bar_rect_contains((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), x, y);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
bool
|
||||
reset_rect_contains(canvas, x, y)
|
||||
SV *canvas;
|
||||
float x;
|
||||
float y;
|
||||
CODE:
|
||||
RETVAL = _3DScene::reset_rect_contains((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), x, y);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
void
|
||||
zoom_to_bed(canvas)
|
||||
SV *canvas;
|
||||
@ -745,65 +380,12 @@ update_volumes_colors_by_extruder(canvas)
|
||||
CODE:
|
||||
_3DScene::update_volumes_colors_by_extruder((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"));
|
||||
|
||||
bool
|
||||
start_using_shader(canvas)
|
||||
SV *canvas;
|
||||
CODE:
|
||||
RETVAL = _3DScene::start_using_shader((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"));
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
void
|
||||
stop_using_shader(canvas)
|
||||
SV *canvas;
|
||||
CODE:
|
||||
_3DScene::stop_using_shader((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"));
|
||||
|
||||
void
|
||||
render(canvas)
|
||||
SV *canvas;
|
||||
CODE:
|
||||
_3DScene::render((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"));
|
||||
|
||||
void
|
||||
render_volumes(canvas, fake_colors)
|
||||
SV *canvas;
|
||||
bool fake_colors;
|
||||
CODE:
|
||||
_3DScene::render_volumes((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), fake_colors);
|
||||
|
||||
void
|
||||
render_texture(canvas, tex_id, left, right, bottom, top)
|
||||
SV *canvas;
|
||||
unsigned int tex_id;
|
||||
float left;
|
||||
float right;
|
||||
float bottom;
|
||||
float top;
|
||||
CODE:
|
||||
_3DScene::render_texture((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), tex_id, left, right, bottom, top);
|
||||
|
||||
void
|
||||
start_timer(canvas)
|
||||
SV *canvas;
|
||||
CODE:
|
||||
_3DScene::start_timer((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"));
|
||||
|
||||
void
|
||||
stop_timer(canvas)
|
||||
SV *canvas;
|
||||
CODE:
|
||||
_3DScene::stop_timer((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"));
|
||||
|
||||
void
|
||||
perform_layer_editing_action(canvas, y, shift_down, right_down)
|
||||
SV *canvas;
|
||||
int y;
|
||||
bool shift_down;
|
||||
bool right_down;
|
||||
CODE:
|
||||
_3DScene::perform_layer_editing_action((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), y, shift_down, right_down);
|
||||
|
||||
void
|
||||
register_on_viewport_changed_callback(canvas, callback)
|
||||
SV *canvas;
|
||||
|
Loading…
Reference in New Issue
Block a user