Initial implementation of Quaternion type in ZScript

This commit is contained in:
RaveYard 2022-11-12 20:05:36 +01:00 committed by Christoph Oelckers
commit 31ac1bd414
7 changed files with 181 additions and 21 deletions

View file

@ -343,6 +343,7 @@ public:
bool IsVector2() const { return ValueType == TypeVector2 || ValueType == TypeFVector2; };
bool IsVector3() const { return ValueType == TypeVector3 || ValueType == TypeFVector3; };
bool IsVector4() const { return ValueType == TypeVector4 || ValueType == TypeFVector4; };
bool IsQuaternion() const { return ValueType == TypeQuaternion || ValueType == TypeFQuaternion; };
bool IsBoolCompat() const { return ValueType->isScalar(); }
bool IsObject() const { return ValueType->isObjectPointer(); }
bool IsArray() const { return ValueType->isArray() || (ValueType->isPointer() && ValueType->toPointer()->PointedType->isArray()); }
@ -577,6 +578,20 @@ public:
};
//==========================================================================
//
//
//
//==========================================================================
class FxQuaternionValue : public FxVectorValue
{
public:
FxQuaternionValue(FxExpression* x, FxExpression* y, FxExpression* z, FxExpression* w, const FScriptPosition& sc);
FxExpression* Resolve(FCompileContext&);
};
//==========================================================================
//
//