Transform.h
Transform.h
CPP1/* Copyright Statement:2 *3 * (C) 2021-2025 Cubios Inc. All rights reserved.4 */56#ifndef WASMLIBS_CPP_TRANSFORM_H_7#define WASMLIBS_CPP_TRANSFORM_H_89#include "Vec2.h"1011namespace Cubios12{13namespace Math14{15class Transform16{17public:18 Transform():Position(0,0),Rotation(0),Mirroring(0),ScaleX(100),ScaleY(100){}19 Transform(float x, float y): Position(x,y),Rotation(0),Mirroring(0),ScaleX(100),ScaleY(100){}20 Transform(float x, float y, unsigned int a): Position(x,y),Rotation(a),Mirroring(0),ScaleX(100),ScaleY(100){}21 Transform(float x, float y, unsigned int a, unsigned int sx, unsigned int sy ): Position(x,y),Rotation(a),Mirroring(0),ScaleX(sx),ScaleY(sy){}22 Transform(float x, float y, unsigned int a, unsigned int m): Position(x,y),Rotation(a),Mirroring(m),ScaleX(100),ScaleY(100){}23 Transform(float x, float y, unsigned int a, unsigned int sx, unsigned int sy, unsigned int m): Position(x,y),Rotation(a),Mirroring(m),ScaleX(sx),ScaleY(sy){}24 Transform(const Transform& t): Position(t.Position),Rotation(t.Rotation),Mirroring(t.Mirroring),ScaleX(t.ScaleX),ScaleY(t.ScaleY){}2526 int SafeRotation() {return (360 + this->Rotation%360) % 360;}2728 Vec2 Position;29 int Rotation;30 unsigned int ScaleX;31 unsigned int ScaleY;32 unsigned int Mirroring;33};34}35}36#endif /* WASMLIBS_CPP_TRANSFORM_H_ */37
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.