本文整理汇总了C++中LLAvatarJoint类的典型用法代码示例。如果您正苦于以下问题:C++ LLAvatarJoint类的具体用法?C++ LLAvatarJoint怎么用?C++ LLAvatarJoint使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了LLAvatarJoint类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateLOD
BOOL LLAvatarJoint::updateLOD(F32 pixel_area, BOOL activate)
{
BOOL lod_changed = FALSE;
BOOL found_lod = FALSE;
for (child_list_t::iterator iter = mChildren.begin();
iter != mChildren.end(); ++iter)
{
LLAvatarJoint* joint = dynamic_cast<LLAvatarJoint*>(*iter);
F32 jointLOD = joint->getLOD();
if (found_lod || jointLOD == DEFAULT_AVATAR_JOINT_LOD)
{
// we've already found a joint to enable, so enable the rest as alternatives
lod_changed |= joint->updateLOD(pixel_area, TRUE);
}
else
{
if (pixel_area >= jointLOD || sDisableLOD)
{
lod_changed |= joint->updateLOD(pixel_area, TRUE);
found_lod = TRUE;
}
else
{
lod_changed |= joint->updateLOD(pixel_area, FALSE);
}
}
}
return lod_changed;
}
示例2: dump
void LLAvatarJoint::dump()
{
for (child_list_t::iterator iter = mChildren.begin();
iter != mChildren.end(); ++iter)
{
LLAvatarJoint* joint = dynamic_cast<LLAvatarJoint*>(*iter);
joint->dump();
}
}
示例3: updateFaceData
void LLAvatarJoint::updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_wind, bool terse_update)
{
for (child_list_t::iterator iter = mChildren.begin();
iter != mChildren.end(); ++iter)
{
LLAvatarJoint* joint = dynamic_cast<LLAvatarJoint*>(*iter);
joint->updateFaceData(face, pixel_area, damp_wind, terse_update);
}
}
示例4: updateFaceSizes
void LLAvatarJoint::updateFaceSizes(U32 &num_vertices, U32& num_indices, F32 pixel_area)
{
for (child_list_t::iterator iter = mChildren.begin();
iter != mChildren.end(); ++iter)
{
LLAvatarJoint* joint = dynamic_cast<LLAvatarJoint*>(*iter);
joint->updateFaceSizes(num_vertices, num_indices, pixel_area);
}
}
示例5: updateJointGeometry
void LLAvatarJoint::updateJointGeometry()
{
for (child_list_t::iterator iter = mChildren.begin();
iter != mChildren.end(); ++iter)
{
LLAvatarJoint* joint = dynamic_cast<LLAvatarJoint*>(*iter);
if (joint)
joint->updateJointGeometry();
}
}
示例6: setSkeletonComponents
//--------------------------------------------------------------------
// setSkeletonComponents()
//--------------------------------------------------------------------
void LLAvatarJoint::setSkeletonComponents( U32 comp, BOOL recursive )
{
mComponents = comp;
if (recursive)
{
for (child_list_t::iterator iter = mChildren.begin();
iter != mChildren.end(); ++iter)
{
LLAvatarJoint* joint = dynamic_cast<LLAvatarJoint*>(*iter);
joint->setSkeletonComponents(comp, recursive);
}
}
}
示例7: setVisible
void LLAvatarJoint::setVisible(BOOL visible, BOOL recursive)
{
mVisible = visible;
if (recursive)
{
for (child_list_t::iterator iter = mChildren.begin();
iter != mChildren.end(); ++iter)
{
LLAvatarJoint* joint = (LLAvatarJoint*)(*iter);
joint->setVisible(visible, recursive);
}
}
}
示例8: LLJointRenderData
//-----------------------------------------------------------------------------
// setupJoint()
//-----------------------------------------------------------------------------
void LLAvatarJointMesh::setupJoint(LLAvatarJoint* current_joint)
{
// llinfos << "Mesh: " << getName() << llendl;
// S32 joint_count = 0;
U32 sj;
for (sj=0; sj<mNumSkinJoints; sj++)
{
LLSkinJoint &js = mSkinJoints[sj];
if (js.mJoint != current_joint)
{
continue;
}
// we've found a skinjoint for this joint..
// is the last joint in the array our parent?
if(mMesh->mJointRenderData.count() && mMesh->mJointRenderData[mMesh->mJointRenderData.count() - 1]->mWorldMatrix == ¤t_joint->getParent()->getWorldMatrix())
{
// ...then just add ourselves
LLAvatarJoint* jointp = js.mJoint;
mMesh->mJointRenderData.put(new LLJointRenderData(&jointp->getWorldMatrix(), &js));
// llinfos << "joint " << joint_count << js.mJoint->getName() << llendl;
// joint_count++;
}
// otherwise add our parent and ourselves
else
{
mMesh->mJointRenderData.put(new LLJointRenderData(¤t_joint->getParent()->getWorldMatrix(), NULL));
// llinfos << "joint " << joint_count << current_joint->getParent()->getName() << llendl;
// joint_count++;
mMesh->mJointRenderData.put(new LLJointRenderData(¤t_joint->getWorldMatrix(), &js));
// llinfos << "joint " << joint_count << current_joint->getName() << llendl;
// joint_count++;
}
}
// depth-first traversal
for (LLJoint::child_list_t::iterator iter = current_joint->mChildren.begin();
iter != current_joint->mChildren.end(); ++iter)
{
LLAvatarJoint* child_joint = (LLAvatarJoint*)(*iter);
setupJoint(child_joint);
}
}
示例9: setValid
//--------------------------------------------------------------------
// setValid()
//--------------------------------------------------------------------
void LLAvatarJoint::setValid( BOOL valid, BOOL recursive )
{
//----------------------------------------------------------------
// set visibility for this joint
//----------------------------------------------------------------
mValid = valid;
//----------------------------------------------------------------
// set visibility for children
//----------------------------------------------------------------
if (recursive)
{
for (child_list_t::iterator iter = mChildren.begin();
iter != mChildren.end(); ++iter)
{
LLAvatarJoint* joint = (LLAvatarJoint*)(*iter);
joint->setValid(valid, TRUE);
}
}
}
示例10: stop_glerror
//--------------------------------------------------------------------
// render()
//--------------------------------------------------------------------
U32 LLViewerJoint::render( F32 pixelArea, BOOL first_pass, BOOL is_dummy )
{
stop_glerror();
U32 triangle_count = 0;
//----------------------------------------------------------------
// ignore invisible objects
//----------------------------------------------------------------
if ( mValid )
{
//----------------------------------------------------------------
// if object is transparent, defer it, otherwise
// give the joint subclass a chance to draw itself
//----------------------------------------------------------------
if ( is_dummy )
{
triangle_count += drawShape( pixelArea, first_pass, is_dummy );
}
else if (LLPipeline::sShadowRender)
{
triangle_count += drawShape(pixelArea, first_pass, is_dummy );
}
else if ( isTransparent() && !LLPipeline::sReflectionRender)
{
// Hair and Skirt
if ((pixelArea > MIN_PIXEL_AREA_3PASS_HAIR))
{
// render all three passes
LLGLDisable cull(GL_CULL_FACE);
// first pass renders without writing to the z buffer
{
LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE);
triangle_count += drawShape( pixelArea, first_pass, is_dummy );
}
// second pass writes to z buffer only
gGL.setColorMask(false, false);
{
triangle_count += drawShape( pixelArea, FALSE, is_dummy );
}
// third past respects z buffer and writes color
gGL.setColorMask(true, false);
{
LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE);
triangle_count += drawShape( pixelArea, FALSE, is_dummy );
}
}
else
{
// Render Inside (no Z buffer write)
glCullFace(GL_FRONT);
{
LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE);
triangle_count += drawShape( pixelArea, first_pass, is_dummy );
}
// Render Outside (write to the Z buffer)
glCullFace(GL_BACK);
{
triangle_count += drawShape( pixelArea, FALSE, is_dummy );
}
}
}
else
{
// set up render state
triangle_count += drawShape( pixelArea, first_pass );
}
}
//----------------------------------------------------------------
// render children
//----------------------------------------------------------------
for (child_list_t::iterator iter = mChildren.begin();
iter != mChildren.end(); ++iter)
{
LLAvatarJoint* joint = dynamic_cast<LLAvatarJoint*>(*iter);
if (!joint)
continue;
F32 jointLOD = joint->getLOD();
if (pixelArea >= jointLOD || sDisableLOD)
{
triangle_count += joint->render( pixelArea, TRUE, is_dummy );
if (jointLOD != DEFAULT_AVATAR_JOINT_LOD)
{
break;
}
}
}
return triangle_count;
}