本文整理汇总了C++中SimObj::revy方法的典型用法代码示例。如果您正苦于以下问题:C++ SimObj::revy方法的具体用法?C++ SimObj::revy怎么用?C++ SimObj::revy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SimObj
的用法示例。
在下文中一共展示了SimObj::revy方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onRecvMessage
//.........这里部分代码省略.........
if (strcmp(cmd, "p")==0) {
// ----------------------------
// position set (x, y, z)
// ----------------------------
const char *param = evt.getString(1);
if (param) {
LOG_MSG(("set position (param=%s)", param));
if (parseVector3(param, x, y, z)) {
LOG_MSG(("(%f, %f, %f)", x, y, z));
o->setPosition(x, y, z);
}
}
} else if (strcmp(cmd, "vp")==0) {
// ----------------------------
// view pos
// ----------------------------
const char *param = evt.getString(1);
if (param) {
LOG_MSG(("set view position (param=%s)", param));
if (parseVector3(param, x, y, z)) {
LOG_MSG(("(%f, %f, %f)", x, y, z));
o->vpx(x);
o->vpy(y);
o->vpz(z);
}
}
} else if (strcmp(cmd, "vv")==0) {
// ----------------------------
// view vector
// ----------------------------
const char *param = evt.getString(1);
if (param) {
LOG_MSG(("set view vector (param=%s)", param));
if (parseVector3(param, x, y, z)) {
LOG_MSG(("(%f, %f, %f)", x, y, z));
o->vvx(x);
o->vvy(y);
o->vvz(z);
}
}
} else if (strcmp(cmd, "lep")==0) {
// ----------------------------
// left eye pos
// ----------------------------
const char *param = evt.getString(1);
if (param) {
LOG_MSG(("set left eye position (param=%s)", param));
if (parseVector3(param, x, y, z)) {
LOG_MSG(("(%f, %f, %f)", x, y, z));
o->lepx(x);
o->lepy(y);
o->lepz(z);
}
}
} else if (strcmp(cmd, "lev")==0) {
// ----------------------------
// left eye vector
// ----------------------------
const char *param = evt.getString(1);
if (param) {
LOG_MSG(("set left eye vector (param=%s)", param));
if (parseVector3(param, x, y, z)) {
LOG_MSG(("(%f, %f, %f)", x, y, z));
o->levx(x);
o->levy(y);
o->levz(z);
}
}
} else if (strcmp(cmd, "rep")==0) {
// ----------------------------
// right eye pos
// ----------------------------
const char *param = evt.getString(1);
if (param) {
LOG_MSG(("set right eye position (param=%s)", param));
if (parseVector3(param, x, y, z)) {
LOG_MSG(("(%f, %f, %f)", x, y, z));
o->repx(x);
o->repy(y);
o->repz(z);
}
}
} else if (strcmp(cmd, "rev")==0) {
// ----------------------------
// right eye vector
// ----------------------------
const char *param = evt.getString(1);
if (param) {
LOG_MSG(("set right eye vector (param=%s)", param));
if (parseVector3(param, x, y, z)) {
LOG_MSG(("(%f, %f, %f)", x, y, z));
o->revx(x);
o->revy(y);
o->revz(z);
}
}
}
}
}
}