本文整理汇总了C++中ogre::Quaternion::xAxis方法的典型用法代码示例。如果您正苦于以下问题:C++ Quaternion::xAxis方法的具体用法?C++ Quaternion::xAxis怎么用?C++ Quaternion::xAxis使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ogre::Quaternion
的用法示例。
在下文中一共展示了Quaternion::xAxis方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: frameRenderingQueued
bool Framework::frameRenderingQueued(const Ogre::FrameEvent& evt)
{
mTrayMgr->frameRenderingQueued(evt);
if (!mTrayMgr->isDialogVisible())
{
mCameraMan->frameRenderingQueued(evt); // if dialog isn't up, then update the camera
if (mDetailsPanel->isVisible()) // if details panel is visible, then update its contents
{
mDetailsPanel->setParamValue(0, Ogre::StringConverter::toString(mCamera->getDerivedPosition().x));
mDetailsPanel->setParamValue(1, Ogre::StringConverter::toString(mCamera->getDerivedPosition().y));
mDetailsPanel->setParamValue(2, Ogre::StringConverter::toString(mCamera->getDerivedPosition().z));
mDetailsPanel->setParamValue(4, Ogre::StringConverter::toString(mCamera->getDerivedOrientation().w));
mDetailsPanel->setParamValue(5, Ogre::StringConverter::toString(mCamera->getDerivedOrientation().x));
mDetailsPanel->setParamValue(6, Ogre::StringConverter::toString(mCamera->getDerivedOrientation().y));
mDetailsPanel->setParamValue(7, Ogre::StringConverter::toString(mCamera->getDerivedOrientation().z));
#ifdef USE_RTSHADER_SYSTEM
mDetailsPanel->setParamValue(14, Ogre::StringConverter::toString(mShaderGenerator->getVertexShaderCount()));
mDetailsPanel->setParamValue(15, Ogre::StringConverter::toString(mShaderGenerator->getFragmentShaderCount()));
#endif
Ogre::Quaternion q = mCamera->getDerivedOrientation();
mDetailsPanel->setParamValue(16, Ogre::StringConverter::toString(q.xAxis() ) );
mDetailsPanel->setParamValue(17, Ogre::StringConverter::toString(q.yAxis() ));
mDetailsPanel->setParamValue(18, Ogre::StringConverter::toString(q.zAxis() ));
}
}
return true;
}
示例2: initAxis
//-------------------------------------------------------------------------------------
void AxisLines::initAxis(Ogre::String boneName, Ogre::Entity* entity, Ogre::SceneManager* mSceneManager)
{
if(isXVisible) /* red */
{
xLine = new DynamicLines(Ogre::RenderOperation::OT_LINE_LIST);
entity->attachObjectToBone(boneName, xLine);
xLine->setMaterial(color1);
}
if(isYVisible) /* green */
{
yLine = new DynamicLines(Ogre::RenderOperation::OT_LINE_LIST);
entity->attachObjectToBone(boneName, yLine);
yLine->setMaterial(color2);
}
if(isZVisible) /* blue */
{
zLine = new DynamicLines(Ogre::RenderOperation::OT_LINE_LIST);
entity->attachObjectToBone(boneName, zLine);
zLine->setMaterial(color3);
}
Ogre::Bone* bone = entity->getSkeleton()->getBone(boneName);
Ogre::Quaternion q = bone->getOrientation();
this->updateLines(q.xAxis(), q.yAxis(), q.zAxis());
}
示例3: transformBone
//-------------------------------------------------------------------------------------
void ControllableCharacter::transformBone(Ogre::String boneName, NuiManager::NuiJointIndex jointIdx)
{
int state = 0;
state = (int)controller->getJointStatus(jointIdx);
if(state == 2)
{
Ogre::Bone* bone = skeleton->getBone(boneName);
Ogre::Quaternion qI = bone->getInitialOrientation();
Ogre::Quaternion newQ = jointCalc->getSkeletonJointOrientation(jointIdx);
bone->resetOrientation();
newQ = bone->convertWorldToLocalOrientation(newQ);
bone->setOrientation(newQ * qI);
Ogre::Quaternion resQ = bone->getOrientation();
if(showBoneOrientationAxes) axisLines[jointIdx]->updateLines(resQ.xAxis(), resQ.yAxis(), resQ.zAxis()); // debug
}
}