move transform to generated data

This commit is contained in:
Asuro
2025-03-31 02:01:14 +02:00
parent 29a3aaf241
commit 4ba65713ef
23 changed files with 323 additions and 190 deletions

View File

@@ -77,4 +77,17 @@ namespace Gen
Vec3 CrossProduct(Vec3 a, Vec3 b);
Vec3 CrossProductFromPlane(Vec3 a, Vec3 b, Vec3 c);
bool RayPlaneIntersect(Vec3 l1, Vec3 l2, Vec3 p1, Vec3 p2, Vec3 p3, Vec3& out);
void Translate(Transform& trans, Vec3 offset);
void TranslateLocal(Transform& trans, Vec3 offset);
void Rotate(Transform& trans, Vec3 rotation);
void RotateLocal(Transform& trans, Vec3 rotation);
Vec3 LocalToGlobalPoint(Transform& trans, Vec3 local);
Vec3 LocalToGlobalDirection(Transform& trans, Vec3 local);
Vec3 GlobalToLocalPoint(Transform& trans, Vec3 global);
Vec3 GlobalToLocalDirection(Transform& trans, Vec3 global);
Vec3 AxisRight(const Mat4& mat);
Vec3 AxisUp(const Mat4& mat);
Vec3 AxisForward(const Mat4& mat);
void UpdateMatrix(Transform& trans);
} // namespace Gen