From 455c06ecd466424cdf1b444a7c289b322390e795 Mon Sep 17 00:00:00 2001 From: reduz Date: Wed, 20 Jul 2022 01:11:13 +0200 Subject: Implement Vector4, Vector4i, Projection Implement built-in classes Vector4, Vector4i and Projection. * Two versions of Vector4 (float and integer). * A Projection class, which is a 4x4 matrix specialized in projection types. These types have been requested for a long time, but given they were very corner case they were not added before. Because in Godot 4, reimplementing parts of the rendering engine is now possible, access to these types (heavily used by the rendering code) becomes a necessity. **Q**: Why Projection and not Matrix4? **A**: Godot does not use Matrix2, Matrix3, Matrix4x3, etc. naming convention because, within the engine, these types always have a *purpose*. As such, Godot names them: Transform2D, Transform3D or Basis. In this case, this 4x4 matrix is _always_ used as a _Projection_, hence the naming. --- core/variant/variant_op.cpp | 131 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 131 insertions(+) (limited to 'core/variant/variant_op.cpp') diff --git a/core/variant/variant_op.cpp b/core/variant/variant_op.cpp index adace2b534..669e18b5f7 100644 --- a/core/variant/variant_op.cpp +++ b/core/variant/variant_op.cpp @@ -165,6 +165,70 @@ public: static Variant::Type get_return_type() { return GetTypeInfo::VARIANT_TYPE; } }; +// + +template <> +class OperatorEvaluatorMul { +public: + static void evaluate(const Variant &p_left, const Variant &p_right, Variant *r_ret, bool &r_valid) { + const Vector4i &a = *VariantGetInternalPtr::get_ptr(&p_left); + const double &b = *VariantGetInternalPtr::get_ptr(&p_right); + *r_ret = Vector4(a.x, a.y, a.z, a.w) * b; + r_valid = true; + } + static inline void validated_evaluate(const Variant *left, const Variant *right, Variant *r_ret) { + *VariantGetInternalPtr::get_ptr(r_ret) = Vector4(VariantGetInternalPtr::get_ptr(left)->x, VariantGetInternalPtr::get_ptr(left)->y, VariantGetInternalPtr::get_ptr(left)->z, VariantGetInternalPtr::get_ptr(left)->w) * *VariantGetInternalPtr::get_ptr(right); + } + static void ptr_evaluate(const void *left, const void *right, void *r_ret) { + PtrToArg::encode(Vector4(PtrToArg::convert(left).x, PtrToArg::convert(left).y, PtrToArg::convert(left).z, PtrToArg::convert(left).w) * PtrToArg::convert(right), r_ret); + } + static Variant::Type get_return_type() { return GetTypeInfo::VARIANT_TYPE; } +}; + +template <> +class OperatorEvaluatorMul { +public: + static void evaluate(const Variant &p_left, const Variant &p_right, Variant *r_ret, bool &r_valid) { + const Vector4i &a = *VariantGetInternalPtr::get_ptr(&p_right); + const double &b = *VariantGetInternalPtr::get_ptr(&p_left); + *r_ret = Vector4(a.x, a.y, a.z, a.w) * b; + r_valid = true; + } + static inline void validated_evaluate(const Variant *left, const Variant *right, Variant *r_ret) { + *VariantGetInternalPtr::get_ptr(r_ret) = Vector4(VariantGetInternalPtr::get_ptr(right)->x, VariantGetInternalPtr::get_ptr(right)->y, VariantGetInternalPtr::get_ptr(right)->z, VariantGetInternalPtr::get_ptr(right)->w) * *VariantGetInternalPtr::get_ptr(left); + } + static void ptr_evaluate(const void *left, const void *right, void *r_ret) { + PtrToArg::encode(Vector4(PtrToArg::convert(right).x, PtrToArg::convert(right).y, PtrToArg::convert(right).z, PtrToArg::convert(right).w) * PtrToArg::convert(left), r_ret); + } + static Variant::Type get_return_type() { return GetTypeInfo::VARIANT_TYPE; } +}; + +template <> +class OperatorEvaluatorDivNZ { +public: + static void evaluate(const Variant &p_left, const Variant &p_right, Variant *r_ret, bool &r_valid) { + const Vector4i &a = *VariantGetInternalPtr::get_ptr(&p_left); + const double &b = *VariantGetInternalPtr::get_ptr(&p_right); + if (unlikely(b == 0)) { + r_valid = false; + *r_ret = "Division by zero error"; + return; + } + *r_ret = Vector4(a.x, a.y, a.z, a.w) / b; + r_valid = true; + } + + static inline void validated_evaluate(const Variant *left, const Variant *right, Variant *r_ret) { + *VariantGetInternalPtr::get_ptr(r_ret) = Vector4(VariantGetInternalPtr::get_ptr(left)->x, VariantGetInternalPtr::get_ptr(left)->y, VariantGetInternalPtr::get_ptr(left)->z, VariantGetInternalPtr::get_ptr(left)->w) / *VariantGetInternalPtr::get_ptr(right); + } + + static void ptr_evaluate(const void *left, const void *right, void *r_ret) { + PtrToArg::encode(Vector4(PtrToArg::convert(left).x, PtrToArg::convert(left).y, PtrToArg::convert(left).z, PtrToArg::convert(left).w) / PtrToArg::convert(right), r_ret); + } + + static Variant::Type get_return_type() { return GetTypeInfo::VARIANT_TYPE; } +}; + void Variant::_register_variant_operators() { memset(operator_return_type_table, 0, sizeof(operator_return_type_table)); memset(operator_evaluator_table, 0, sizeof(operator_evaluator_table)); @@ -182,6 +246,8 @@ void Variant::_register_variant_operators() { register_op>(Variant::OP_ADD, Variant::VECTOR2I, Variant::VECTOR2I); register_op>(Variant::OP_ADD, Variant::VECTOR3, Variant::VECTOR3); register_op>(Variant::OP_ADD, Variant::VECTOR3I, Variant::VECTOR3I); + register_op>(Variant::OP_ADD, Variant::VECTOR4, Variant::VECTOR4); + register_op>(Variant::OP_ADD, Variant::VECTOR4I, Variant::VECTOR4I); register_op>(Variant::OP_ADD, Variant::QUATERNION, Variant::QUATERNION); register_op>(Variant::OP_ADD, Variant::COLOR, Variant::COLOR); register_op(Variant::OP_ADD, Variant::ARRAY, Variant::ARRAY); @@ -203,6 +269,8 @@ void Variant::_register_variant_operators() { register_op>(Variant::OP_SUBTRACT, Variant::VECTOR2I, Variant::VECTOR2I); register_op>(Variant::OP_SUBTRACT, Variant::VECTOR3, Variant::VECTOR3); register_op>(Variant::OP_SUBTRACT, Variant::VECTOR3I, Variant::VECTOR3I); + register_op>(Variant::OP_SUBTRACT, Variant::VECTOR4, Variant::VECTOR4); + register_op>(Variant::OP_SUBTRACT, Variant::VECTOR4I, Variant::VECTOR4I); register_op>(Variant::OP_SUBTRACT, Variant::QUATERNION, Variant::QUATERNION); register_op>(Variant::OP_SUBTRACT, Variant::COLOR, Variant::COLOR); @@ -212,6 +280,8 @@ void Variant::_register_variant_operators() { register_op>(Variant::OP_MULTIPLY, Variant::INT, Variant::VECTOR2I); register_op>(Variant::OP_MULTIPLY, Variant::INT, Variant::VECTOR3); register_op>(Variant::OP_MULTIPLY, Variant::INT, Variant::VECTOR3I); + register_op>(Variant::OP_MULTIPLY, Variant::INT, Variant::VECTOR4); + register_op>(Variant::OP_MULTIPLY, Variant::INT, Variant::VECTOR4I); register_op>(Variant::OP_MULTIPLY, Variant::FLOAT, Variant::FLOAT); register_op>(Variant::OP_MULTIPLY, Variant::FLOAT, Variant::INT); @@ -219,6 +289,8 @@ void Variant::_register_variant_operators() { register_op>(Variant::OP_MULTIPLY, Variant::FLOAT, Variant::VECTOR2I); register_op>(Variant::OP_MULTIPLY, Variant::FLOAT, Variant::VECTOR3); register_op>(Variant::OP_MULTIPLY, Variant::FLOAT, Variant::VECTOR3I); + register_op>(Variant::OP_MULTIPLY, Variant::FLOAT, Variant::VECTOR4); + register_op>(Variant::OP_MULTIPLY, Variant::FLOAT, Variant::VECTOR4I); register_op>(Variant::OP_MULTIPLY, Variant::VECTOR2, Variant::VECTOR2); register_op>(Variant::OP_MULTIPLY, Variant::VECTOR2, Variant::INT); @@ -236,6 +308,14 @@ void Variant::_register_variant_operators() { register_op>(Variant::OP_MULTIPLY, Variant::VECTOR3I, Variant::INT); register_op>(Variant::OP_MULTIPLY, Variant::VECTOR3I, Variant::FLOAT); + register_op>(Variant::OP_MULTIPLY, Variant::VECTOR4, Variant::VECTOR4); + register_op>(Variant::OP_MULTIPLY, Variant::VECTOR4, Variant::INT); + register_op>(Variant::OP_MULTIPLY, Variant::VECTOR4, Variant::FLOAT); + + register_op>(Variant::OP_MULTIPLY, Variant::VECTOR4I, Variant::VECTOR4I); + register_op>(Variant::OP_MULTIPLY, Variant::VECTOR4I, Variant::INT); + register_op>(Variant::OP_MULTIPLY, Variant::VECTOR4I, Variant::FLOAT); + register_op>(Variant::OP_MULTIPLY, Variant::QUATERNION, Variant::QUATERNION); register_op>(Variant::OP_MULTIPLY, Variant::QUATERNION, Variant::INT); register_op>(Variant::OP_MULTIPLY, Variant::QUATERNION, Variant::FLOAT); @@ -264,6 +344,11 @@ void Variant::_register_variant_operators() { register_op, Transform3D, Vector>>(Variant::OP_MULTIPLY, Variant::TRANSFORM3D, Variant::PACKED_VECTOR3_ARRAY); register_op, Vector, Transform3D>>(Variant::OP_MULTIPLY, Variant::PACKED_VECTOR3_ARRAY, Variant::TRANSFORM3D); + register_op>(Variant::OP_MULTIPLY, Variant::PROJECTION, Variant::VECTOR4); + register_op>(Variant::OP_MULTIPLY, Variant::VECTOR4, Variant::PROJECTION); + + register_op>(Variant::OP_MULTIPLY, Variant::PROJECTION, Variant::PROJECTION); + register_op>(Variant::OP_MULTIPLY, Variant::BASIS, Variant::BASIS); register_op>(Variant::OP_MULTIPLY, Variant::BASIS, Variant::INT); register_op>(Variant::OP_MULTIPLY, Variant::BASIS, Variant::FLOAT); @@ -309,6 +394,14 @@ void Variant::_register_variant_operators() { register_op>(Variant::OP_DIVIDE, Variant::VECTOR3I, Variant::FLOAT); register_op>(Variant::OP_DIVIDE, Variant::VECTOR3I, Variant::INT); + register_op>(Variant::OP_DIVIDE, Variant::VECTOR4, Variant::VECTOR4); + register_op>(Variant::OP_DIVIDE, Variant::VECTOR4, Variant::FLOAT); + register_op>(Variant::OP_DIVIDE, Variant::VECTOR4, Variant::INT); + + register_op>(Variant::OP_DIVIDE, Variant::VECTOR4I, Variant::VECTOR4I); + register_op>(Variant::OP_DIVIDE, Variant::VECTOR4I, Variant::FLOAT); + register_op>(Variant::OP_DIVIDE, Variant::VECTOR4I, Variant::INT); + register_op>(Variant::OP_DIVIDE, Variant::QUATERNION, Variant::FLOAT); register_op>(Variant::OP_DIVIDE, Variant::QUATERNION, Variant::INT); @@ -323,6 +416,9 @@ void Variant::_register_variant_operators() { register_op>(Variant::OP_MODULE, Variant::VECTOR3I, Variant::VECTOR3I); register_op>(Variant::OP_MODULE, Variant::VECTOR3I, Variant::INT); + register_op>(Variant::OP_MODULE, Variant::VECTOR4I, Variant::VECTOR4I); + register_op>(Variant::OP_MODULE, Variant::VECTOR4I, Variant::INT); + register_op(Variant::OP_MODULE, Variant::STRING, Variant::NIL); register_op>(Variant::OP_MODULE, Variant::STRING, Variant::BOOL); @@ -335,12 +431,15 @@ void Variant::_register_variant_operators() { register_op>(Variant::OP_MODULE, Variant::STRING, Variant::RECT2I); register_op>(Variant::OP_MODULE, Variant::STRING, Variant::VECTOR3); register_op>(Variant::OP_MODULE, Variant::STRING, Variant::VECTOR3I); + register_op>(Variant::OP_MODULE, Variant::STRING, Variant::VECTOR4); + register_op>(Variant::OP_MODULE, Variant::STRING, Variant::VECTOR4I); register_op>(Variant::OP_MODULE, Variant::STRING, Variant::TRANSFORM2D); register_op>(Variant::OP_MODULE, Variant::STRING, Variant::PLANE); register_op>(Variant::OP_MODULE, Variant::STRING, Variant::QUATERNION); register_op>(Variant::OP_MODULE, Variant::STRING, Variant::AABB); register_op>(Variant::OP_MODULE, Variant::STRING, Variant::BASIS); register_op>(Variant::OP_MODULE, Variant::STRING, Variant::TRANSFORM3D); + register_op>(Variant::OP_MODULE, Variant::STRING, Variant::PROJECTION); register_op>(Variant::OP_MODULE, Variant::STRING, Variant::COLOR); register_op>(Variant::OP_MODULE, Variant::STRING, Variant::STRING_NAME); @@ -372,6 +471,8 @@ void Variant::_register_variant_operators() { register_op>(Variant::OP_NEGATE, Variant::VECTOR2I, Variant::NIL); register_op>(Variant::OP_NEGATE, Variant::VECTOR3, Variant::NIL); register_op>(Variant::OP_NEGATE, Variant::VECTOR3I, Variant::NIL); + register_op>(Variant::OP_NEGATE, Variant::VECTOR4, Variant::NIL); + register_op>(Variant::OP_NEGATE, Variant::VECTOR4I, Variant::NIL); register_op>(Variant::OP_NEGATE, Variant::QUATERNION, Variant::NIL); register_op>(Variant::OP_NEGATE, Variant::PLANE, Variant::NIL); register_op>(Variant::OP_NEGATE, Variant::COLOR, Variant::NIL); @@ -382,6 +483,8 @@ void Variant::_register_variant_operators() { register_op>(Variant::OP_POSITIVE, Variant::VECTOR2I, Variant::NIL); register_op>(Variant::OP_POSITIVE, Variant::VECTOR3, Variant::NIL); register_op>(Variant::OP_POSITIVE, Variant::VECTOR3I, Variant::NIL); + register_op>(Variant::OP_POSITIVE, Variant::VECTOR4, Variant::NIL); + register_op>(Variant::OP_POSITIVE, Variant::VECTOR4I, Variant::NIL); register_op>(Variant::OP_POSITIVE, Variant::QUATERNION, Variant::NIL); register_op>(Variant::OP_POSITIVE, Variant::PLANE, Variant::NIL); register_op>(Variant::OP_POSITIVE, Variant::COLOR, Variant::NIL); @@ -409,11 +512,14 @@ void Variant::_register_variant_operators() { register_op>(Variant::OP_EQUAL, Variant::VECTOR3, Variant::VECTOR3); register_op>(Variant::OP_EQUAL, Variant::VECTOR3I, Variant::VECTOR3I); register_op>(Variant::OP_EQUAL, Variant::TRANSFORM2D, Variant::TRANSFORM2D); + register_op>(Variant::OP_EQUAL, Variant::VECTOR4, Variant::VECTOR4); + register_op>(Variant::OP_EQUAL, Variant::VECTOR4I, Variant::VECTOR4I); register_op>(Variant::OP_EQUAL, Variant::PLANE, Variant::PLANE); register_op>(Variant::OP_EQUAL, Variant::QUATERNION, Variant::QUATERNION); register_op>(Variant::OP_EQUAL, Variant::AABB, Variant::AABB); register_op>(Variant::OP_EQUAL, Variant::BASIS, Variant::BASIS); register_op>(Variant::OP_EQUAL, Variant::TRANSFORM3D, Variant::TRANSFORM3D); + register_op>(Variant::OP_EQUAL, Variant::PROJECTION, Variant::PROJECTION); register_op>(Variant::OP_EQUAL, Variant::COLOR, Variant::COLOR); register_op>(Variant::OP_EQUAL, Variant::STRING_NAME, Variant::STRING); @@ -451,6 +557,8 @@ void Variant::_register_variant_operators() { register_op>(Variant::OP_EQUAL, Variant::RECT2I, Variant::NIL); register_op>(Variant::OP_EQUAL, Variant::VECTOR3, Variant::NIL); register_op>(Variant::OP_EQUAL, Variant::VECTOR3I, Variant::NIL); + register_op>(Variant::OP_EQUAL, Variant::VECTOR4, Variant::NIL); + register_op>(Variant::OP_EQUAL, Variant::VECTOR4I, Variant::NIL); register_op>(Variant::OP_EQUAL, Variant::TRANSFORM2D, Variant::NIL); register_op>(Variant::OP_EQUAL, Variant::PLANE, Variant::NIL); register_op>(Variant::OP_EQUAL, Variant::QUATERNION, Variant::NIL); @@ -485,6 +593,8 @@ void Variant::_register_variant_operators() { register_op>(Variant::OP_EQUAL, Variant::NIL, Variant::RECT2I); register_op>(Variant::OP_EQUAL, Variant::NIL, Variant::VECTOR3); register_op>(Variant::OP_EQUAL, Variant::NIL, Variant::VECTOR3I); + register_op>(Variant::OP_EQUAL, Variant::NIL, Variant::VECTOR4); + register_op>(Variant::OP_EQUAL, Variant::NIL, Variant::VECTOR4I); register_op>(Variant::OP_EQUAL, Variant::NIL, Variant::TRANSFORM2D); register_op>(Variant::OP_EQUAL, Variant::NIL, Variant::PLANE); register_op>(Variant::OP_EQUAL, Variant::NIL, Variant::QUATERNION); @@ -522,12 +632,15 @@ void Variant::_register_variant_operators() { register_op>(Variant::OP_NOT_EQUAL, Variant::RECT2I, Variant::RECT2I); register_op>(Variant::OP_NOT_EQUAL, Variant::VECTOR3, Variant::VECTOR3); register_op>(Variant::OP_NOT_EQUAL, Variant::VECTOR3I, Variant::VECTOR3I); + register_op>(Variant::OP_NOT_EQUAL, Variant::VECTOR4, Variant::VECTOR4); + register_op>(Variant::OP_NOT_EQUAL, Variant::VECTOR4I, Variant::VECTOR4I); register_op>(Variant::OP_NOT_EQUAL, Variant::TRANSFORM2D, Variant::TRANSFORM2D); register_op>(Variant::OP_NOT_EQUAL, Variant::PLANE, Variant::PLANE); register_op>(Variant::OP_NOT_EQUAL, Variant::QUATERNION, Variant::QUATERNION); register_op>(Variant::OP_NOT_EQUAL, Variant::AABB, Variant::AABB); register_op>(Variant::OP_NOT_EQUAL, Variant::BASIS, Variant::BASIS); register_op>(Variant::OP_NOT_EQUAL, Variant::TRANSFORM3D, Variant::TRANSFORM3D); + register_op>(Variant::OP_NOT_EQUAL, Variant::PROJECTION, Variant::PROJECTION); register_op>(Variant::OP_NOT_EQUAL, Variant::COLOR, Variant::COLOR); register_op>(Variant::OP_NOT_EQUAL, Variant::STRING_NAME, Variant::STRING); @@ -566,6 +679,8 @@ void Variant::_register_variant_operators() { register_op>(Variant::OP_NOT_EQUAL, Variant::VECTOR3, Variant::NIL); register_op>(Variant::OP_NOT_EQUAL, Variant::VECTOR3I, Variant::NIL); register_op>(Variant::OP_NOT_EQUAL, Variant::TRANSFORM2D, Variant::NIL); + register_op>(Variant::OP_NOT_EQUAL, Variant::VECTOR4, Variant::NIL); + register_op>(Variant::OP_NOT_EQUAL, Variant::VECTOR4I, Variant::NIL); register_op>(Variant::OP_NOT_EQUAL, Variant::PLANE, Variant::NIL); register_op>(Variant::OP_NOT_EQUAL, Variant::QUATERNION, Variant::NIL); register_op>(Variant::OP_NOT_EQUAL, Variant::AABB, Variant::NIL); @@ -599,6 +714,8 @@ void Variant::_register_variant_operators() { register_op>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::RECT2I); register_op>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::VECTOR3); register_op>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::VECTOR3I); + register_op>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::VECTOR4); + register_op>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::VECTOR4I); register_op>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::TRANSFORM2D); register_op>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::PLANE); register_op>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::QUATERNION); @@ -634,6 +751,8 @@ void Variant::_register_variant_operators() { register_op>(Variant::OP_LESS, Variant::VECTOR2I, Variant::VECTOR2I); register_op>(Variant::OP_LESS, Variant::VECTOR3, Variant::VECTOR3); register_op>(Variant::OP_LESS, Variant::VECTOR3I, Variant::VECTOR3I); + register_op>(Variant::OP_LESS, Variant::VECTOR4, Variant::VECTOR4); + register_op>(Variant::OP_LESS, Variant::VECTOR4I, Variant::VECTOR4I); register_op>(Variant::OP_LESS, Variant::RID, Variant::RID); register_op>(Variant::OP_LESS, Variant::ARRAY, Variant::ARRAY); @@ -647,6 +766,8 @@ void Variant::_register_variant_operators() { register_op>(Variant::OP_LESS_EQUAL, Variant::VECTOR2I, Variant::VECTOR2I); register_op>(Variant::OP_LESS_EQUAL, Variant::VECTOR3, Variant::VECTOR3); register_op>(Variant::OP_LESS_EQUAL, Variant::VECTOR3I, Variant::VECTOR3I); + register_op>(Variant::OP_LESS_EQUAL, Variant::VECTOR4, Variant::VECTOR4); + register_op>(Variant::OP_LESS_EQUAL, Variant::VECTOR4I, Variant::VECTOR4I); register_op>(Variant::OP_LESS_EQUAL, Variant::RID, Variant::RID); register_op>(Variant::OP_LESS_EQUAL, Variant::ARRAY, Variant::ARRAY); @@ -661,6 +782,8 @@ void Variant::_register_variant_operators() { register_op>(Variant::OP_GREATER, Variant::VECTOR2I, Variant::VECTOR2I); register_op>(Variant::OP_GREATER, Variant::VECTOR3, Variant::VECTOR3); register_op>(Variant::OP_GREATER, Variant::VECTOR3I, Variant::VECTOR3I); + register_op>(Variant::OP_GREATER, Variant::VECTOR4, Variant::VECTOR4); + register_op>(Variant::OP_GREATER, Variant::VECTOR4I, Variant::VECTOR4I); register_op>(Variant::OP_GREATER, Variant::RID, Variant::RID); register_op>(Variant::OP_GREATER, Variant::ARRAY, Variant::ARRAY); @@ -674,6 +797,8 @@ void Variant::_register_variant_operators() { register_op>(Variant::OP_GREATER_EQUAL, Variant::VECTOR2I, Variant::VECTOR2I); register_op>(Variant::OP_GREATER_EQUAL, Variant::VECTOR3, Variant::VECTOR3); register_op>(Variant::OP_GREATER_EQUAL, Variant::VECTOR3I, Variant::VECTOR3I); + register_op>(Variant::OP_GREATER_EQUAL, Variant::VECTOR4, Variant::VECTOR4); + register_op>(Variant::OP_GREATER_EQUAL, Variant::VECTOR4I, Variant::VECTOR4I); register_op>(Variant::OP_GREATER_EQUAL, Variant::RID, Variant::RID); register_op>(Variant::OP_GREATER_EQUAL, Variant::ARRAY, Variant::ARRAY); @@ -788,12 +913,15 @@ void Variant::_register_variant_operators() { register_op>(Variant::OP_IN, Variant::RECT2I, Variant::DICTIONARY); register_op>(Variant::OP_IN, Variant::VECTOR3, Variant::DICTIONARY); register_op>(Variant::OP_IN, Variant::VECTOR3I, Variant::DICTIONARY); + register_op>(Variant::OP_IN, Variant::VECTOR4, Variant::DICTIONARY); + register_op>(Variant::OP_IN, Variant::VECTOR4I, Variant::DICTIONARY); register_op>(Variant::OP_IN, Variant::TRANSFORM2D, Variant::DICTIONARY); register_op>(Variant::OP_IN, Variant::PLANE, Variant::DICTIONARY); register_op>(Variant::OP_IN, Variant::QUATERNION, Variant::DICTIONARY); register_op>(Variant::OP_IN, Variant::AABB, Variant::DICTIONARY); register_op>(Variant::OP_IN, Variant::BASIS, Variant::DICTIONARY); register_op>(Variant::OP_IN, Variant::TRANSFORM3D, Variant::DICTIONARY); + register_op>(Variant::OP_IN, Variant::PROJECTION, Variant::DICTIONARY); register_op>(Variant::OP_IN, Variant::COLOR, Variant::DICTIONARY); register_op>(Variant::OP_IN, Variant::STRING_NAME, Variant::DICTIONARY); @@ -825,12 +953,15 @@ void Variant::_register_variant_operators() { register_op>(Variant::OP_IN, Variant::RECT2I, Variant::ARRAY); register_op>(Variant::OP_IN, Variant::VECTOR3, Variant::ARRAY); register_op>(Variant::OP_IN, Variant::VECTOR3I, Variant::ARRAY); + register_op>(Variant::OP_IN, Variant::VECTOR4, Variant::ARRAY); + register_op>(Variant::OP_IN, Variant::VECTOR4I, Variant::ARRAY); register_op>(Variant::OP_IN, Variant::TRANSFORM2D, Variant::ARRAY); register_op>(Variant::OP_IN, Variant::PLANE, Variant::ARRAY); register_op>(Variant::OP_IN, Variant::QUATERNION, Variant::ARRAY); register_op>(Variant::OP_IN, Variant::AABB, Variant::ARRAY); register_op>(Variant::OP_IN, Variant::BASIS, Variant::ARRAY); register_op>(Variant::OP_IN, Variant::TRANSFORM3D, Variant::ARRAY); + register_op>(Variant::OP_IN, Variant::PROJECTION, Variant::ARRAY); register_op>(Variant::OP_IN, Variant::COLOR, Variant::ARRAY); register_op>(Variant::OP_IN, Variant::STRING_NAME, Variant::ARRAY); -- cgit v1.2.3