⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 geometry.h

📁 psp下pmf文件播放器源码
💻 H
字号:
#ifndef common_geometry_h#define common_geometry_h#include <psptypes.h>#ifdef __cplusplusextern "C" {#endiftypedef struct{	ScePspFVector2 texture;	u32 color;	ScePspFVector3 normal;	ScePspFVector3 position;} TCNPVertex; // Texture, Color, Normal, Position#define TCNP_VERTEX_FORMAT (GU_TEXTURE_32BITF|GU_COLOR_8888|GU_NORMAL_32BITF|GU_VERTEX_32BITF)typedef struct{	ScePspFVector2 texture;	u32 color;	ScePspFVector3 position;} TCPVertex; // Texture, Color, Position#define TCP_VERTEX_FORMAT (GU_TEXTURE_32BITF|GU_COLOR_8888|GU_VERTEX_32BITF)typedef struct{	ScePspFVector2 texture;	ScePspFVector3 position;} TPVertex; // Texture, Position#define TP_VERTEX_FORMAT (GU_TEXTURE_32BITF|GU_VERTEX_32BITF)typedef struct{	ScePspFVector3 normal;	ScePspFVector3 position;} NPVertex; // Normal, Position#define NP_VERTEX_FORMAT (GU_NORMAL_32BITF|GU_VERTEX_32BITF)/*	torus memory usage	vertices: slices * rows	indices: slices * rows*/void generateTorusTCNP(unsigned int slices, unsigned int rows, float radius, float thickness, TCNPVertex* vertices, unsigned short* indices);void generateTorusTCP(unsigned int slices, unsigned int rows, float radius, float thickness, TCPVertex* vertices, unsigned short* indices);void generateTorusNP(unsigned int slices, unsigned int rows, float radius, float thickness, NPVertex* vertices, unsigned short* indices);/*	grid memory usage	vertices: slices * rows	indices (slices-1) * (rows-1)*/void generateGridTCNP(unsigned int columns, unsigned int rows, float width, float depth, TCNPVertex* vertices, unsigned short* indices);void generateGridTCP(unsigned int columns, unsigned int rows, float width, float depth, TCPVertex* vertices, unsigned short* indices);void generateGridNP(unsigned int columns, unsigned int rows, float width, float depth, NPVertex* vertices, unsigned short* indices);#ifdef __cplusplus}#endif#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -