diff options
author | Brad Linden <46733234+brad-linden@users.noreply.github.com> | 2024-05-06 15:44:19 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-06 15:44:19 -0700 |
commit | 84827a7cb8d4b7a58309f98c7d4df4cfeb173935 (patch) | |
tree | b91494298eab93bbd8dd9b00722b7a30714a1b9c /indra/newview/llsurfacepatch.cpp | |
parent | 76101843c0d390c25a783f212eb1ea75e508ada4 (diff) | |
parent | 8b747cee182cd8e95063fa152d9b5d7383cb1c74 (diff) |
Merge pull request #1413 from secondlife/gltf-dev-maint-a-merge
Merge Maint A to development
Diffstat (limited to 'indra/newview/llsurfacepatch.cpp')
-rw-r--r-- | indra/newview/llsurfacepatch.cpp | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/indra/newview/llsurfacepatch.cpp b/indra/newview/llsurfacepatch.cpp index 92b1273041..9703e2ae27 100644 --- a/indra/newview/llsurfacepatch.cpp +++ b/indra/newview/llsurfacepatch.cpp @@ -47,11 +47,11 @@ extern U64MicrosecondsImplicit gFrameTime; extern LLPipeline gPipeline; LLSurfacePatch::LLSurfacePatch() -: mHasReceivedData(FALSE), - mSTexUpdate(FALSE), - mDirty(FALSE), - mDirtyZStats(TRUE), - mHeightsGenerated(FALSE), +: mHasReceivedData(false), + mSTexUpdate(false), + mDirty(false), + mDirtyZStats(true), + mHeightsGenerated(false), mDataOffset(0), mDataZ(NULL), mDataNorm(NULL), @@ -78,7 +78,7 @@ LLSurfacePatch::LLSurfacePatch() } for (i = 0; i < 9; i++) { - mNormalsInvalid[i] = TRUE; + mNormalsInvalid[i] = true; } } @@ -102,12 +102,12 @@ void LLSurfacePatch::dirty() LL_WARNS("Terrain") << "No viewer object for this surface patch!" << LL_ENDL; } - mDirtyZStats = TRUE; - mHeightsGenerated = FALSE; + mDirtyZStats = true; + mHeightsGenerated = false; if (!mDirty) { - mDirty = TRUE; + mDirty = true; mSurfacep->dirtySurfacePatch(this); } } @@ -137,7 +137,7 @@ void LLSurfacePatch::disconnectNeighbor(LLSurface *surfacep) if (getNeighborPatch(i)->mSurfacep == surfacep) { setNeighborPatch(i, NULL); - mNormalsInvalid[i] = TRUE; + mNormalsInvalid[i] = true; } } } @@ -603,14 +603,14 @@ void LLSurfacePatch::updateVerticalStats() mSurfacep->mMaxZ = llmax(mMaxZ, mSurfacep->mMaxZ); mSurfacep->mMinZ = llmin(mMinZ, mSurfacep->mMinZ); - mSurfacep->mHasZData = TRUE; + mSurfacep->mHasZData = true; mSurfacep->getRegion()->calculateCenterGlobal(); if (mVObjp) { mVObjp->dirtyPatch(); } - mDirtyZStats = FALSE; + mDirtyZStats = false; } @@ -624,7 +624,7 @@ void LLSurfacePatch::updateNormals() U32 grids_per_patch_edge = mSurfacep->getGridsPerPatchEdge(); U32 grids_per_edge = mSurfacep->getGridsPerEdge(); - BOOL dirty_patch = FALSE; + bool dirty_patch = false; U32 i, j; // update the east edge @@ -637,7 +637,7 @@ void LLSurfacePatch::updateNormals() calcNormal<PBR>(grids_per_patch_edge - 2, j, 2); } - dirty_patch = TRUE; + dirty_patch = true; } // update the north edge @@ -650,7 +650,7 @@ void LLSurfacePatch::updateNormals() calcNormal<PBR>(i, grids_per_patch_edge - 2, 2); } - dirty_patch = TRUE; + dirty_patch = true; } // update the west edge @@ -661,7 +661,7 @@ void LLSurfacePatch::updateNormals() calcNormal<PBR>(0, j, 2); calcNormal<PBR>(1, j, 2); } - dirty_patch = TRUE; + dirty_patch = true; } // update the south edge @@ -672,7 +672,7 @@ void LLSurfacePatch::updateNormals() calcNormal<PBR>(i, 0, 2); calcNormal<PBR>(i, 1, 2); } - dirty_patch = TRUE; + dirty_patch = true; } // Invalidating the northeast corner is different, because depending on what the adjacent neighbors are, @@ -763,7 +763,7 @@ void LLSurfacePatch::updateNormals() calcNormal<PBR>(i, j, 2); } } - dirty_patch = TRUE; + dirty_patch = true; } if (dirty_patch) @@ -773,7 +773,7 @@ void LLSurfacePatch::updateNormals() for (i = 0; i < 9; i++) { - mNormalsInvalid[i] = FALSE; + mNormalsInvalid[i] = false; } } @@ -844,7 +844,7 @@ void LLSurfacePatch::updateNorthEdge() } -BOOL LLSurfacePatch::updateTexture() +bool LLSurfacePatch::updateTexture() { if (mSTexUpdate) // Update texture as needed { @@ -867,11 +867,11 @@ BOOL LLSurfacePatch::updateTexture() if (comp->generateHeights((F32)origin_region[VX], (F32)origin_region[VY], patch_size, patch_size)) { - mHeightsGenerated = TRUE; + mHeightsGenerated = true; } else { - return FALSE; + return false; } } @@ -885,11 +885,11 @@ BOOL LLSurfacePatch::updateTexture() } } } - return FALSE; + return false; } else { - return TRUE; + return true; } } @@ -909,7 +909,7 @@ void LLSurfacePatch::updateGL() if (comp->generateMinimapTileLand((F32)origin_region[VX], (F32)origin_region[VY], tex_patch_size, tex_patch_size)) { - mSTexUpdate = FALSE; + mSTexUpdate = false; // Also generate the water texture mSurfacep->generateWaterTexture((F32)origin_region.mdV[VX], (F32)origin_region.mdV[VY], @@ -919,13 +919,13 @@ void LLSurfacePatch::updateGL() void LLSurfacePatch::dirtyZ() { - mSTexUpdate = TRUE; + mSTexUpdate = true; // Invalidate all normals in this patch U32 i; for (i = 0; i < 9; i++) { - mNormalsInvalid[i] = TRUE; + mNormalsInvalid[i] = true; } // Invalidate normals in this and neighboring patches @@ -933,12 +933,12 @@ void LLSurfacePatch::dirtyZ() { if (getNeighborPatch(i)) { - getNeighborPatch(i)->mNormalsInvalid[gDirOpposite[i]] = TRUE; + getNeighborPatch(i)->mNormalsInvalid[gDirOpposite[i]] = true; getNeighborPatch(i)->dirty(); if (i < 4) { - getNeighborPatch(i)->mNormalsInvalid[gDirAdjacent[gDirOpposite[i]][0]] = TRUE; - getNeighborPatch(i)->mNormalsInvalid[gDirAdjacent[gDirOpposite[i]][1]] = TRUE; + getNeighborPatch(i)->mNormalsInvalid[gDirAdjacent[gDirOpposite[i]][0]] = true; + getNeighborPatch(i)->mNormalsInvalid[gDirAdjacent[gDirOpposite[i]][1]] = true; } } } @@ -974,7 +974,7 @@ void LLSurfacePatch::setOriginGlobal(const LLVector3d &origin_global) mCenterRegion.mV[VX] = origin_region.mV[VX] + 0.5f*mSurfacep->getGridsPerPatchEdge()*mSurfacep->getMetersPerGrid(); mCenterRegion.mV[VY] = origin_region.mV[VY] + 0.5f*mSurfacep->getGridsPerPatchEdge()*mSurfacep->getMetersPerGrid(); - mVisInfo.mbIsVisible = FALSE; + mVisInfo.mbIsVisible = false; mVisInfo.mDistance = 512.0f; mVisInfo.mRenderLevel = 0; mVisInfo.mRenderStride = mSurfacep->getGridsPerPatchEdge(); @@ -984,8 +984,8 @@ void LLSurfacePatch::setOriginGlobal(const LLVector3d &origin_global) void LLSurfacePatch::connectNeighbor(LLSurfacePatch *neighbor_patchp, const U32 direction) { llassert(neighbor_patchp); - mNormalsInvalid[direction] = TRUE; - neighbor_patchp->mNormalsInvalid[gDirOpposite[direction]] = TRUE; + mNormalsInvalid[direction] = true; + neighbor_patchp->mNormalsInvalid[gDirOpposite[direction]] = true; setNeighborPatch(direction, neighbor_patchp); neighbor_patchp->setNeighborPatch(gDirOpposite[direction], this); @@ -1076,11 +1076,11 @@ void LLSurfacePatch::updateVisibility() } } } - mVisInfo.mbIsVisible = TRUE; + mVisInfo.mbIsVisible = true; } else { - mVisInfo.mbIsVisible = FALSE; + mVisInfo.mbIsVisible = false; } } @@ -1095,7 +1095,7 @@ LLVector3 LLSurfacePatch::getOriginAgent() const return gAgent.getPosAgentFromGlobal(mOriginGlobal); } -BOOL LLSurfacePatch::getVisible() const +bool LLSurfacePatch::getVisible() const { return mVisInfo.mbIsVisible; } @@ -1112,10 +1112,10 @@ S32 LLSurfacePatch::getRenderLevel() const void LLSurfacePatch::setHasReceivedData() { - mHasReceivedData = TRUE; + mHasReceivedData = true; } -BOOL LLSurfacePatch::getHasReceivedData() const +bool LLSurfacePatch::getHasReceivedData() const { return mHasReceivedData; } @@ -1180,11 +1180,11 @@ F32 LLSurfacePatch::getMaxComposition() const void LLSurfacePatch::setNeighborPatch(const U32 direction, LLSurfacePatch *neighborp) { mNeighborPatches[direction] = neighborp; - mNormalsInvalid[direction] = TRUE; + mNormalsInvalid[direction] = true; if (direction < 4) { - mNormalsInvalid[gDirAdjacent[direction][0]] = TRUE; - mNormalsInvalid[gDirAdjacent[direction][1]] = TRUE; + mNormalsInvalid[gDirAdjacent[direction][0]] = true; + mNormalsInvalid[gDirAdjacent[direction][1]] = true; } } |