diff options
author | David Walter Seikel | 2014-02-03 15:23:22 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-02-03 15:23:22 +1000 |
commit | d056a17f05a1f90708f554651475e116a2ddbd68 (patch) | |
tree | 07fa4f1cca2a25548b8d2d6b4752b07d8efbd2ff /linden/indra/llmath | |
parent | Updating tree and volume LOD. These go to eleven. (diff) | |
parent | Fix up OTR prefs to not crash. (diff) | |
download | meta-impy-d056a17f05a1f90708f554651475e116a2ddbd68.zip meta-impy-d056a17f05a1f90708f554651475e116a2ddbd68.tar.gz meta-impy-d056a17f05a1f90708f554651475e116a2ddbd68.tar.bz2 meta-impy-d056a17f05a1f90708f554651475e116a2ddbd68.tar.xz |
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llmath/llsdutil_math.cpp | 14 | ||||
-rw-r--r-- | linden/indra/llmath/llvolume.cpp | 9 |
2 files changed, 7 insertions, 16 deletions
diff --git a/linden/indra/llmath/llsdutil_math.cpp b/linden/indra/llmath/llsdutil_math.cpp index 073cb2e..8ec8661 100644 --- a/linden/indra/llmath/llsdutil_math.cpp +++ b/linden/indra/llmath/llsdutil_math.cpp | |||
@@ -6,7 +6,7 @@ | |||
6 | * | 6 | * |
7 | * $LicenseInfo:firstyear=2006&license=viewergpl$ | 7 | * $LicenseInfo:firstyear=2006&license=viewergpl$ |
8 | * | 8 | * |
9 | * Copyright (c) 2006-2009, Linden Research, Inc. | 9 | * Copyright (c) 2006-2010, Linden Research, Inc. |
10 | * | 10 | * |
11 | * Second Life Viewer Source Code | 11 | * Second Life Viewer Source Code |
12 | * The source code in this file ("Source Code") is provided by Linden Lab | 12 | * The source code in this file ("Source Code") is provided by Linden Lab |
@@ -14,13 +14,13 @@ | |||
14 | * ("GPL"), unless you have obtained a separate licensing agreement | 14 | * ("GPL"), unless you have obtained a separate licensing agreement |
15 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 15 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
16 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 16 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
17 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 | 17 | * online at http://secondlife.com/developers/opensource/gplv2 |
18 | * | 18 | * |
19 | * There are special exceptions to the terms and conditions of the GPL as | 19 | * There are special exceptions to the terms and conditions of the GPL as |
20 | * it is applied to this Source Code. View the full text of the exception | 20 | * it is applied to this Source Code. View the full text of the exception |
21 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 21 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
22 | * online at | 22 | * online at |
23 | * http://secondlifegrid.net/programs/open_source/licensing/flossexception | 23 | * http://secondlife.com/developers/opensource/flossexception |
24 | * | 24 | * |
25 | * By copying, modifying or distributing this software, you acknowledge | 25 | * By copying, modifying or distributing this software, you acknowledge |
26 | * that you have read and understood your obligations described above, | 26 | * that you have read and understood your obligations described above, |
@@ -30,11 +30,12 @@ | |||
30 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 30 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
31 | * COMPLETENESS OR PERFORMANCE. | 31 | * COMPLETENESS OR PERFORMANCE. |
32 | * $/LicenseInfo$ | 32 | * $/LicenseInfo$ |
33 | * | ||
33 | */ | 34 | */ |
34 | 35 | ||
35 | #include "linden_common.h" | 36 | #include "linden_common.h" |
36 | 37 | ||
37 | #include "llsdutil.h" | 38 | #include "llsdutil_math.h" |
38 | 39 | ||
39 | #include "v3math.h" | 40 | #include "v3math.h" |
40 | #include "v4math.h" | 41 | #include "v4math.h" |
@@ -165,9 +166,6 @@ LLSD ll_sd_from_color4(const LLColor4& c) | |||
165 | LLColor4 ll_color4_from_sd(const LLSD& sd) | 166 | LLColor4 ll_color4_from_sd(const LLSD& sd) |
166 | { | 167 | { |
167 | LLColor4 c; | 168 | LLColor4 c; |
168 | c.mV[0] = (F32)sd[0].asReal(); | 169 | c.setValue(sd); |
169 | c.mV[1] = (F32)sd[1].asReal(); | ||
170 | c.mV[2] = (F32)sd[2].asReal(); | ||
171 | c.mV[3] = (F32)sd[3].asReal(); | ||
172 | return c; | 170 | return c; |
173 | } | 171 | } |
diff --git a/linden/indra/llmath/llvolume.cpp b/linden/indra/llmath/llvolume.cpp index 618048c..9dc3746 100644 --- a/linden/indra/llmath/llvolume.cpp +++ b/linden/indra/llmath/llvolume.cpp | |||
@@ -4437,14 +4437,7 @@ BOOL LLVolumeFace::createUnCutCubeCap(LLVolume* volume, BOOL partial_build) | |||
4437 | const std::vector<LLVector3>& profile = volume->getProfile().mProfile; | 4437 | const std::vector<LLVector3>& profile = volume->getProfile().mProfile; |
4438 | S32 max_s = volume->getProfile().getTotal(); | 4438 | S32 max_s = volume->getProfile().getTotal(); |
4439 | S32 max_t = volume->getPath().mPath.size(); | 4439 | S32 max_t = volume->getPath().mPath.size(); |
4440 | 4440 | S32 grid_size = (profile.size() - 1) / 4; | |
4441 | // S32 i; | ||
4442 | S32 num_vertices = 0, num_indices = 0; | ||
4443 | S32 grid_size = (profile.size()-1)/4; | ||
4444 | S32 quad_count = (grid_size * grid_size); | ||
4445 | |||
4446 | num_vertices = (grid_size+1)*(grid_size+1); | ||
4447 | num_indices = quad_count * 4; | ||
4448 | 4441 | ||
4449 | LLVector3& min = mExtents[0]; | 4442 | LLVector3& min = mExtents[0]; |
4450 | LLVector3& max = mExtents[1]; | 4443 | LLVector3& max = mExtents[1]; |