本文整理汇总了C++中LLPipeline::markTextured方法的典型用法代码示例。如果您正苦于以下问题:C++ LLPipeline::markTextured方法的具体用法?C++ LLPipeline::markTextured怎么用?C++ LLPipeline::markTextured使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLPipeline
的用法示例。
在下文中一共展示了LLPipeline::markTextured方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setupDrawable
void LLViewerJointAttachment::setupDrawable(LLViewerObject *object)
{
if (!object->mDrawable)
return;
if (object->mDrawable->isActive())
{
object->mDrawable->makeStatic(FALSE);
}
object->mDrawable->mXform.setParent(getXform()); // LLViewerJointAttachment::lazyAttach
object->mDrawable->makeActive();
LLVector3 current_pos = object->getRenderPosition();
LLQuaternion current_rot = object->getRenderRotation();
LLQuaternion attachment_pt_inv_rot = ~(getWorldRotation());
current_pos -= getWorldPosition();
current_pos.rotVec(attachment_pt_inv_rot);
current_rot = current_rot * attachment_pt_inv_rot;
object->mDrawable->mXform.setPosition(current_pos);
object->mDrawable->mXform.setRotation(current_rot);
gPipeline.markMoved(object->mDrawable);
gPipeline.markTextured(object->mDrawable); // face may need to change draw pool to/from POOL_HUD
object->mDrawable->setState(LLDrawable::USE_BACKLIGHT);
if(mIsHUDAttachment)
{
for (S32 face_num = 0; face_num < object->mDrawable->getNumFaces(); face_num++)
{
object->mDrawable->getFace(face_num)->setState(LLFace::HUD_RENDER);
}
}
LLViewerObject::const_child_list_t& child_list = object->getChildren();
for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
iter != child_list.end(); ++iter)
{
LLViewerObject* childp = *iter;
if (childp && childp->mDrawable.notNull())
{
childp->mDrawable->setState(LLDrawable::USE_BACKLIGHT);
gPipeline.markTextured(childp->mDrawable); // face may need to change draw pool to/from POOL_HUD
gPipeline.markMoved(childp->mDrawable);
if(mIsHUDAttachment)
{
for (S32 face_num = 0; face_num < childp->mDrawable->getNumFaces(); face_num++)
{
childp->mDrawable->getFace(face_num)->setState(LLFace::HUD_RENDER);
}
}
}
}
}
示例2: removeObject
//-----------------------------------------------------------------------------
// removeObject()
//-----------------------------------------------------------------------------
void LLViewerJointAttachment::removeObject(LLViewerObject *object)
{
attachedobjs_vec_t::iterator iter;
for (iter = mAttachedObjects.begin();
iter != mAttachedObjects.end();
++iter)
{
LLViewerObject *attached_object = (*iter);
if (attached_object == object)
{
break;
}
}
if (iter == mAttachedObjects.end())
{
llwarns << "Could not find object to detach" << llendl;
return;
}
// force object visibile
setAttachmentVisibility(TRUE);
mAttachedObjects.erase(iter);
if (object->mDrawable.notNull())
{
//if object is active, make it static
if(object->mDrawable->isActive())
{
object->mDrawable->makeStatic(FALSE) ;
}
LLVector3 cur_position = object->getRenderPosition();
LLQuaternion cur_rotation = object->getRenderRotation();
object->mDrawable->mXform.setPosition(cur_position);
object->mDrawable->mXform.setRotation(cur_rotation);
gPipeline.markMoved(object->mDrawable, TRUE);
gPipeline.markTextured(object->mDrawable); // face may need to change draw pool to/from POOL_HUD
object->mDrawable->clearState(LLDrawable::USE_BACKLIGHT);
if (mIsHUDAttachment)
{
for (S32 face_num = 0; face_num < object->mDrawable->getNumFaces(); face_num++)
{
object->mDrawable->getFace(face_num)->clearState(LLFace::HUD_RENDER);
}
}
}
LLViewerObject::const_child_list_t& child_list = object->getChildren();
for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
iter != child_list.end(); ++iter)
{
LLViewerObject* childp = *iter;
if (childp && childp->mDrawable.notNull())
{
childp->mDrawable->clearState(LLDrawable::USE_BACKLIGHT);
gPipeline.markTextured(childp->mDrawable); // face may need to change draw pool to/from POOL_HUD
if (mIsHUDAttachment)
{
for (S32 face_num = 0; face_num < childp->mDrawable->getNumFaces(); face_num++)
{
childp->mDrawable->getFace(face_num)->clearState(LLFace::HUD_RENDER);
}
}
}
}
if (mIsHUDAttachment)
{
if (object->mText.notNull())
{
object->mText->setOnHUDAttachment(FALSE);
}
LLViewerObject::const_child_list_t& child_list = object->getChildren();
for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
iter != child_list.end(); ++iter)
{
LLViewerObject* childp = *iter;
if (childp->mText.notNull())
{
childp->mText->setOnHUDAttachment(FALSE);
}
}
}
if (mAttachedObjects.size() == 0)
{
mUpdateXform = FALSE;
}
object->setAttachmentItemID(LLUUID::null);
}
示例3: removeObject
//-----------------------------------------------------------------------------
// removeObject()
//-----------------------------------------------------------------------------
void LLViewerJointAttachment::removeObject(LLViewerObject *object)
{
// force object visibile
setAttachmentVisibility(TRUE);
if (object->mDrawable.notNull())
{
//if object is active, make it static
if(object->mDrawable->isActive())
{
object->mDrawable->makeStatic(FALSE) ;
}
LLVector3 cur_position = object->getRenderPosition();
LLQuaternion cur_rotation = object->getRenderRotation();
object->mDrawable->mXform.setPosition(cur_position);
object->mDrawable->mXform.setRotation(cur_rotation);
gPipeline.markMoved(object->mDrawable, TRUE);
gPipeline.markTextured(object->mDrawable); // face may need to change draw pool to/from POOL_HUD
object->mDrawable->clearState(LLDrawable::USE_BACKLIGHT);
if (mIsHUDAttachment)
{
for (S32 face_num = 0; face_num < object->mDrawable->getNumFaces(); face_num++)
{
object->mDrawable->getFace(face_num)->clearState(LLFace::HUD_RENDER);
}
}
}
LLViewerObject::const_child_list_t& child_list = object->getChildren();
for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
iter != child_list.end(); iter++)
{
LLViewerObject* childp = *iter;
if (childp && childp->mDrawable.notNull())
{
childp->mDrawable->clearState(LLDrawable::USE_BACKLIGHT);
gPipeline.markTextured(childp->mDrawable); // face may need to change draw pool to/from POOL_HUD
if (mIsHUDAttachment)
{
for (S32 face_num = 0; face_num < childp->mDrawable->getNumFaces(); face_num++)
{
childp->mDrawable->getFace(face_num)->clearState(LLFace::HUD_RENDER);
}
}
}
}
if (mIsHUDAttachment)
{
if (object->mText.notNull())
{
object->mText->setOnHUDAttachment(FALSE);
}
LLViewerObject::const_child_list_t& child_list = object->getChildren();
for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
iter != child_list.end(); iter++)
{
LLViewerObject* childp = *iter;
if (childp->mText.notNull())
{
childp->mText->setOnHUDAttachment(FALSE);
}
}
}
mAttachedObject = NULL;
mUpdateXform = FALSE;
mItemID.setNull();
}