Rework LLSurface[Patch]. Abuse weak_ptr for now. Rewrote connectNeighbor. LLSurfacePatch no longer calls parent LLSurface with this poiter, instead parent surface just handles return value and controls its own behavior [Requred for weak_ptr/shared_ptr change.

This commit is contained in:
Shyotl
2020-02-29 22:33:51 -06:00
parent d8c4db17f2
commit 34f6ea4db2
10 changed files with 377 additions and 573 deletions

View File

@@ -164,10 +164,10 @@ void LLToolBrushLand::modifyLandAtPointGlobal(const LLVector3d &pos_global,
//if(!is_changed) continue;
// Now to update the patch information so it will redraw correctly.
LLSurfacePatch *patchp= land.resolvePatchRegion(pos_region);
if (patchp)
auto& patchp = land.resolvePatchRegion(pos_region);
if (patchp && patchp->dirtyZ())
{
patchp->dirtyZ();
patchp->getSurface()->dirtySurfacePatch(patchp);
}
// Also force the property lines to update, normals to recompute, etc.
@@ -305,10 +305,10 @@ void LLToolBrushLand::modifyLandInSelectionGlobal()
//if(!is_changed) continue;
// Now to update the patch information so it will redraw correctly.
LLSurfacePatch *patchp= land.resolvePatchRegion(min_region);
if (patchp)
auto& patchp = land.resolvePatchRegion(min_region);
if (patchp && patchp->dirtyZ())
{
patchp->dirtyZ();
patchp->getSurface()->dirtySurfacePatch(patchp);
}
// Also force the property lines to update, normals to recompute, etc.