ApophisZerg的vulkan游戏引擎的实现

1.math/math_types.h

#pragma once

#include "defines.h"

typedef struct vec2_u{

f32 elements[2];

struct{

union{

//The first element.

f32 x,r,s,u;

};

union{

f32 y,g,t,v;

};

};

}vec2;

typedef struct vec3_u{

union{

f32 elements[3];

struct{

union{

//The first element.

f32 x,r,s,u;

};

union{

f32 y,g,t,v;

};

union{

f32 z,b,p,w;

};

};

};

}vec3;

typedef struct vec4_u{

/* #if defined(KUSE_SIMD)

alignas(16) _m128 data;

#endif

alignas(16) f32 elements[4];

*/

union{

f32 elements[3];

struct{

union{

//The first element.

f32 x,r,s;

};

union{

f32 y,g,t;

};

union{

f32 z,b,p;

};

union{

f32 w,a,q;

};

};

};

}vec4;

typedef vec4 quat;

typedef union mat4_u{

f32 data[16];

}mat4;

typedef struct vertex_3d{

vec3 position;

}vertex_3d;

相关推荐
qq_2052790513 小时前
unity 读取PPT显示到屏幕功能
unity·游戏引擎·powerpoint
HELLOMILI1 天前
[UnrealEngine] 虚幻编辑器界面 | 虚幻界面详解 | UE5界面详解
游戏·ue5·编辑器·游戏引擎·虚幻·unreal engine
AA陈超1 天前
虚幻引擎UE5专用服务器游戏开发-32 使用Gameplay Tags阻止连招触发
c++·游戏·ue5·游戏引擎·虚幻
危险库2 天前
【UE4/UE5】在虚幻引擎中创建控制台指令的几种方法
c++·ue5·游戏引擎·ue4·虚幻
大Mod_abfun2 天前
Unity游戏基础-4(人物移动、相机移动、UI事件处理 代码详解)
游戏·ui·unity·游戏引擎
大Mod_abfun2 天前
Unity游戏基础-3(UI层)
游戏·ui·unity·游戏引擎
大有数据可视化2 天前
告别传统监控:基于Unity+IoT打造沉浸式数字孪生车间
物联网·unity·游戏引擎
雪下的新火2 天前
爆炸特效:Unity+Blender-02-火焰
unity·游戏引擎·blender·特效制作·笔记分享
雪下的新火2 天前
Unity+Blender-03-输出制作Flipbook
游戏·unity·游戏引擎·blender·资源·笔记分享
大Mod_abfun2 天前
Unity游戏基础-1(安装~工作区构建)
游戏·unity·游戏引擎·大学课程·数媒