加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

Cocos2d-x结构学习(九)ccV3F_C4B_T2F_Quad、ccV3F_C4B_T2F、cc

发布时间:2020-12-14 20:41:51 所属栏目:百科 来源:网络整理
导读:1、ccV3F_C4B_T2F_Quad:保存四个元素的结构 typedef struct _ccV3F_C4B_T2F_Quad{ ccV3F_C4B_T2F tl; //top-left ccV3F_C4B_T2F bl; //bottom-left ccV3F_C4B_T2F tr; //top-right ccV3F_C4B_T2F br; //bottom-right} ccV3F_C4B_T2F_Quad; 2、ccV3F_C4B_T2F
1、ccV3F_C4B_T2F_Quad:保存四个元素的结构
typedef struct _ccV3F_C4B_T2F_Quad
{
    ccV3F_C4B_T2F    tl;     //top-left
    ccV3F_C4B_T2F    bl;     //bottom-left
    ccV3F_C4B_T2F    tr;     //top-right
    ccV3F_C4B_T2F    br;    //bottom-right
} ccV3F_C4B_T2F_Quad;
2、ccV3F_C4B_T2F
typedef struct _ccV3F_C4B_T2F
{
    ccVertex3F        vertices;     //顶点
    ccColor4B        colors;            //颜色
    ccTex2F            texCoords;      //纹理
} ccV3F_C4B_T2F;
3、ccVertex3F
typedef struct _ccVertex3F
{
    GLfloat x;
    GLfloat y;
    GLfloat z;
} ccVertex3F;
4、ccColor4B
typedef struct _ccColor4B
{
    GLubyte r;
    GLubyte g;
    GLubyte b;
    GLubyte a;
} ccColor4B;
5、ccTex2F
typedef struct _ccTex2F {
     GLfloat u;
     GLfloat v;
} ccTex2F;

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读