#include "camera_2d.h"
#include "core/config/project_settings.h"
#include "scene/main/window.h"
bool Camera2D::_is_editing_in_editor() const { … }
void Camera2D::_update_scroll() { … }
#ifdef TOOLS_ENABLED
void Camera2D::_project_settings_changed() { … }
#endif
void Camera2D::_update_process_callback() { … }
void Camera2D::set_zoom(const Vector2 &p_zoom) {
ERR_FAIL_COND_MSG(Math::is_zero_approx(p_zoom.x) || Math::is_zero_approx(p_zoom.y), "Zoom level must be different from 0 (can be negative).");
zoom = p_zoom;
zoom_scale = Vector2(1, 1) / zoom;
Point2 old_smoothed_camera_pos = smoothed_camera_pos;
_update_scroll();
smoothed_camera_pos = old_smoothed_camera_pos;
};
Vector2 Camera2D::get_zoom() const {
return zoom;
};
Transform2D Camera2D::get_camera_transform() { … }
void Camera2D::_ensure_update_interpolation_data() { … }
void Camera2D::_notification(int p_what) { … }
void Camera2D::set_offset(const Vector2 &p_offset) { … }
Vector2 Camera2D::get_offset() const { … }
void Camera2D::set_anchor_mode(AnchorMode p_anchor_mode) { … }
Camera2D::AnchorMode Camera2D::get_anchor_mode() const { … }
void Camera2D::set_ignore_rotation(bool p_ignore) { … }
bool Camera2D::is_ignoring_rotation() const { … }
void Camera2D::set_process_callback(Camera2DProcessCallback p_mode) { … }
void Camera2D::set_enabled(bool p_enabled) { … }
bool Camera2D::is_enabled() const { … }
Camera2D::Camera2DProcessCallback Camera2D::get_process_callback() const { … }
void Camera2D::_make_current(Object *p_which) { … }
void Camera2D::_update_process_internal_for_smoothing() { … }
void Camera2D::make_current() { … }
void Camera2D::clear_current() { … }
bool Camera2D::is_current() const { … }
void Camera2D::set_limit(Side p_side, int p_limit) { … }
int Camera2D::get_limit(Side p_side) const { … }
void Camera2D::set_limit_smoothing_enabled(bool enable) { … }
bool Camera2D::is_limit_smoothing_enabled() const { … }
void Camera2D::set_drag_margin(Side p_side, real_t p_drag_margin) { … }
real_t Camera2D::get_drag_margin(Side p_side) const { … }
Vector2 Camera2D::get_camera_position() const { … }
void Camera2D::force_update_scroll() { … }
void Camera2D::reset_smoothing() { … }
void Camera2D::align() { … }
void Camera2D::set_position_smoothing_speed(real_t p_speed) { … }
real_t Camera2D::get_position_smoothing_speed() const { … }
void Camera2D::set_rotation_smoothing_speed(real_t p_speed) { … }
real_t Camera2D::get_rotation_smoothing_speed() const { … }
void Camera2D::set_rotation_smoothing_enabled(bool p_enabled) { … }
bool Camera2D::is_rotation_smoothing_enabled() const { … }
Point2 Camera2D::get_camera_screen_center() const { … }
Size2 Camera2D::_get_camera_screen_size() const { … }
void Camera2D::set_drag_horizontal_enabled(bool p_enabled) { … }
bool Camera2D::is_drag_horizontal_enabled() const { … }
void Camera2D::set_drag_vertical_enabled(bool p_enabled) { … }
bool Camera2D::is_drag_vertical_enabled() const { … }
void Camera2D::set_drag_vertical_offset(real_t p_offset) { … }
real_t Camera2D::get_drag_vertical_offset() const { … }
void Camera2D::set_drag_horizontal_offset(real_t p_offset) { … }
real_t Camera2D::get_drag_horizontal_offset() const { … }
void Camera2D::_set_old_smoothing(real_t p_enable) { … }
void Camera2D::set_position_smoothing_enabled(bool p_enabled) { … }
bool Camera2D::is_position_smoothing_enabled() const { … }
void Camera2D::set_custom_viewport(Node *p_viewport) { … }
Node *Camera2D::get_custom_viewport() const { … }
void Camera2D::set_screen_drawing_enabled(bool enable) { … }
bool Camera2D::is_screen_drawing_enabled() const { … }
void Camera2D::set_limit_drawing_enabled(bool enable) { … }
bool Camera2D::is_limit_drawing_enabled() const { … }
void Camera2D::set_margin_drawing_enabled(bool enable) { … }
bool Camera2D::is_margin_drawing_enabled() const { … }
void Camera2D::_validate_property(PropertyInfo &p_property) const { … }
void Camera2D::_bind_methods() { … }
Camera2D::Camera2D() { … }