From 2e73be99d8d86d9dad7bcb99518a4d3cbb5c373c Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 15 Jul 2017 01:23:10 -0300 Subject: 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. --- core/math/vector3.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'core/math/vector3.h') diff --git a/core/math/vector3.h b/core/math/vector3.h index 7dfcedd0d..6a7974681 100644 --- a/core/math/vector3.h +++ b/core/math/vector3.h @@ -100,6 +100,7 @@ struct Vector3 { _FORCE_INLINE_ Vector3 abs() const; _FORCE_INLINE_ Vector3 floor() const; + _FORCE_INLINE_ Vector3 sign() const; _FORCE_INLINE_ Vector3 ceil() const; _FORCE_INLINE_ real_t distance_to(const Vector3 &p_b) const; @@ -187,6 +188,11 @@ Vector3 Vector3::abs() const { return Vector3(Math::abs(x), Math::abs(y), Math::abs(z)); } +Vector3 Vector3::sign() const { + + return Vector3(SGN(x), SGN(y), SGN(z)); +} + Vector3 Vector3::floor() const { return Vector3(Math::floor(x), Math::floor(y), Math::floor(z)); -- cgit v1.2.3-70-g09d2