From 366bcd0cbca43081fe58825fd463018e49b51740 Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Mon, 27 Oct 2014 17:10:08 +0200 Subject: MAINT-4435 FIXED fix in llvolume.cpp Perform full build if number of vertices less than allowed. Changes in all other files relate auxiliary methods for catching similar bugs in future. --- indra/llmath/llvolume.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/llmath/llvolume.cpp') diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index d9a68cb577..98ff36c363 100755 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -6284,6 +6284,8 @@ BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build) num_vertices = mNumS*mNumT; num_indices = (mNumS-1)*(mNumT-1)*6; + partial_build = (num_vertices > mNumVertices || num_indices > mNumIndices) ? FALSE : partial_build; + if (!partial_build) { resizeVertices(num_vertices); -- cgit v1.2.3 From 4364a8cccd1cbfdbea93b4332416fad1f6598436 Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Mon, 24 Nov 2014 18:41:51 +0200 Subject: MAINT-3529 FIXED Certain pathcuts made to a cube cause some faces to not react to sunlight or local lights --- indra/llmath/llvolume.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/llmath/llvolume.cpp') diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 98ff36c363..ee2d57a562 100755 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -5970,7 +5970,10 @@ BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build) } else { //degenerate, make up a value - normal.set(0,0,1); + if(normal.getF32ptr()[2] >= 0) + normal.set(0.f,0.f,1.f); + else + normal.set(0.f,0.f,-1.f); } llassert(llfinite(normal.getF32ptr()[0])); -- cgit v1.2.3 From b3c8a559f6e6f340286204328e250312b2e467c5 Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Fri, 28 Nov 2014 18:17:54 +0200 Subject: MAINT-3494 FIXED Generate Normals checkbox does not control generation of normals. --- indra/llmath/llvolume.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'indra/llmath/llvolume.cpp') diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index ee2d57a562..8d6b3b926c 100755 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -2685,6 +2685,17 @@ void LLVolume::setMeshAssetLoaded(BOOL loaded) mIsMeshAssetLoaded = loaded; } +void LLVolume::copyFacesTo(std::vector &faces) const +{ + faces = mVolumeFaces; +} + +void LLVolume::copyFacesFrom(const std::vector &faces) +{ + mVolumeFaces = std::move(faces); + mSculptLevel = 0; +} + void LLVolume::copyVolumeFaces(const LLVolume* volume) { mVolumeFaces = volume->mVolumeFaces; -- cgit v1.2.3 From 1be14992c6d92f8e32068704190650229c2de88f Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Tue, 2 Dec 2014 12:09:50 +0200 Subject: MAINT-3494 FIXED Generate Normals checkbox does not control generation of normals. Patchset #2 --- indra/llmath/llvolume.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llmath/llvolume.cpp') diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 8d6b3b926c..adf6e790d3 100755 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -2692,7 +2692,7 @@ void LLVolume::copyFacesTo(std::vector &faces) const void LLVolume::copyFacesFrom(const std::vector &faces) { - mVolumeFaces = std::move(faces); + mVolumeFaces = faces; mSculptLevel = 0; } -- cgit v1.2.3