diff options
| author | Erik Kundiman <erik@megapahit.org> | 2026-09-22 14:47:19 +0800 |
|---|---|---|
| committer | Erik Kundiman <erik@megapahit.org> | 2026-09-22 14:47:19 +0800 |
| commit | 8557e9659ca5b71aabcbb21758be03a959c2098d (patch) | |
| tree | e9c2cb659b646169e8d0c502b0ff873fec05ac02 /indra/llmath/llvolume.cpp | |
| parent | 235a9d87ecf0447bd4aca3287548c715f1ada2ad (diff) | |
| parent | f767219366b8dbaeea95a22bd9953a587f473298 (diff) | |
Merge tag 'Second_Life_Release#f7672193-26.4' into 26.4
Diffstat (limited to 'indra/llmath/llvolume.cpp')
| -rw-r--r-- | indra/llmath/llvolume.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index c49d5ff7d3..a029fea992 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -3289,7 +3289,7 @@ S32 sculpt_sides(F32 detail) } } -static bool validate_sculpt_geometry(const LLVolume* volume) +static bool validate_sculpt_geometry(const LLVolume* volume, bool validate_area) { if (!volume || volume->getNumVolumeFaces() == 0) { @@ -3365,7 +3365,7 @@ static bool validate_sculpt_geometry(const LLVolume* volume) F32 area_ratio = total_triangle_area / bounding_surface; constexpr F32 MAX_AREA_TO_AREA_RATIO = 16.0f; - if (area_ratio > MAX_AREA_TO_AREA_RATIO) + if (validate_area && area_ratio > MAX_AREA_TO_AREA_RATIO) { LL_DEBUGS("LLVOLUME") << "Sculpt rejected: excessive triangle area." << " Face index: " << face_idx @@ -3417,7 +3417,7 @@ static void sculpt_calc_mesh_resolution(U16 width, U16 height, U8 type, F32 deta } // sculpt replaces generate() for sculpted surfaces -void LLVolume::sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8* sculpt_data, S32 sculpt_level, bool visible_placeholder) +void LLVolume::sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8* sculpt_data, S32 sculpt_level, bool visible_placeholder, bool validate_area) { U8 sculpt_type = mParams.getSculptType(); @@ -3528,7 +3528,7 @@ void LLVolume::sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, // Todo: can this be backed into createVolumeFaces? // Or calculated without having to call createVolumeFaces first? // Todo 2: should the same be done for meshes? - valid_geometry = validate_sculpt_geometry(this); + valid_geometry = validate_sculpt_geometry(this, validate_area); mSculptValidationCache[sculpt_level] = valid_geometry ? LLSculptValidationState::Valid : LLSculptValidationState::Invalid; if (!valid_geometry) |
