本文整理汇总了C++中CamWndPtr::getCameraAngles方法的典型用法代码示例。如果您正苦于以下问题:C++ CamWndPtr::getCameraAngles方法的具体用法?C++ CamWndPtr::getCameraAngles怎么用?C++ CamWndPtr::getCameraAngles使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CamWndPtr
的用法示例。
在下文中一共展示了CamWndPtr::getCameraAngles方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: resetCameraAngles
void GlobalCameraManager::resetCameraAngles(const cmd::ArgumentList& args) {
CamWndPtr camWnd = getActiveCamWnd();
if (camWnd != NULL) {
Vector3 angles;
angles[CAMERA_ROLL] = angles[CAMERA_PITCH] = 0;
angles[CAMERA_YAW] = 22.5 * floor((camWnd->getCameraAngles()[CAMERA_YAW]+11)/22.5);
camWnd->setCameraAngles(angles);
}
}
示例2: store
void MapPosition::store(const cmd::ArgumentList& args) {
rMessage() << "Storing map position #" << _index << std::endl;
CamWndPtr camwnd = GlobalCamera().getActiveCamWnd();
if (camwnd != NULL) {
_position = camwnd->getCameraOrigin();
_angle = camwnd->getCameraAngles();
// Tag the map as modified
GlobalMap().setModified(true);
}
else {
rError() << "MapPosition: Warning: Couldn't find Camera." << std::endl;
}
}
示例3: saveCameraPosition
/* greebo: Saves the current camera position/angles to worldspawn
*/
void Map::saveCameraPosition() {
const std::string keyLastCamPos = GlobalRegistry().get(RKEY_LAST_CAM_POSITION);
const std::string keyLastCamAngle = GlobalRegistry().get(RKEY_LAST_CAM_ANGLE);
if (m_world_node != NULL) {
// Retrieve the entity from the worldspawn node
Entity* worldspawn = Node_getEntity(m_world_node);
assert(worldspawn != NULL); // This must succeed
CamWndPtr camWnd = GlobalCamera().getActiveCamWnd();
if (camWnd == NULL) return;
worldspawn->setKeyValue(keyLastCamPos,
string::to_string(camWnd->getCameraOrigin()));
worldspawn->setKeyValue(keyLastCamAngle,
string::to_string(camWnd->getCameraAngles()));
}
}