cocos2d-x节点(b2TimeStep.h)API
本文来自http://blog.csdn.net/runaying ,引用必须注明出处!cocos2d-x节点(b2TimeStep.h)API温馨提醒:为了大家能更好学习,强烈推荐大家看看本人的这篇博客 Cocos2d-X权威指南笔记定义了一些数据结构,位置、向量、分析数据等///cocos2d-x-3.0alpha0/external/Box2D/Dyn
·
本文来自http://blog.csdn.net/runaying ,引用必须注明出处!
cocos2d-x节点(b2TimeStep.h)API
温馨提醒:为了大家能更好学习,强烈推荐大家看看本人的这篇博客 Cocos2d-X权威指南笔记
定义了一些数据结构,位置、向量、分析数据等
///cocos2d-x-3.0alpha0/external/Box2D/Dynamics
//定义了一些数据结构,位置、向量、分析数据等
#ifndef B2_TIME_STEP_H
#define B2_TIME_STEP_H
#include <Box2D/Common/b2Math.h>
/// 分析数据。以毫秒为单位。
struct b2Profile
{
float32 step;
float32 collide;
float32 solve;
float32 solveInit;
float32 solveVelocity;
float32 solvePosition;
float32 broadphase;
float32 solveTOI;
};
/// 这是一个内部的结构。
struct b2TimeStep
{
float32 dt; // 时间步长
float32 inv_dt; // 逆时间步长 (0 if dt == 0).
float32 dtRatio; // dt * inv_dt0
int32 velocityIterations;
int32 positionIterations;
bool warmStarting;
};
/// 这是一个内部的结构。
struct b2Position
{
b2Vec2 c;
float32 a;
};
//这是一个内部的结构。
struct b2Velocity
{
b2Vec2 v;
float32 w;
};
/// Solver(求解) Data
struct b2SolverData
{
b2TimeStep step;
b2Position* positions;
b2Velocity* velocities;
};
#endif
更多推荐
已为社区贡献113条内容
所有评论(0)