类型/结构定义
来源:互联网 发布:英语作文批改软件 编辑:程序博客网 时间:2024/06/08 09:04
ccColor3B RGB byte型颜色结构体, 构造方法, 常量定义
// RGB颜色结构体 byte型
typedef
struct
ccColor3B{r,g,b}
static
inline
ccColor3B ccc3(r, g, b)
// 白色
static
const
ccColor3B ccWHITE = {255,255,255}
// 黄色
static
const
ccColor3B ccYELLOW = {255,255,0};
// 蓝色
static
const
ccColor3B ccBLUE = {0,0,255};
// 绿色
static
const
ccColor3B ccGREEN = {0,255,0};
// 黄色
static
const
ccColor3B ccRED = {255,0,0};
// 紫红色
static
const
ccColor3B ccMAGENTA = {255,0,255};
// 黑色
static
const
ccColor3B ccBLACK = {0,0,0};
// 桔黄色
static
const
ccColor3B ccORANGE = {255,127,0};
// 灰色
static
const
ccColor3B ccGRAY = {166,166,166};
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[16]
typedef
float
ccMat4[16];
尊重原创,源地址:http://group.cnblogs.com/topic/61274.html
0 0
- 类型/结构定义
- 结构体定义,自定义类型
- 结构类型的定义,应用
- 4.3 结构类型——类型定义
- C 开发学习 - 结构类型(枚举/结构/类型定义)
- 不完整结构类型的定义
- 关于用typedef定义结构体类型
- Linux常见协议类型结构体定义
- 结构体类型定义的一般式
- XML文档类型定义---XML Schema结构
- C程序设计语言- 结构-5.2----类型定义、联合
- XML文档类型定义---XML Schema结构
- C语言struct结构类型定义和结构变量说明
- C语言(结构体、枚举类型、类型定义)
- c语言中 结构变量,结构类型标示,结构类型定义的区别
- C++结构体类型的定义和初始化
- 结构体出现在共用体类型中定义
- (转)C++结构体类型的定义和初始化
- 欢迎使用CSDN-markdown编辑器
- Cast from pointer to smaller type 'int' loses
- android分包
- protobuf搭建环境,序列化示例
- C语言之结构体
- 类型/结构定义
- 灵活、易用、强大的TS切片和M3U8构建工具
- 使用Vitamio打造自己的Android万能播放器(12)—— 播放网络视频缓冲处理
- zoj3862 intersection[2015浙大校赛C题]
- mybatis中的日志配置
- 下雪了吗
- JAVA使用JeasyOPC读取OPC 服务器数据
- HDU 2516 取石子游戏 (斐波那契博弈)
- 第六周项目1(2)-深复制体验