diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2017-03-05 16:44:50 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2017-03-05 16:44:50 +0100 |
commit | 5dbf1809c6e3e905b94b8764e99491e608122261 (patch) | |
tree | 5e5a5360db15d86d59ec8c6e4f7eb511388c5a9a /scene/3d/camera.h | |
parent | 45438e9918d421b244bfd7776a30e67dc7f2d3e3 (diff) | |
download | redot-engine-5dbf1809c6e3e905b94b8764e99491e608122261.tar.gz |
A Whole New World (clang-format edition)
I can show you the code
Pretty, with proper whitespace
Tell me, coder, now when did
You last write readable code?
I can open your eyes
Make you see your bad indent
Force you to respect the style
The core devs agreed upon
A whole new world
A new fantastic code format
A de facto standard
With some sugar
Enforced with clang-format
A whole new world
A dazzling style we all dreamed of
And when we read it through
It's crystal clear
That now we're in a whole new world of code
Diffstat (limited to 'scene/3d/camera.h')
-rw-r--r-- | scene/3d/camera.h | 46 |
1 files changed, 19 insertions, 27 deletions
diff --git a/scene/3d/camera.h b/scene/3d/camera.h index 5301c06ee5..3c31b6beeb 100644 --- a/scene/3d/camera.h +++ b/scene/3d/camera.h @@ -29,7 +29,6 @@ #ifndef CAMERA_H #define CAMERA_H - #include "scene/3d/spatial.h" #include "scene/main/viewport.h" #include "scene/resources/environment.h" @@ -38,7 +37,8 @@ */ class Camera : public Spatial { - GDCLASS( Camera, Spatial ); + GDCLASS(Camera, Spatial); + public: enum Projection { @@ -52,7 +52,6 @@ public: }; private: - bool force_change; bool current; @@ -60,7 +59,7 @@ private: float fov; float size; - float near,far; + float near, far; float v_offset; float h_offset; KeepAspect keep_aspect; @@ -76,30 +75,27 @@ private: virtual bool _can_gizmo_scale() const; - - //void _camera_make_current(Node *p_camera); -friend class Viewport; + friend class Viewport; void _update_audio_listener_state(); -protected: +protected: void _update_camera(); virtual void _request_camera_update(); void _update_camera_mode(); - bool _set(const StringName& p_name, const Variant& p_value); - bool _get(const StringName& p_name,Variant &r_ret) const; - void _get_property_list( List<PropertyInfo> *p_list) const; + bool _set(const StringName &p_name, const Variant &p_value); + bool _get(const StringName &p_name, Variant &r_ret) const; + void _get_property_list(List<PropertyInfo> *p_list) const; void _notification(int p_what); static void _bind_methods(); public: - enum { - NOTIFICATION_BECAME_CURRENT=50, - NOTIFICATION_LOST_CURRENT=51 + NOTIFICATION_BECAME_CURRENT = 50, + NOTIFICATION_LOST_CURRENT = 51 }; void set_perspective(float p_fovy_degrees, float p_z_near, float p_z_far); @@ -119,39 +115,35 @@ public: virtual Transform get_camera_transform() const; - Vector3 project_ray_normal(const Point2& p_point) const; - Vector3 project_ray_origin(const Point2& p_point) const; - Vector3 project_local_ray_normal(const Point2& p_point) const; - Point2 unproject_position(const Vector3& p_pos) const; - bool is_position_behind(const Vector3& p_pos) const; - Vector3 project_position(const Point2& p_point) const; + Vector3 project_ray_normal(const Point2 &p_point) const; + Vector3 project_ray_origin(const Point2 &p_point) const; + Vector3 project_local_ray_normal(const Point2 &p_point) const; + Point2 unproject_position(const Vector3 &p_pos) const; + bool is_position_behind(const Vector3 &p_pos) const; + Vector3 project_position(const Point2 &p_point) const; void set_cull_mask(uint32_t p_layers); uint32_t get_cull_mask() const; Vector<Plane> get_frustum() const; - void set_environment(const Ref<Environment>& p_environment); + void set_environment(const Ref<Environment> &p_environment); Ref<Environment> get_environment() const; void set_keep_aspect_mode(KeepAspect p_aspect); KeepAspect get_keep_aspect_mode() const; - void set_v_offset(float p_offset); float get_v_offset() const; void set_h_offset(float p_offset); float get_h_offset() const; - Camera(); ~Camera(); - }; - -VARIANT_ENUM_CAST( Camera::Projection ); -VARIANT_ENUM_CAST( Camera::KeepAspect ); +VARIANT_ENUM_CAST(Camera::Projection); +VARIANT_ENUM_CAST(Camera::KeepAspect); #endif |