summaryrefslogtreecommitdiffstats
path: root/scene/3d/camera.h
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-07-15 01:23:10 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-07-15 08:32:34 -0300
commit2e73be99d8d86d9dad7bcb99518a4d3cbb5c373c (patch)
treed863db50852afe5d4b0bc15b8452054498004cb1 /scene/3d/camera.h
parente64b82ebfcc3475c7a7d2a9196bfe20d6c9e3614 (diff)
downloadredot-engine-2e73be99d8d86d9dad7bcb99518a4d3cbb5c373c.tar.gz
Lots of work on Audio & Physics engine:
-Added new 3D stream player node -Added ability for Area to capture sound from streams -Added small features in physics to be able to properly guess distance to areas for sound -Fixed 3D CollisionObject so shapes are added the same as in 2D, directly from children -Fixed KinematicBody API to make it the same as 2D.
Diffstat (limited to 'scene/3d/camera.h')
-rw-r--r--scene/3d/camera.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/scene/3d/camera.h b/scene/3d/camera.h
index 472cfaa008..43975892b4 100644
--- a/scene/3d/camera.h
+++ b/scene/3d/camera.h
@@ -31,6 +31,7 @@
#define CAMERA_H
#include "scene/3d/spatial.h"
+#include "scene/3d/spatial_velocity_tracker.h"
#include "scene/main/viewport.h"
#include "scene/resources/environment.h"
/**
@@ -52,6 +53,12 @@ public:
KEEP_HEIGHT
};
+ enum DopplerTracking {
+ DOPPLER_TRACKING_DISABLED,
+ DOPPLER_TRACKING_IDLE_STEP,
+ DOPPLER_TRACKING_FIXED_STEP
+ };
+
private:
bool force_change;
bool current;
@@ -80,6 +87,9 @@ private:
friend class Viewport;
void _update_audio_listener_state();
+ DopplerTracking doppler_tracking;
+ Ref<SpatialVelocityTracker> velocity_tracker;
+
protected:
void _update_camera();
virtual void _request_camera_update();
@@ -140,11 +150,17 @@ public:
void set_h_offset(float p_offset);
float get_h_offset() const;
+ void set_doppler_tracking(DopplerTracking p_tracking);
+ DopplerTracking get_doppler_tracking() const;
+
+ Vector3 get_doppler_tracked_velocity() const;
+
Camera();
~Camera();
};
VARIANT_ENUM_CAST(Camera::Projection);
VARIANT_ENUM_CAST(Camera::KeepAspect);
+VARIANT_ENUM_CAST(Camera::DopplerTracking);
#endif