diff options
| author | Franklin Sobrinho | 2015-11-11 11:30:55 -0300 |
|---|---|---|
| committer | Franklin Sobrinho | 2015-11-11 11:30:55 -0300 |
| commit | 541812e999858ec1a7f1dc19febef2617f06573f (patch) | |
| tree | 971306745f2c607dd420b74e0c01bef40a702ccc /core/variant_op.cpp | |
| parent | 61c4c5795ff9057b1c67142758418a4f982a0241 (diff) | |
| download | godot-541812e999858ec1a7f1dc19febef2617f06573f.tar.gz godot-541812e999858ec1a7f1dc19febef2617f06573f.tar.zst godot-541812e999858ec1a7f1dc19febef2617f06573f.zip | |
Diffstat (limited to 'core/variant_op.cpp')
| -rw-r--r-- | core/variant_op.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/core/variant_op.cpp b/core/variant_op.cpp index 1cdf6d731..39a802e17 100644 --- a/core/variant_op.cpp +++ b/core/variant_op.cpp @@ -586,7 +586,21 @@ void Variant::evaluate(const Operator& p_op, const Variant& p_a, const Variant& } break; DEFAULT_OP_LOCALMEM_NUM(*,VECTOR3,Vector3); DEFAULT_OP_FAIL(PLANE); - DEFAULT_OP_FAIL(QUAT); + case QUAT: { + + switch(p_b.type) { + case VECTOR3: { + + _RETURN( reinterpret_cast<const Quat*>(p_a._data._mem)->xform( *(const Vector3*)p_b._data._mem) ); + } break; + case QUAT: { + + _RETURN( *reinterpret_cast<const Quat*>(p_a._data._mem) * *reinterpret_cast<const Quat*>(p_b._data._mem) ); + } break; + }; + r_valid=false; + return; + } break; DEFAULT_OP_FAIL(_AABB); case MATRIX3: { |
