本文整理汇总了C++中witcher::Object::getPosition方法的典型用法代码示例。如果您正苦于以下问题:C++ Object::getPosition方法的具体用法?C++ Object::getPosition怎么用?C++ Object::getPosition使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类witcher::Object
的用法示例。
在下文中一共展示了Object::getPosition方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getPosition
void Functions::getPosition(Aurora::NWScript::FunctionContext &ctx) {
ctx.getReturn().setVector(0.0f, 0.0f, 0.0f);
Witcher::Object *object = Witcher::ObjectContainer::toObject(getParamObject(ctx, 0));
if (!object)
return;
float x, y, z;
object->getPosition(x, y, z);
ctx.getReturn().setVector(x, y, z);
}
示例2: actionMoveToObject
void Functions::actionMoveToObject(Aurora::NWScript::FunctionContext &ctx) {
Witcher::Object *object = Witcher::ObjectContainer::toObject(ctx.getCaller());
Witcher::Object *moveTo = Witcher::ObjectContainer::toObject(getParamObject(ctx, 0));
if (!object || !moveTo)
return;
float x, y, z;
moveTo->getPosition(x, y, z);
jumpTo(object, moveTo->getArea(), x, y, z);
unimplementedFunction(ctx);
}
示例3: jumpToObject
void Functions::jumpToObject(Aurora::NWScript::FunctionContext &ctx) {
// TODO: walkStraightLineToPoint
// bool walkStraightLineToPoint = ctx.getParams()[1].getInt() != 0;
Witcher::Object *object = Witcher::ObjectContainer::toObject(ctx.getCaller());
Witcher::Object *moveTo = Witcher::ObjectContainer::toObject(getParamObject(ctx, 0));
if (!object || !moveTo)
return;
float x, y, z;
moveTo->getPosition(x, y, z);
jumpTo(object, moveTo->getArea(), x, y, z);
}
示例4: getDistance
float ObjectDistanceSort::getDistance(Witcher::Object &a) {
float x, y, z;
a.getPosition(x, y, z);
return ABS(x - xt) + ABS(y - yt) + ABS(z - zt);
}
示例5:
ObjectDistanceSort::ObjectDistanceSort(const Witcher::Object &target) {
target.getPosition(xt, yt, zt);
}