WOWCube Docs logo
WOWCube Docs
Mission Control
Section Shortcuts
APIExamplesSourceWOWConnectChangelog
Filters
SDK and language defaults persist in cookies.
SDK version
Navigation Tree
Collapsed by default, focused on the active path.
Made byMcKay Seamons
GitHub
  1. Home
  2. Docs
  3. Source
  4. Transform.h
Mission NodeSDK 6.2C++math

Transform.h

SDK Source File: Transform.h

Source / SDK 6.2 / C++ / math

Transform.h

Transform.h
CPP
1/* Copyright Statement:
2 *
3 * (C) 2021-2024 Cubios Inc. All rights reserved.
4 */
5
6#ifndef WASMLIBS_CPP_TRANSFORM_H_
7#define WASMLIBS_CPP_TRANSFORM_H_
8
9#include "Vec2.h"
10
11namespace Cubios
12{
13namespace Math
14{
15class Transform
16{
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){}
25
26 int SafeRotation() {return (360 + this->Rotation%360) % 360;}
27
28 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.
Context Rail

Related nodes

Color.h
Source / SDK 6.2 / C++ / math
Math.h
Source / SDK 6.2 / C++ / math
Rect2.h
Source / SDK 6.2 / C++ / math
Vec2.h
Source / SDK 6.2 / C++ / math
Previous Node
Rect2.h
Source / SDK 6.2 / C++ / math
Next Node
Vec2.h
Source / SDK 6.2 / C++ / math