From b324ff7ea584676fcc3292808d7e7ea609982f8e Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Wed, 14 May 2014 01:22:15 -0300 Subject: A bit of everything: -IMA-ADPCM support for samples, this means that sound effects can be compressed and use 4 timess less RAM. -New 3D import workflow based on Wavefront OBJ. Import single objects as mesh resources instead of full scenes. Many people prefers to work this way. Just like the rest of the imported resources, these are updated in realtime if modified externally. -Mesh resources now support naming surfaces. This helps reimporting to identify which user-created materials must be kept. -Several fixes and improvements to SurfaceTool. -Anti Aliasing added to WorldEnvironment effects (using FXAA) -2D Physics bodies (RigidBody, KinematicBody, etc), Raycasts, Tilemap, etc support collision layers. This makes easy to group which objects collide against which. -2D Trigger shapes can now also trigger collision reporting in other 2D bodies (it used to be in Area2D before) -Viewport render target textures can now be filtered. -Few fixes in GDscript make it easier to work with static functions and class members. -Several and many bugfixes. --- core/variant.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'core/variant.cpp') diff --git a/core/variant.cpp b/core/variant.cpp index 6b3b25a10..fdb14c0c0 100644 --- a/core/variant.cpp +++ b/core/variant.cpp @@ -1337,6 +1337,10 @@ Variant::operator Matrix3() const { if (type==MATRIX3) return *_data._matrix3; + else if (type==QUAT) + return *reinterpret_cast(_data._mem); + else if (type==TRANSFORM) + return _data._transform->basis; else return Matrix3(); } @@ -1345,6 +1349,10 @@ Variant::operator Quat() const { if (type==QUAT) return *reinterpret_cast(_data._mem); + else if (type==MATRIX3) + return *_data._matrix3; + else if (type==TRANSFORM) + return _data._transform->basis; else return Quat(); } @@ -1357,6 +1365,8 @@ Variant::operator Transform() const { return *_data._transform; else if (type==MATRIX3) return Transform(*_data._matrix3,Vector3()); + else if (type==QUAT) + return Transform(Matrix3(*reinterpret_cast(_data._mem)),Vector3()); else return Transform(); } -- cgit v1.2.3-70-g09d2