Merge branch 'master' of https://github.com/singularity-viewer/SingularityViewer.git
Conflicts: indra/newview/llnetmap.cpp
This commit is contained in:
@@ -565,6 +565,7 @@ F32 LLDrawable::updateXform(BOOL undamped)
|
||||
dist_squared = dist_vec_squared(new_pos, target_pos);
|
||||
|
||||
LLQuaternion new_rot = nlerp(lerp_amt, old_rot, target_rot);
|
||||
// FIXME: This can be negative! It is be possible for some rots to 'cancel out' pos or size changes.
|
||||
dist_squared += (1.f - dot(new_rot, target_rot)) * 10.f;
|
||||
|
||||
LLVector3 new_scale = lerp(old_scale, target_scale, lerp_amt);
|
||||
@@ -588,6 +589,15 @@ F32 LLDrawable::updateXform(BOOL undamped)
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// The following fixes MAINT-1742 but breaks vehicles similar to MAINT-2275
|
||||
// dist_squared = dist_vec_squared(old_pos, target_pos);
|
||||
|
||||
// The following fixes MAINT-2247 but causes MAINT-2275
|
||||
//dist_squared += (1.f - dot(old_rot, target_rot)) * 10.f;
|
||||
//dist_squared += dist_vec_squared(old_scale, target_scale);
|
||||
}
|
||||
|
||||
LLVector3 vec = mCurrentScale-target_scale;
|
||||
|
||||
@@ -682,17 +692,7 @@ BOOL LLDrawable::updateMove()
|
||||
|
||||
makeActive();
|
||||
|
||||
BOOL done;
|
||||
|
||||
if (isState(MOVE_UNDAMPED))
|
||||
{
|
||||
done = updateMoveUndamped();
|
||||
}
|
||||
else
|
||||
{
|
||||
done = updateMoveDamped();
|
||||
}
|
||||
return done;
|
||||
return isState(MOVE_UNDAMPED) ? updateMoveUndamped() : updateMoveDamped();
|
||||
}
|
||||
|
||||
BOOL LLDrawable::updateMoveUndamped()
|
||||
@@ -709,7 +709,6 @@ BOOL LLDrawable::updateMoveUndamped()
|
||||
}
|
||||
|
||||
mVObjp->clearChanged(LLXform::MOVED);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -833,7 +832,6 @@ void LLDrawable::updateTexture()
|
||||
|
||||
if (getVOVolume())
|
||||
{
|
||||
//getVOVolume()->mFaceMappingChanged = TRUE;
|
||||
gPipeline.markRebuild(this, LLDrawable::REBUILD_MATERIAL, TRUE);
|
||||
}
|
||||
}
|
||||
@@ -1153,8 +1151,8 @@ BOOL LLDrawable::isVisible() const
|
||||
// Spatial Partition Bridging Drawable
|
||||
//=======================================
|
||||
|
||||
LLSpatialBridge::LLSpatialBridge(LLDrawable* root, BOOL render_by_group, U32 data_mask)
|
||||
: LLSpatialPartition(data_mask, render_by_group, GL_STREAM_DRAW_ARB)
|
||||
LLSpatialBridge::LLSpatialBridge(LLDrawable* root, BOOL render_by_group, U32 data_mask) :
|
||||
LLSpatialPartition(data_mask, render_by_group, GL_STREAM_DRAW_ARB)
|
||||
{
|
||||
mBridge = this;
|
||||
mDrawable = root;
|
||||
@@ -1241,12 +1239,9 @@ void LLSpatialBridge::updateSpatialExtents()
|
||||
scale.mul(size);
|
||||
mat.rotate(scale, v[3]);
|
||||
|
||||
|
||||
LLVector4a& newMin = mExtents[0];
|
||||
LLVector4a& newMax = mExtents[1];
|
||||
|
||||
newMin = newMax = center;
|
||||
|
||||
for (U32 i = 0; i < 4; i++)
|
||||
{
|
||||
LLVector4a delta;
|
||||
@@ -1426,16 +1421,17 @@ void LLSpatialBridge::setVisible(LLCamera& camera_in, std::vector<LLDrawable*>*
|
||||
group->rebound();
|
||||
|
||||
LLVector4a center;
|
||||
center.setAdd(mExtents[0], mExtents[1]);
|
||||
const LLVector4a* exts = getSpatialExtents();
|
||||
center.setAdd(exts[0], exts[1]);
|
||||
center.mul(0.5f);
|
||||
LLVector4a size;
|
||||
size.setSub(mExtents[1], mExtents[0]);
|
||||
size.setSub(exts[1], exts[0]);
|
||||
size.mul(0.5f);
|
||||
|
||||
if ((LLPipeline::sShadowRender && camera_in.AABBInFrustum(center, size)) ||
|
||||
LLPipeline::sImpostorRender ||
|
||||
(camera_in.AABBInFrustumNoFarClip(center, size) &&
|
||||
AABBSphereIntersect(mExtents[0], mExtents[1], camera_in.getOrigin(), camera_in.mFrustumCornerDist)))
|
||||
AABBSphereIntersect(exts[0], exts[1], camera_in.getOrigin(), camera_in.mFrustumCornerDist)))
|
||||
{
|
||||
if (!LLPipeline::sImpostorRender &&
|
||||
!LLPipeline::sShadowRender &&
|
||||
|
||||
Reference in New Issue
Block a user