From: Mikko Rasa Date: Sat, 12 Nov 2022 15:34:32 +0000 (+0200) Subject: Add some useful constructors for TransformValues X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=8ec00c2260b0b2a0ac5259b9a7038fad669af04c;p=libs%2Fgame.git Add some useful constructors for TransformValues --- diff --git a/source/game/transform.h b/source/game/transform.h index 6030760..05c895b 100644 --- a/source/game/transform.h +++ b/source/game/transform.h @@ -13,6 +13,13 @@ struct TransformValues LinAl::Vector position; Geometry::Quaternion rotation = Geometry::Quaternion::one(); LinAl::Vector scale = { 1.0f, 1.0f, 1.0f }; + + TransformValues() = default; + TransformValues(const LinAl::Vector &p): position(p) { } + TransformValues(const LinAl::Vector &p, const Geometry::Quaternion &r, + const LinAl::Vector &s = LinAl::Vector(1.0f, 1.0f, 1.0f)): + position(p), rotation(r), scale(s) + { } }; class Transform: public Component