本文整理汇总了C++中LLVOAvatar::updateLOD方法的典型用法代码示例。如果您正苦于以下问题:C++ LLVOAvatar::updateLOD方法的具体用法?C++ LLVOAvatar::updateLOD怎么用?C++ LLVOAvatar::updateLOD使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLVOAvatar
的用法示例。
在下文中一共展示了LLVOAvatar::updateLOD方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: preRender
void LLVisualParamHint::preRender(BOOL clear_depth)
{
LLVOAvatar* avatarp = gAgent.getAvatarObject();
mLastParamWeight = avatarp->getVisualParamWeight(mVisualParam);
avatarp->setVisualParamWeight(mVisualParam, mVisualParamWeight);
avatarp->setVisualParamWeight("Blink_Left", 0.f);
avatarp->setVisualParamWeight("Blink_Right", 0.f);
avatarp->updateComposites();
avatarp->updateVisualParams();
avatarp->updateGeometry(avatarp->mDrawable);
avatarp->updateLOD();
LLDynamicTexture::preRender(clear_depth);
}
示例2: render
//-----------------------------------------------------------------------------
// update()
//-----------------------------------------------------------------------------
BOOL LLImagePreviewAvatar::render()
{
mNeedsUpdate = FALSE;
LLVOAvatar* avatarp = mDummyAvatar;
glMatrixMode(GL_PROJECTION);
gGL.pushMatrix();
glLoadIdentity();
glOrtho(0.0f, mWidth, 0.0f, mHeight, -1.0f, 1.0f);
glMatrixMode(GL_MODELVIEW);
gGL.pushMatrix();
glLoadIdentity();
LLGLSUIDefault def;
gGL.color4f(0.15f, 0.2f, 0.3f, 1.f);
gl_rect_2d_simple( mWidth, mHeight );
glMatrixMode(GL_PROJECTION);
gGL.popMatrix();
glMatrixMode(GL_MODELVIEW);
gGL.popMatrix();
gGL.flush();
LLVector3 target_pos = mTargetJoint->getWorldPosition();
LLQuaternion camera_rot = LLQuaternion(mCameraPitch, LLVector3::y_axis) *
LLQuaternion(mCameraYaw, LLVector3::z_axis);
LLQuaternion av_rot = avatarp->mPelvisp->getWorldRotation() * camera_rot;
LLViewerCamera::getInstance()->setOriginAndLookAt(
target_pos + ((LLVector3(mCameraDistance, 0.f, 0.f) + mCameraOffset) * av_rot), // camera
LLVector3::z_axis, // up
target_pos + (mCameraOffset * av_rot) ); // point of interest
stop_glerror();
LLViewerCamera::getInstance()->setAspect((F32)mWidth / mHeight);
LLViewerCamera::getInstance()->setView(LLViewerCamera::getInstance()->getDefaultFOV() / mCameraZoom);
LLViewerCamera::getInstance()->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, mWidth, mHeight, FALSE);
LLVertexBuffer::unbind();
avatarp->updateLOD();
if (avatarp->mDrawable.notNull())
{
LLGLDepthTest gls_depth(GL_TRUE, GL_TRUE);
// make sure alpha=0 shows avatar material color
LLGLDisable no_blend(GL_BLEND);
LLDrawPoolAvatar *avatarPoolp = (LLDrawPoolAvatar *)avatarp->mDrawable->getFace(0)->getPool();
avatarPoolp->renderAvatars(avatarp); // renders only one avatar
}
gGL.color4f(1,1,1,1);
return TRUE;
}