diff options
author | Dave Parks <davep@lindenlab.com> | 2011-01-19 23:24:13 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-01-19 23:24:13 -0600 |
commit | 1b2c082feb91b4837a0cb5652d1668f6582e9bc9 (patch) | |
tree | 32179a4a46c263fbb73a9f9c727a6647841e79a5 /indra/newview/llvovolume.cpp | |
parent | 17068766b75fbe7dac968705f4f383fb61f73eb4 (diff) | |
parent | 32c4a448b113731a8c9ae32613fe4aa50b5c9997 (diff) |
merge
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r-- | indra/newview/llvovolume.cpp | 34 |
1 files changed, 8 insertions, 26 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 366213073e..5277e073a3 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -857,7 +857,8 @@ void LLVOVolume::updateTextureVirtualSize() BOOL LLVOVolume::isActive() const
{
- return !mStatic || mTextureAnimp || (mVolumeImpl && mVolumeImpl->isActive());
+ return !mStatic || mTextureAnimp || (mVolumeImpl && mVolumeImpl->isActive()) ||
+ (mDrawable.notNull() && mDrawable->isActive());
}
BOOL LLVOVolume::setMaterial(const U8 material)
@@ -931,9 +932,9 @@ LLDrawable *LLVOVolume::createDrawable(LLPipeline *pipeline) return mDrawable;
}
-BOOL LLVOVolume::setVolume(const LLVolumeParams ¶ms, const S32 detail, bool unique_volume)
+BOOL LLVOVolume::setVolume(const LLVolumeParams ¶ms_in, const S32 detail, bool unique_volume)
{
- LLVolumeParams volume_params = params;
+ LLVolumeParams volume_params = params_in;
S32 lod = mLOD;
@@ -945,7 +946,7 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams ¶ms, const S32 detail, bool if ((volume_params.getSculptType() & LL_SCULPT_TYPE_MASK) == LL_SCULPT_TYPE_MESH)
{ //meshes might not have all LODs, get the force detail to best existing LOD
- LLUUID mesh_id = params.getSculptID();
+ LLUUID mesh_id = volume_params.getSculptID();
//profile and path params don't matter for meshes
volume_params.setType(LL_PCODE_PROFILE_SQUARE, LL_PCODE_PATH_LINE);
@@ -1019,6 +1020,7 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams ¶ms, const S32 detail, bool LLPrimitive::setVolume(volume_params, available_lod);
}
}
+
}
else // otherwise is sculptie
{
@@ -1031,6 +1033,7 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams ¶ms, const S32 detail, bool return TRUE;
}
+
return FALSE;
}
@@ -3279,28 +3282,6 @@ F32 LLVOVolume::getBinRadius() F32 scale = 1.f;
- if (isSculpted())
- {
- LLSculptParams *sculpt_params = (LLSculptParams *)getParameterEntry(LLNetworkData::PARAMS_SCULPT);
- LLUUID id = sculpt_params->getSculptTexture();
- U8 sculpt_type = sculpt_params->getSculptType();
-
- if ((sculpt_type & LL_SCULPT_TYPE_MASK) == LL_SCULPT_TYPE_MESH)
- // mesh is a mesh
- {
- LLVolume* volume = getVolume();
- U32 vert_count = 0;
-
- for (S32 i = 0; i < volume->getNumVolumeFaces(); ++i)
- {
- const LLVolumeFace& face = volume->getVolumeFace(i);
- vert_count += face.mNumVertices;
- }
-
- scale = 1.f/llmax(vert_count/1024.f, 1.f);
- }
- }
-
const LLVector4a* ext = mDrawable->getSpatialExtents();
BOOL shrink_wrap = mDrawable->isAnimating();
@@ -4393,6 +4374,7 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group) {
LLVOVolume* vobj = drawablep->getVOVolume();
vobj->preRebuild();
+
LLVolume* volume = vobj->getVolume();
for (S32 i = 0; i < drawablep->getNumFaces(); ++i)
{
|