summaryrefslogtreecommitdiff
path: root/indra/llappearance/llavatarjoint.cpp
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-08-05 12:04:29 -0700
committerGraham Linden <graham@lindenlab.com>2019-08-05 12:04:29 -0700
commit76128c4357bc36acd54575153516c6d337fe4263 (patch)
tree7910d8415bf394fd15f5dca35dd3779b39acc15a /indra/llappearance/llavatarjoint.cpp
parent9bb6da1e76efa951da7e740f80b1e4e72e67b878 (diff)
SL-10566 Use vector for some high-traffic, low-item count containers instead of list.
Provide method of storing joint indices sep from weight data for faster runtime processing.
Diffstat (limited to 'indra/llappearance/llavatarjoint.cpp')
-rw-r--r--indra/llappearance/llavatarjoint.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/indra/llappearance/llavatarjoint.cpp b/indra/llappearance/llavatarjoint.cpp
index 29642be099..80b3e42b52 100644
--- a/indra/llappearance/llavatarjoint.cpp
+++ b/indra/llappearance/llavatarjoint.cpp
@@ -100,7 +100,7 @@ void LLAvatarJoint::setValid( BOOL valid, BOOL recursive )
//----------------------------------------------------------------
if (recursive)
{
- for (child_list_t::iterator iter = mChildren.begin();
+ for (joints_t::iterator iter = mChildren.begin();
iter != mChildren.end(); ++iter)
{
LLAvatarJoint* joint = (LLAvatarJoint*)(*iter);
@@ -118,10 +118,10 @@ void LLAvatarJoint::setSkeletonComponents( U32 comp, BOOL recursive )
mComponents = comp;
if (recursive)
{
- for (child_list_t::iterator iter = mChildren.begin();
+ for (joints_t::iterator iter = mChildren.begin();
iter != mChildren.end(); ++iter)
{
- LLAvatarJoint* joint = dynamic_cast<LLAvatarJoint*>(*iter);
+ LLAvatarJoint* joint = static_cast<LLAvatarJoint*>(*iter);
joint->setSkeletonComponents(comp, recursive);
}
}
@@ -133,7 +133,7 @@ void LLAvatarJoint::setVisible(BOOL visible, BOOL recursive)
if (recursive)
{
- for (child_list_t::iterator iter = mChildren.begin();
+ for (joints_t::iterator iter = mChildren.begin();
iter != mChildren.end(); ++iter)
{
LLAvatarJoint* joint = (LLAvatarJoint*)(*iter);
@@ -144,27 +144,27 @@ void LLAvatarJoint::setVisible(BOOL visible, BOOL recursive)
void LLAvatarJoint::updateFaceSizes(U32 &num_vertices, U32& num_indices, F32 pixel_area)
{
- for (child_list_t::iterator iter = mChildren.begin();
+ for (joints_t::iterator iter = mChildren.begin();
iter != mChildren.end(); ++iter)
{
- LLAvatarJoint* joint = dynamic_cast<LLAvatarJoint*>(*iter);
+ LLAvatarJoint* joint = static_cast<LLAvatarJoint*>(*iter);
joint->updateFaceSizes(num_vertices, num_indices, pixel_area);
}
}
void LLAvatarJoint::updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_wind, bool terse_update)
{
- for (child_list_t::iterator iter = mChildren.begin();
+ for (joints_t::iterator iter = mChildren.begin();
iter != mChildren.end(); ++iter)
{
- LLAvatarJoint* joint = dynamic_cast<LLAvatarJoint*>(*iter);
+ LLAvatarJoint* joint = static_cast<LLAvatarJoint*>(*iter);
joint->updateFaceData(face, pixel_area, damp_wind, terse_update);
}
}
void LLAvatarJoint::updateJointGeometry()
{
- for (child_list_t::iterator iter = mChildren.begin();
+ for (joints_t::iterator iter = mChildren.begin();
iter != mChildren.end(); ++iter)
{
LLAvatarJoint* joint = dynamic_cast<LLAvatarJoint*>(*iter);
@@ -178,10 +178,10 @@ BOOL LLAvatarJoint::updateLOD(F32 pixel_area, BOOL activate)
BOOL lod_changed = FALSE;
BOOL found_lod = FALSE;
- for (child_list_t::iterator iter = mChildren.begin();
+ for (joints_t::iterator iter = mChildren.begin();
iter != mChildren.end(); ++iter)
{
- LLAvatarJoint* joint = dynamic_cast<LLAvatarJoint*>(*iter);
+ LLAvatarJoint* joint = static_cast<LLAvatarJoint*>(*iter);
F32 jointLOD = joint->getLOD();
if (found_lod || jointLOD == DEFAULT_AVATAR_JOINT_LOD)
@@ -207,10 +207,10 @@ BOOL LLAvatarJoint::updateLOD(F32 pixel_area, BOOL activate)
void LLAvatarJoint::dump()
{
- for (child_list_t::iterator iter = mChildren.begin();
+ for (joints_t::iterator iter = mChildren.begin();
iter != mChildren.end(); ++iter)
{
- LLAvatarJoint* joint = dynamic_cast<LLAvatarJoint*>(*iter);
+ LLAvatarJoint* joint = static_cast<LLAvatarJoint*>(*iter);
joint->dump();
}
}