AeThex-Engine-Core/engine/thirdparty/msdfgen/core/Projection.cpp
MrPiglr 9dddce666d
🚀 AeThex Engine v1.0 - Complete Fork
- Forked from Godot Engine 4.7-dev (MIT License)
- Rebranded to AeThex Engine with cyan/purple theme
- Added AI-powered development assistant module
- Integrated Claude API for code completion & error fixing
- Custom hexagon logo and branding
- Multi-platform CI/CD (Windows, Linux, macOS)
- Built Linux editor binary (151MB)
- Complete source code with all customizations

Tech Stack:
- C++ game engine core
- AI Module: Claude 3.5 Sonnet integration
- Build: SCons, 14K+ source files
- License: MIT (Godot) + Custom (AeThex features)

Ready for Windows build via GitHub Actions!
2026-02-23 05:01:56 +00:00

42 lines
935 B
C++

#include "Projection.h"
namespace msdfgen {
Projection::Projection() : scale(1), translate(0) { }
Projection::Projection(const Vector2 &scale, const Vector2 &translate) : scale(scale), translate(translate) { }
Point2 Projection::project(const Point2 &coord) const {
return scale*(coord+translate);
}
Point2 Projection::unproject(const Point2 &coord) const {
return coord/scale-translate;
}
Vector2 Projection::projectVector(const Vector2 &vector) const {
return scale*vector;
}
Vector2 Projection::unprojectVector(const Vector2 &vector) const {
return vector/scale;
}
double Projection::projectX(double x) const {
return scale.x*(x+translate.x);
}
double Projection::projectY(double y) const {
return scale.y*(y+translate.y);
}
double Projection::unprojectX(double x) const {
return x/scale.x-translate.x;
}
double Projection::unprojectY(double y) const {
return y/scale.y-translate.y;
}
}