位置: 编程技术 - 正文

类型/结构定义(结构 类型)

编辑:rootadmin

推荐整理分享类型/结构定义(结构 类型),希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:结构类型和结构类型名,结构类型和结构形式,结构类型和结构形式,结构类型怎么写,结构类型和结构类型名,结构类型和结构类型名,结构类型的定义,结构类型的定义,内容如对您有帮助,希望把文章链接给更多的朋友!

ccColor3B RGB byte型颜色结构体, 构造方法, 常量定义

// RGB颜色结构体 byte型typedef struct ccColor3B{r,g,b}static inline ccColor3B ccc3(r, g, b) // 白色static const ccColor3B ccWHITE = {,,}// 黄色static const ccColor3B ccYELLOW = {,,0};// 蓝色static const ccColor3B ccBLUE = {0,0,};// 绿色static const ccColor3B ccGREEN = {0,,0};// 黄色static const ccColor3B ccRED = {,0,0};// 紫红色static const ccColor3B ccMAGENTA = {,0,};// 黑色static const ccColor3B ccBLACK = {0,0,0};// 桔黄色static const ccColor3B ccORANGE = {,,0};// 灰色static const ccColor3B ccGRAY = {,,};

ccColor4B RGBA字节颜色结构体, 构造方法

typedef struct ccColor4B{r,g,b,a}static inline ccColor4B ccc4(r,g,b,a)

ccColor4F RGBA浮点颜色结构体, 构造方法

typedef struct ccColor4F{r,g,b,a}static inline ccColor4F ccc4f(r,g,b,a)static inline ccColor4F ccc4FFromccc3B(ccColor3B c)static inline ccColor4F ccc4FFromccc4B(ccColor4B c)static inline BOOL ccc4FEqual(ccColor4F a, ccColor4F b)

ccVertex2F/3F 浮点数 顶点坐标结构体

typedef struct ccVertex2F{x,y}typedef struct ccVertex3F{x,y,z}

ccTex2F 浮点数 纹理坐标结构体

typedef struct ccTex2F{u,v}

ccPointSprite

typedef struct ccPointSprite{pos,color,size}

ccQuad2/3

typedef struct ccQuad2{ ccVertex2F tl, ccVertex2F tr, ccVertex2F bl, ccVertex2F br} typedef struct ccQuad3{ ccVertex3F tl, ccVertex3F tr, ccVertex3F bl, ccVertex3F br}

ccGridSize

typedef struct ccGridSize{x,y}static inline ccGridSize ccg(x, y)类型/结构定义(结构 类型)

ccV2F_C4B/F_T2F

typedef struct ccV2F_C4B_T2F{ ccVertex2F vertices; ccColor4B colors; ccTex2F texCoords;} typedef struct ccV2F_C4F_T2F{ ccVertex2F vertices; ccColor4F colors; ccTex2F texCoords;}

ccV3/2F_C4F/B_T2F_Quad

typedef struct ccV2F_C4B_T2F_Quad{ ccV2F_C4B_T2F bl; ccV2F_C4B_T2F br; ccV2F_C4B_T2F tl; ccV2F_C4B_T2F tr;} typedef struct ccV3F_C4B_T2F_Quad{ ccV3F_C4B_T2F bl; ccV3F_C4B_T2F br; ccV3F_C4B_T2F tl; ccV3F_C4B_T2F tr;} typedef struct ccV3F_C4f_T2F_Quad{ ccV3F_C4f_T2F bl; ccV3F_C4f_T2F br; ccV3F_C4f_T2F tl; ccV3F_C4f_T2F tr;}

ccBlendFunc 混合函数

typedef struct ccBlendFunc{ GLenum src; GLenum dst;}

ccResolutionType 分辨率参数

typedef enum{ kCCResolutionUnknown, kCCResolutionIPhone, kCCResolutionIPhoneRetinaDisplay, kCCResolutionIPad, kCCResolutionIpadRetinaDisplay,} ccResolutionType

CCVerticalTextAlignment 文本垂直对齐参数

typedef enum{ kCCVerticalTextAlignmentTop, kCCVerticalTextAlignmentCenter, kCCVerticalTextAlignmentBottom}CCVerticalTextAlignment

CCTextAlignment 文本水平对齐参数

typedef enum{ kCCTextAlignmentLeft, kCCTextAlignmentCenter, kCCTextAlignmentRight,}CCTextAlignment

CCLineBreakMode 文本断行模式参数

typedef enum{ kCCLineBreakModeWordWrap, kCCLineBreakModeCharacterWrap, kCCLineBreakModeClip, kCCLineBreakModeHeadTruncation, kCCLineBreakModeTailTruncation, kCCLineBreakModeMiddleTruncation}CCLineBreakMode

ccTime 浮点数 间隔时间类型 如果需要更高的精度可以改成double

typedef float ccTime;

ccMat4[]

typedef float ccMat4[];尊重原创,源地址:

cocos2dx在不同安卓机型下scrollview裁剪失败 最近项目上遇到个问题一直困扰着我,我用cocossstudio做了一个uiscrollview,结果在pc和大部分安卓手机上都能完美运行,但是在有些机型(我用小米4,三

--原版飞机大战(含源码) 都好几天没写博客了,主要是这几天真的没做什么,事儿多,也懒了,发现自己真的是逻辑思维能力需要锻炼,而且要认真锻炼前几天做了个飞机大战

cocos2dx 3.5 ”hello world“解析 cocos2dx3.5工程下自带的helloworld程序目录如下:先看看main.h和main.cpp:#ifndef__MAIN_H__#define__MAIN_H__#defineWIN_LEAN_AND_MEAN//Excluderarely-usedstufffromWindowsheaders//WindowsH

本文链接地址:https://www.jiuchutong.com/biancheng/368849.html 转载请保留说明!

上一篇:Cocostudio UI进阶(cocos studio)

下一篇:cocos2dx在不同安卓机型下scrollview裁剪失败

免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

鄂ICP备2023003026号

网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

友情链接: 武汉网站建设 电脑维修 湖南楚通运网络