more simple J2D/J3D funcs (#166)

* more simple J2D/J3D funcs

* JPABaseShape constructor

* fmt

Co-authored-by: lepelog <25211966+lepelog@users.noreply.github.com>
This commit is contained in:
Jasper St. Pierre
2021-12-06 06:51:53 -05:00
committed by GitHub
parent f7916ebde1
commit c15d8fcb3e
168 changed files with 1976 additions and 4562 deletions
+21 -6
View File
@@ -1,6 +1,7 @@
#ifndef JGEOMETRY_H
#define JGEOMETRY_H
#include "dolphin/mtx/vec.h"
#include "dolphin/types.h"
namespace JGeometry {
@@ -10,15 +11,29 @@ struct TVec3 {
T x;
T y;
T z;
};
/*
template <>
struct TVec3<f32> {
TVec3(Vec& v) {
void set(const TVec3& other) {
x = other.x;
y = other.y;
z = other.z;
}
};
template <>
struct TVec3<f32> {
f32 x;
f32 y;
f32 z;
operator Vec*() { return (Vec*)&x; }
operator const Vec*() const { return (Vec*)&x; }
void set(const TVec3<f32>& other) {
x = other.x;
y = other.y;
z = other.z;
}
};
*/
template <typename T>
struct TVec2 {