diff options
author | Saracen <SaracenOne@gmail.com> | 2016-03-20 02:10:04 +0000 |
---|---|---|
committer | Saracen <SaracenOne@gmail.com> | 2016-03-20 02:10:04 +0000 |
commit | 3741bc70fe2aa96d163880cfe1ca013e741fd03e (patch) | |
tree | c57511f52e404557b4dc2c4cc9dee2136e8eee00 /scene/3d/listener.h | |
parent | b8daa7e6e6c75324bd1aab346975b38721667c2f (diff) | |
download | redot-engine-3741bc70fe2aa96d163880cfe1ca013e741fd03e.tar.gz |
Added listener spatial node.
Diffstat (limited to 'scene/3d/listener.h')
-rw-r--r-- | scene/3d/listener.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/scene/3d/listener.h b/scene/3d/listener.h new file mode 100644 index 0000000000..bf0281a8e0 --- /dev/null +++ b/scene/3d/listener.h @@ -0,0 +1,53 @@ +#ifndef LISTENER_H +#define LISTENER_H + + +#include "scene/3d/spatial.h" +#include "scene/main/viewport.h" + +class Listener : public Spatial { + + OBJ_TYPE(Listener, Spatial); +private: + + bool force_change; + bool current; + + RID scenario_id; + + virtual bool _can_gizmo_scale() const; + virtual RES _get_gizmo_geometry() const; + +friend class Viewport; + void _update_audio_listener_state(); +protected: + + void _update_listener(); + virtual void _request_listener_update(); + + 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: + + void make_current(); + void clear_current(); + bool is_current() const; + + virtual Transform get_listener_transform() const; + + void set_visible_layers(uint32_t p_layers); + uint32_t get_visible_layers() const; + + Vector<Plane> get_frustum() const; + + Listener(); + ~Listener(); + +}; + +#endif |