EHS/include/ehs/io/model/Vertex.h
Karutoh bcd71cf2b5
All checks were successful
Build & Release / Windows-AMD64-Build (push) Successful in 1m8s
Build & Release / Linux-AMD64-Build (push) Successful in 1m30s
Build & Release / Linux-AARCH64-Build (push) Successful in 3m21s
Adjusted workflow.
2024-02-05 22:25:30 -08:00

50 lines
1.1 KiB
C++

#pragma once
#include "ehs/EHS.h"
#include "ehs/Vec4.h"
#include "ehs/Vec3.h"
#include "ehs/Vec2.h"
#include "ehs/Color4.h"
namespace ehs
{
template<typename T = float>
class Vertex
{
public:
Vec3<T> pos;
Vec3<T> normal;
Vec2<T> uv;
Vec3<T> tan;
Vec3<T> bTan;
Vec4<UInt_8> bones;
Vec4<float> weights;
Vertex() = default;
Vertex(const Vec3<T>& pos)
: pos(pos), bones{0, 0, 0, 0}, weights{0.0f, 0.0f, 0.0f, 0.0f}
{
}
Vertex(const Vec3<T>& pos, const Vec3<T>& normal)
: pos(pos), normal(normal), bones{0, 0, 0, 0}, weights{0.0f, 0.0f, 0.0f, 0.0f}
{
}
Vertex(const Vec3<T>& pos, const Vec3<T>& normal, const Vec2<T>& uv)
: pos(pos), normal(normal), uv(uv), bones{0, 0, 0, 0}, weights{0.0f, 0.0f, 0.0f, 0.0f}
{
}
Vertex(const Vertex& vert)
: pos(vert.pos), normal(vert.normal), uv(vert.uv), bones(vert.bones), weights(vert.weights)
{
}
Vertex& operator=(const Vertex& vert) = default;
};
typedef Vertex<double> Vertex_d;
typedef Vertex<float> Vertex_f;
}