summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatermodelpreview.cpp
diff options
context:
space:
mode:
authorJonathan Wolk <none@none>2010-10-19 11:29:42 -0700
committerJonathan Wolk <none@none>2010-10-19 11:29:42 -0700
commit256c6e6a252feaa7ae50f81778aab1e0246a526a (patch)
treeef1982449f3942fe6a5504b5e18536e21644e7e5 /indra/newview/llfloatermodelpreview.cpp
parenta045261002963fce7a719c9bcffee396aef821ca (diff)
Moved retry logic for certain mesh header fetches to help with SH-323 'Some mesh objects fail to load data for valid meshes'. Renamed some variables to be more clear.
Diffstat (limited to 'indra/newview/llfloatermodelpreview.cpp')
-rw-r--r--indra/newview/llfloatermodelpreview.cpp40
1 files changed, 22 insertions, 18 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index d067970806..1e87e84eb2 100644
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -2122,24 +2122,28 @@ U32 LLModelPreview::calcResourceCost()
{
accounted.insert(instance.mModel);
- LLModel::physics_shape& physics_shape = instance.mLOD[LLModel::LOD_PHYSICS] ? instance.mLOD[LLModel::LOD_PHYSICS]->mPhysicsShape : instance.mModel->mPhysicsShape;
-
- LLSD ret = LLModel::writeModel("",
- instance.mLOD[4],
- instance.mLOD[3],
- instance.mLOD[2],
- instance.mLOD[1],
- instance.mLOD[0],
- physics_shape,
- mFMP->childGetValue("upload_skin").asBoolean(),
- mFMP->childGetValue("upload_joints").asBoolean(),
- true);
+ LLModel::convex_hull_decomposition& decomp =
+ instance.mLOD[LLModel::LOD_PHYSICS] ?
+ instance.mLOD[LLModel::LOD_PHYSICS]->mConvexHullDecomp :
+ instance.mModel->mConvexHullDecomp;
+
+ LLSD ret = LLModel::writeModel(
+ "",
+ instance.mLOD[4],
+ instance.mLOD[3],
+ instance.mLOD[2],
+ instance.mLOD[1],
+ instance.mLOD[0],
+ decomp,
+ mFMP->childGetValue("upload_skin").asBoolean(),
+ mFMP->childGetValue("upload_joints").asBoolean(),
+ TRUE);
cost += gMeshRepo.calcResourceCost(ret);
- num_hulls += physics_shape.size();
- for (U32 i = 0; i < physics_shape.size(); ++i)
+ num_hulls += decomp.size();
+ for (U32 i = 0; i < decomp.size(); ++i)
{
- num_points += physics_shape[i].size();
+ num_points += decomp[i].size();
}
//calculate streaming cost
@@ -2771,7 +2775,7 @@ void LLModelPreview::genLODs(S32 which_lod)
if (which_lod == -1)
{
- mModel[LLModel::LOD_HIGH] = mBaseModel;
+ mModel[LLModel::LOD_HIGH] = mBaseModel;
}
return;
@@ -3478,7 +3482,7 @@ BOOL LLModelPreview::render()
{
gGL.pushMatrix();
- LLVector3 offset = model->mHullCenter[i]-model->mPhysicsCenter;
+ LLVector3 offset = model->mHullCenter[i]-model->mCenterOfHullCenters;
offset *= explode;
gGL.translatef(offset.mV[0], offset.mV[1], offset.mV[2]);
@@ -3820,7 +3824,7 @@ S32 LLFloaterModelPreview::DecompRequest::statusCallback(const char* status, S32
void LLFloaterModelPreview::DecompRequest::completed()
{
- mModel->setPhysicsShape(mHull);
+ mModel->setConvexHullDecomposition(mHull);
if (sInstance)
{