cppast/src/refl/cpp/vertex.h

75 lines
1.5 KiB
C
Raw Normal View History

2024-04-26 19:22:14 +08:00
#pragma once
2024-04-18 22:17:22 +08:00
#include <iostream>
2024-04-26 19:22:14 +08:00
#define MAX_NUM_BONES_PER_VERTEX 4
struct TestMain1 {
__cppast(Meta = {})
float x;
__cppast(Meta = {})
float y;
__cppast(Meta = {})
float z;
};
namespace engineapi {
namespace hello {
struct TestHello{
__cppast(Meta = {})
float x;
__cppast(UIMeta = {})
float y;
__cppast(Meta = {})
float z;
};
}
struct Vector3 {
__cppast(Meta = {})
float x;
__cppast(Meta = {})
float y;
__cppast(Meta = {})
float z;
};
struct Vector2 {
__cppast(Meta = { 1.0 })
float x;
__cppast(Meta = { 2.0 })
float y;
};
struct Vertex {
2024-04-21 21:44:53 +08:00
2024-04-26 19:22:14 +08:00
};
struct PosVertex_Meta;
struct PosVertex : public Vertex {
using MyMeta = PosVertex_Meta;
__cppast(Meta = {})
Vector3 Position = {};
};
struct TexVertex_Meta;
struct TexVertex : public Vertex {
using MyMeta = TexVertex_Meta;
__cppast(Meta = {})
Vector3 Position = {};
__cppast(Meta = {})
Vector3 Normal = {};
__cppast(Meta = {})
Vector2 TexCoords = {};
};
struct BoneVertex_Meta;
struct BoneVertex : public Vertex
{
using MyMeta = BoneVertex_Meta;
__cppast(Meta = {})
Vector3 Position = {};
__cppast(Meta = {})
Vector2 TexCoords = {};
__cppast(Meta = {})
Vector3 Normal = {};
__cppast(Meta = {})
Vector3 Tangent = {};
// 骨骼蒙皮数据
__cppast(Meta = {})
float Weights[MAX_NUM_BONES_PER_VERTEX] = {};
__cppast(Meta = {})
uint32_t BoneIDs[MAX_NUM_BONES_PER_VERTEX] = {};
};
};
#include "meta_vertex_gen.inl"