本文整理汇总了C++中LLCamera::getLeftAxis方法的典型用法代码示例。如果您正苦于以下问题:C++ LLCamera::getLeftAxis方法的具体用法?C++ LLCamera::getLeftAxis怎么用?C++ LLCamera::getLeftAxis使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLCamera
的用法示例。
在下文中一共展示了LLCamera::getLeftAxis方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: transformCamera
LLCamera LLSpatialBridge::transformCamera(LLCamera& camera)
{
LLCamera ret = camera;
LLXformMatrix* mat = mDrawable->getXform();
LLVector3 center = LLVector3(0,0,0) * mat->getWorldMatrix();
LLQuaternion rotation = LLQuaternion(mat->getWorldMatrix());
LLVector3 delta = ret.getOrigin() - center;
LLQuaternion rot = ~mat->getRotation();
delta *= rot;
LLVector3 lookAt = ret.getAtAxis();
LLVector3 up_axis = ret.getUpAxis();
LLVector3 left_axis = ret.getLeftAxis();
lookAt *= rot;
up_axis *= rot;
left_axis *= rot;
if (!delta.isFinite())
{
delta.clearVec();
}
ret.setOrigin(delta);
ret.setAxes(lookAt, left_axis, up_axis);
return ret;
}
示例2: transformCamera
LLCamera LLSpatialBridge::transformCamera(LLCamera& camera)
{
LLCamera ret = camera;
LLXformMatrix* mat = mDrawable->getXform();
const LLVector4a& center = mat->getWorldMatrix().getRow<3>();
LLQuaternion2 invRot;
invRot.setConjugate( LLQuaternion2(mat->getRotation()) );
LLVector4a delta;
delta.load3(ret.getOrigin().mV);
delta.sub(center);
LLVector4a lookAt;
lookAt.load3(ret.getAtAxis().mV);
LLVector4a up_axis;
up_axis.load3(ret.getUpAxis().mV);
LLVector4a left_axis;
left_axis.load3(ret.getLeftAxis().mV);
delta.setRotated(invRot, delta);
lookAt.setRotated(invRot, lookAt);
up_axis.setRotated(invRot, up_axis);
left_axis.setRotated(invRot, left_axis);
if (!delta.isFinite3())
{
delta.clear();
}
ret.setOrigin(LLVector3(delta.getF32ptr()));
ret.setAxes(LLVector3(lookAt.getF32ptr()), LLVector3(left_axis.getF32ptr()), LLVector3(up_axis.getF32ptr()));
return ret;
}