From ca9df698db9c7a118d29adfe52f49054c333d982 Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Thu, 30 Dec 2010 22:08:25 -0800 Subject: Code review fix from davep - use booling or operator and not binary one Remove unnecessary state check. Initial dialog work for showing physics cost in upload dialog --- indra/llmath/llcamera.cpp | 2 +- indra/newview/llfloatermodelpreview.cpp | 2 ++ indra/newview/llvovolume.cpp | 7 +------ indra/newview/skins/default/xui/en/floater_model_preview.xml | 2 +- 4 files changed, 5 insertions(+), 8 deletions(-) (limited to 'indra') diff --git a/indra/llmath/llcamera.cpp b/indra/llmath/llcamera.cpp index c681e00b32..2ffc56644f 100644 --- a/indra/llmath/llcamera.cpp +++ b/indra/llmath/llcamera.cpp @@ -377,7 +377,7 @@ int LLCamera::sphereInFrustum(const LLVector3 &sphere_center, const F32 radius) { return 0; } - res |= (d > -radius); + res = res || (d > -radius); } } diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 2f1ce25511..f96c02d9b7 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -2055,6 +2055,7 @@ U32 LLModelPreview::calcResourceCost() F32 debug_scale = mFMP->childGetValue("import_scale").asReal(); F32 streaming_cost = 0.f; + F32 physics_cost = 0.f; for (U32 i = 0; i < mUploadData.size(); ++i) { LLModelInstance& instance = mUploadData[i]; @@ -2109,6 +2110,7 @@ U32 LLModelPreview::calcResourceCost() //mFMP->childSetTextArg(info_name[LLModel::LOD_PHYSICS], "[HULLS]", llformat("%d",num_hulls)); //mFMP->childSetTextArg(info_name[LLModel::LOD_PHYSICS], "[POINTS]", llformat("%d",num_points)); mFMP->childSetTextArg("streaming cost", "[COST]", llformat("%.3f", streaming_cost)); + mFMP->childSetTextArg("physics cost", "[COST]", llformat("%.3f", physics_cost)); F32 scale = mFMP->childGetValue("import_scale").asReal()*2.f; mFMP->childSetTextArg("import_dimensions", "[X]", llformat("%.3f", mPreviewScale[0]*scale)); mFMP->childSetTextArg("import_dimensions", "[Y]", llformat("%.3f", mPreviewScale[1]*scale)); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 3219f662df..471df30bfe 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -4384,12 +4384,7 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group) LLFastTimer t(FTM_VOLUME_GEOM_PARTIAL); LLDrawable* drawablep = *drawable_iter; - if (drawablep->isDead() || drawablep->isState(LLDrawable::FORCE_INVISIBLE) ) - { - continue; - } - - if (drawablep->isState(LLDrawable::REBUILD_ALL)) + if (!drawablep->isDead() && drawablep->isState(LLDrawable::REBUILD_ALL) ) { LLVOVolume* vobj = drawablep->getVOVolume(); vobj->preRebuild(); diff --git a/indra/newview/skins/default/xui/en/floater_model_preview.xml b/indra/newview/skins/default/xui/en/floater_model_preview.xml index 0fdcf486e7..e34636db57 100644 --- a/indra/newview/skins/default/xui/en/floater_model_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_model_preview.xml @@ -69,7 +69,7 @@ Resource Cost: [COST] - Physics Cost: Unknown + Physics Cost: [COST] Upload Fee: N/A -- cgit v1.2.3