本文整理汇总了C++中ogre::Camera::move方法的典型用法代码示例。如果您正苦于以下问题:C++ Camera::move方法的具体用法?C++ Camera::move怎么用?C++ Camera::move使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ogre::Camera
的用法示例。
在下文中一共展示了Camera::move方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: moveRel
// Move the player relative to her own position and
// orientation. After the call, the new position is returned.
void moveRel(float &relX, float &relY, float &relZ)
{
using namespace Ogre;
// Move camera relative to its own direction
camera->moveRelative(Vector3(relX,0,relZ));
// Up/down movement is always done relative the world axis.
camera->move(Vector3(0,relY,0));
// Get new camera position, converting back to MW coords.
Vector3 pos = camera->getPosition();
relX = pos[0];
relY = -pos[2];
relZ = pos[1];
// TODO: Collision detection must be used to find the REAL new
// position.
// Set the position
setPos(relX, relY, relZ);
}
示例2: camera_move
//Ogre::Camera::move(Ogre::Vector3 const&)
void camera_move(CameraHandle handle, const float x, const float y, const float z)
{
Ogre::Camera* camera = static_cast<Ogre::Camera*>(handle);
camera->move(Ogre::Vector3(x, y, z));
}