加入 Node节点类 还未测试新框架
This commit is contained in:
@@ -27,13 +27,13 @@
|
||||
#include <math/EaseFunctions.h>
|
||||
#include <math/Scalar.h>
|
||||
|
||||
|
||||
using Vec2 = ember::math::Vec2T<float>;
|
||||
using VecPos = ember::math::Vec2T<int>;
|
||||
using Rect = ember::math::RectT<float>;
|
||||
using Matrix3x2 = ember::math::Matrix3x2T<float>;
|
||||
using Transform = ember::math::TransformT<float>;
|
||||
|
||||
using GlMatrix = std::array<float, 16>;
|
||||
|
||||
using Point = Vec2;
|
||||
using Size = Vec2;
|
||||
|
||||
@@ -20,8 +20,12 @@
|
||||
|
||||
#pragma once
|
||||
#include <algorithm>
|
||||
#include <cstdint>
|
||||
#include <math/Rect.hpp>
|
||||
#include <math/Vec2.hpp>
|
||||
#include <glm/glm.hpp>
|
||||
#include <glm/ext/matrix_clip_space.hpp>
|
||||
#include <glm/gtc/type_ptr.hpp>
|
||||
|
||||
namespace ember
|
||||
{
|
||||
@@ -34,7 +38,7 @@ namespace ember
|
||||
struct Matrix3x2T
|
||||
{
|
||||
using ValueType = _Ty;
|
||||
using Vec2Type = Vec2T<ValueType>;
|
||||
using Vec2Type = glm::vec2;
|
||||
using RectType = RectT<ValueType>;
|
||||
|
||||
union
|
||||
@@ -160,13 +164,13 @@ namespace ember
|
||||
return RectType{left, top, right, bottom};
|
||||
}
|
||||
|
||||
inline void Translate(const Vec2Type &v)
|
||||
inline void Translate(const glm::vec2 &v)
|
||||
{
|
||||
_31 += _11 * v.x + _21 * v.y;
|
||||
_32 += _12 * v.x + _22 * v.y;
|
||||
}
|
||||
|
||||
static inline Matrix3x2T Translation(const Vec2Type &v)
|
||||
static inline Matrix3x2T Translation(const glm::vec2 &v)
|
||||
{
|
||||
return Matrix3x2T(1.f, 0.f, 0.f, 1.f, v.x, v.y);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user