diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llmath/llcrc.cpp | 2 | ||||
-rw-r--r-- | linden/indra/llmath/llcrc.h | 2 | ||||
-rw-r--r-- | linden/indra/llmath/llmath_vc8.vcproj | 16 | ||||
-rw-r--r-- | linden/indra/llmath/llmath_vc9.vcproj | 16 | ||||
-rw-r--r-- | linden/indra/llmath/llmd5.cpp | 4 | ||||
-rw-r--r-- | linden/indra/llmath/llmd5.h | 4 | ||||
-rw-r--r-- | linden/indra/llmath/lloctree.h | 4 | ||||
-rw-r--r-- | linden/indra/llmath/llvolume.cpp | 68 | ||||
-rw-r--r-- | linden/indra/llmath/llvolume.h | 25 | ||||
-rw-r--r-- | linden/indra/llmath/m4math.h | 16 |
10 files changed, 98 insertions, 59 deletions
diff --git a/linden/indra/llmath/llcrc.cpp b/linden/indra/llmath/llcrc.cpp index 2338691..447521a 100644 --- a/linden/indra/llmath/llcrc.cpp +++ b/linden/indra/llmath/llcrc.cpp | |||
@@ -171,7 +171,7 @@ void LLCRC::update(const char* filename) | |||
171 | return; | 171 | return; |
172 | } | 172 | } |
173 | 173 | ||
174 | FILE* fp = LLFile::fopen(filename, "rb"); /* Flawfinder: ignore */ | 174 | LLFILE* fp = LLFile::fopen(filename, "rb"); /* Flawfinder: ignore */ |
175 | 175 | ||
176 | if (fp) | 176 | if (fp) |
177 | { | 177 | { |
diff --git a/linden/indra/llmath/llcrc.h b/linden/indra/llmath/llcrc.h index 64e939c..59f58ce 100644 --- a/linden/indra/llmath/llcrc.h +++ b/linden/indra/llmath/llcrc.h | |||
@@ -41,7 +41,7 @@ | |||
41 | // example (don't try this at work kids): | 41 | // example (don't try this at work kids): |
42 | // | 42 | // |
43 | // LLCRC crc; | 43 | // LLCRC crc; |
44 | // FILE* fp = LLFile::fopen(filename,"rb"); | 44 | // LLFILE* fp = LLFile::fopen(filename,"rb"); |
45 | // while(!feof(fp)) { | 45 | // while(!feof(fp)) { |
46 | // crc.update(fgetc(fp)); | 46 | // crc.update(fgetc(fp)); |
47 | // } | 47 | // } |
diff --git a/linden/indra/llmath/llmath_vc8.vcproj b/linden/indra/llmath/llmath_vc8.vcproj index e85a852..3b4413a 100644 --- a/linden/indra/llmath/llmath_vc8.vcproj +++ b/linden/indra/llmath/llmath_vc8.vcproj | |||
@@ -246,6 +246,10 @@ | |||
246 | > | 246 | > |
247 | </File> | 247 | </File> |
248 | <File | 248 | <File |
249 | RelativePath=".\llline.cpp" | ||
250 | > | ||
251 | </File> | ||
252 | <File | ||
249 | RelativePath=".\llmd5.cpp" | 253 | RelativePath=".\llmd5.cpp" |
250 | > | 254 | > |
251 | </File> | 255 | </File> |
@@ -266,6 +270,10 @@ | |||
266 | > | 270 | > |
267 | </File> | 271 | </File> |
268 | <File | 272 | <File |
273 | RelativePath=".\llsphere.cpp" | ||
274 | > | ||
275 | </File> | ||
276 | <File | ||
269 | RelativePath=".\lluuid.cpp" | 277 | RelativePath=".\lluuid.cpp" |
270 | > | 278 | > |
271 | </File> | 279 | </File> |
@@ -352,6 +360,10 @@ | |||
352 | > | 360 | > |
353 | </File> | 361 | </File> |
354 | <File | 362 | <File |
363 | RelativePath=".\llline.h" | ||
364 | > | ||
365 | </File> | ||
366 | <File | ||
355 | RelativePath=".\llmath.h" | 367 | RelativePath=".\llmath.h" |
356 | > | 368 | > |
357 | </File> | 369 | </File> |
@@ -384,6 +396,10 @@ | |||
384 | > | 396 | > |
385 | </File> | 397 | </File> |
386 | <File | 398 | <File |
399 | RelativePath=".\llsphere.h" | ||
400 | > | ||
401 | </File> | ||
402 | <File | ||
387 | RelativePath=".\lltreenode.h" | 403 | RelativePath=".\lltreenode.h" |
388 | > | 404 | > |
389 | </File> | 405 | </File> |
diff --git a/linden/indra/llmath/llmath_vc9.vcproj b/linden/indra/llmath/llmath_vc9.vcproj index 6d60d1e..03bc780 100644 --- a/linden/indra/llmath/llmath_vc9.vcproj +++ b/linden/indra/llmath/llmath_vc9.vcproj | |||
@@ -247,6 +247,10 @@ | |||
247 | > | 247 | > |
248 | </File> | 248 | </File> |
249 | <File | 249 | <File |
250 | RelativePath=".\llline.cpp" | ||
251 | > | ||
252 | </File> | ||
253 | <File | ||
250 | RelativePath=".\llmd5.cpp" | 254 | RelativePath=".\llmd5.cpp" |
251 | > | 255 | > |
252 | </File> | 256 | </File> |
@@ -267,6 +271,10 @@ | |||
267 | > | 271 | > |
268 | </File> | 272 | </File> |
269 | <File | 273 | <File |
274 | RelativePath=".\llsphere.cpp" | ||
275 | > | ||
276 | </File> | ||
277 | <File | ||
270 | RelativePath=".\lluuid.cpp" | 278 | RelativePath=".\lluuid.cpp" |
271 | > | 279 | > |
272 | </File> | 280 | </File> |
@@ -353,6 +361,10 @@ | |||
353 | > | 361 | > |
354 | </File> | 362 | </File> |
355 | <File | 363 | <File |
364 | RelativePath=".\llline.h" | ||
365 | > | ||
366 | </File> | ||
367 | <File | ||
356 | RelativePath=".\llmath.h" | 368 | RelativePath=".\llmath.h" |
357 | > | 369 | > |
358 | </File> | 370 | </File> |
@@ -385,6 +397,10 @@ | |||
385 | > | 397 | > |
386 | </File> | 398 | </File> |
387 | <File | 399 | <File |
400 | RelativePath=".\llsphere.h" | ||
401 | > | ||
402 | </File> | ||
403 | <File | ||
388 | RelativePath=".\lltreenode.h" | 404 | RelativePath=".\lltreenode.h" |
389 | > | 405 | > |
390 | </File> | 406 | </File> |
diff --git a/linden/indra/llmath/llmd5.cpp b/linden/indra/llmath/llmd5.cpp index a0ac92f..ea69002 100644 --- a/linden/indra/llmath/llmd5.cpp +++ b/linden/indra/llmath/llmd5.cpp | |||
@@ -157,7 +157,7 @@ void LLMD5::update (const uint1 *input, const uint4 input_length) { | |||
157 | // MD5 update for files. | 157 | // MD5 update for files. |
158 | // Like above, except that it works on files (and uses above as a primitive.) | 158 | // Like above, except that it works on files (and uses above as a primitive.) |
159 | 159 | ||
160 | void LLMD5::update(FILE* file){ | 160 | void LLMD5::update(LLFILE* file){ |
161 | 161 | ||
162 | unsigned char buffer[BLOCK_LEN]; /* Flawfinder: ignore */ | 162 | unsigned char buffer[BLOCK_LEN]; /* Flawfinder: ignore */ |
163 | int len; | 163 | int len; |
@@ -237,7 +237,7 @@ void LLMD5::finalize (){ | |||
237 | 237 | ||
238 | 238 | ||
239 | 239 | ||
240 | LLMD5::LLMD5(FILE *file){ | 240 | LLMD5::LLMD5(LLFILE *file){ |
241 | 241 | ||
242 | init(); // must be called be all constructors | 242 | init(); // must be called be all constructors |
243 | update(file); | 243 | update(file); |
diff --git a/linden/indra/llmath/llmd5.h b/linden/indra/llmath/llmd5.h index 6d21b31..9ba0a9f 100644 --- a/linden/indra/llmath/llmd5.h +++ b/linden/indra/llmath/llmd5.h | |||
@@ -93,14 +93,14 @@ public: | |||
93 | LLMD5 (); // simple initializer | 93 | LLMD5 (); // simple initializer |
94 | void update (const uint1 *input, const uint4 input_length); | 94 | void update (const uint1 *input, const uint4 input_length); |
95 | void update (std::istream& stream); | 95 | void update (std::istream& stream); |
96 | void update (FILE *file); | 96 | void update (LLFILE *file); |
97 | void finalize (); | 97 | void finalize (); |
98 | 98 | ||
99 | // constructors for special circumstances. All these constructors finalize | 99 | // constructors for special circumstances. All these constructors finalize |
100 | // the MD5 context. | 100 | // the MD5 context. |
101 | LLMD5 (const unsigned char *string); // digest string, finalize | 101 | LLMD5 (const unsigned char *string); // digest string, finalize |
102 | LLMD5 (std::istream& stream); // digest stream, finalize | 102 | LLMD5 (std::istream& stream); // digest stream, finalize |
103 | LLMD5 (FILE *file); // digest file, close, finalize | 103 | LLMD5 (LLFILE *file); // digest file, close, finalize |
104 | LLMD5 (const unsigned char *string, const unsigned int number); | 104 | LLMD5 (const unsigned char *string, const unsigned int number); |
105 | 105 | ||
106 | // methods to acquire finalized result | 106 | // methods to acquire finalized result |
diff --git a/linden/indra/llmath/lloctree.h b/linden/indra/llmath/lloctree.h index 52ad1bb..e26bae5 100644 --- a/linden/indra/llmath/lloctree.h +++ b/linden/indra/llmath/lloctree.h | |||
@@ -38,9 +38,9 @@ | |||
38 | #include <set> | 38 | #include <set> |
39 | 39 | ||
40 | #ifdef LL_RELEASE_FOR_DOWNLOAD | 40 | #ifdef LL_RELEASE_FOR_DOWNLOAD |
41 | #define OCT_ERRS llwarns | 41 | #define OCT_ERRS LL_WARNS("OctreeErrors") |
42 | #else | 42 | #else |
43 | #define OCT_ERRS llerrs | 43 | #define OCT_ERRS LL_ERRS("OctreeErrors") |
44 | #endif | 44 | #endif |
45 | 45 | ||
46 | #define LL_OCTREE_PARANOIA_CHECK 0 | 46 | #define LL_OCTREE_PARANOIA_CHECK 0 |
diff --git a/linden/indra/llmath/llvolume.cpp b/linden/indra/llmath/llvolume.cpp index 527100a..f7c9286 100644 --- a/linden/indra/llmath/llvolume.cpp +++ b/linden/indra/llmath/llvolume.cpp | |||
@@ -770,7 +770,7 @@ BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detai | |||
770 | 770 | ||
771 | 771 | ||
772 | 772 | ||
773 | BOOL LLProfileParams::importFile(FILE *fp) | 773 | BOOL LLProfileParams::importFile(LLFILE *fp) |
774 | { | 774 | { |
775 | LLMemType m1(LLMemType::MTYPE_VOLUME); | 775 | LLMemType m1(LLMemType::MTYPE_VOLUME); |
776 | 776 | ||
@@ -834,7 +834,7 @@ BOOL LLProfileParams::importFile(FILE *fp) | |||
834 | } | 834 | } |
835 | 835 | ||
836 | 836 | ||
837 | BOOL LLProfileParams::exportFile(FILE *fp) const | 837 | BOOL LLProfileParams::exportFile(LLFILE *fp) const |
838 | { | 838 | { |
839 | fprintf(fp,"\t\tprofile 0\n"); | 839 | fprintf(fp,"\t\tprofile 0\n"); |
840 | fprintf(fp,"\t\t{\n"); | 840 | fprintf(fp,"\t\t{\n"); |
@@ -1282,7 +1282,7 @@ BOOL LLDynamicPath::generate(const LLPathParams& params, F32 detail, S32 split, | |||
1282 | } | 1282 | } |
1283 | 1283 | ||
1284 | 1284 | ||
1285 | BOOL LLPathParams::importFile(FILE *fp) | 1285 | BOOL LLPathParams::importFile(LLFILE *fp) |
1286 | { | 1286 | { |
1287 | LLMemType m1(LLMemType::MTYPE_VOLUME); | 1287 | LLMemType m1(LLMemType::MTYPE_VOLUME); |
1288 | 1288 | ||
@@ -1403,7 +1403,7 @@ BOOL LLPathParams::importFile(FILE *fp) | |||
1403 | } | 1403 | } |
1404 | 1404 | ||
1405 | 1405 | ||
1406 | BOOL LLPathParams::exportFile(FILE *fp) const | 1406 | BOOL LLPathParams::exportFile(LLFILE *fp) const |
1407 | { | 1407 | { |
1408 | fprintf(fp, "\t\tpath 0\n"); | 1408 | fprintf(fp, "\t\tpath 0\n"); |
1409 | fprintf(fp, "\t\t{\n"); | 1409 | fprintf(fp, "\t\t{\n"); |
@@ -1874,7 +1874,6 @@ inline LLVector3 sculpt_rgb_to_vector(U8 r, U8 g, U8 b) | |||
1874 | inline U32 sculpt_xy_to_index(U32 x, U32 y, U16 sculpt_width, U16 sculpt_height, S8 sculpt_components) | 1874 | inline U32 sculpt_xy_to_index(U32 x, U32 y, U16 sculpt_width, U16 sculpt_height, S8 sculpt_components) |
1875 | { | 1875 | { |
1876 | U32 index = (x + y * sculpt_width) * sculpt_components; | 1876 | U32 index = (x + y * sculpt_width) * sculpt_components; |
1877 | |||
1878 | return index; | 1877 | return index; |
1879 | } | 1878 | } |
1880 | 1879 | ||
@@ -3560,18 +3559,22 @@ BOOL LLVolume::cleanupTriangleData( const S32 num_input_vertices, | |||
3560 | LLMemType m1(LLMemType::MTYPE_VOLUME); | 3559 | LLMemType m1(LLMemType::MTYPE_VOLUME); |
3561 | 3560 | ||
3562 | /* Testing: avoid any cleanup | 3561 | /* Testing: avoid any cleanup |
3563 | num_output_vertices = num_input_vertices; | 3562 | static BOOL skip_cleanup = TRUE; |
3564 | num_output_triangles = num_input_triangles; | 3563 | if ( skip_cleanup ) |
3565 | |||
3566 | *output_vertices = new LLVector3[num_input_vertices]; | ||
3567 | for (S32 i = 0; i < num_input_vertices; i++) | ||
3568 | { | 3564 | { |
3569 | (*output_vertices)[i] = input_vertices[i].mPos; | 3565 | num_output_vertices = num_input_vertices; |
3570 | } | 3566 | num_output_triangles = num_input_triangles; |
3571 | 3567 | ||
3572 | *output_triangles = new S32[num_input_triangles*3]; | 3568 | *output_vertices = new LLVector3[num_input_vertices]; |
3573 | memcpy(*output_triangles, input_triangles, 3*num_input_triangles*sizeof(S32)); // Flawfinder: ignore | 3569 | for (S32 index = 0; index < num_input_vertices; index++) |
3574 | return TRUE; | 3570 | { |
3571 | (*output_vertices)[index] = input_vertices[index].mPos; | ||
3572 | } | ||
3573 | |||
3574 | *output_triangles = new S32[num_input_triangles*3]; | ||
3575 | memcpy(*output_triangles, input_triangles, 3*num_input_triangles*sizeof(S32)); // Flawfinder: ignore | ||
3576 | return TRUE; | ||
3577 | } | ||
3575 | */ | 3578 | */ |
3576 | 3579 | ||
3577 | // Here's how we do this: | 3580 | // Here's how we do this: |
@@ -3637,8 +3640,8 @@ BOOL LLVolume::cleanupTriangleData( const S32 num_input_vertices, | |||
3637 | for (i = 0; i < num_input_triangles; i++) | 3640 | for (i = 0; i < num_input_triangles; i++) |
3638 | { | 3641 | { |
3639 | S32 v1 = i*3; | 3642 | S32 v1 = i*3; |
3640 | S32 v2 = i*3 + 1; | 3643 | S32 v2 = v1 + 1; |
3641 | S32 v3 = i*3 + 2; | 3644 | S32 v3 = v1 + 2; |
3642 | 3645 | ||
3643 | //llinfos << "Checking triangle " << input_triangles[v1] << ":" << input_triangles[v2] << ":" << input_triangles[v3] << llendl; | 3646 | //llinfos << "Checking triangle " << input_triangles[v1] << ":" << input_triangles[v2] << ":" << input_triangles[v3] << llendl; |
3644 | input_triangles[v1] = vertex_mapping[input_triangles[v1]]; | 3647 | input_triangles[v1] = vertex_mapping[input_triangles[v1]]; |
@@ -3774,7 +3777,7 @@ BOOL LLVolume::cleanupTriangleData( const S32 num_input_vertices, | |||
3774 | } | 3777 | } |
3775 | 3778 | ||
3776 | 3779 | ||
3777 | BOOL LLVolumeParams::importFile(FILE *fp) | 3780 | BOOL LLVolumeParams::importFile(LLFILE *fp) |
3778 | { | 3781 | { |
3779 | LLMemType m1(LLMemType::MTYPE_VOLUME); | 3782 | LLMemType m1(LLMemType::MTYPE_VOLUME); |
3780 | 3783 | ||
@@ -3819,7 +3822,7 @@ BOOL LLVolumeParams::importFile(FILE *fp) | |||
3819 | return TRUE; | 3822 | return TRUE; |
3820 | } | 3823 | } |
3821 | 3824 | ||
3822 | BOOL LLVolumeParams::exportFile(FILE *fp) const | 3825 | BOOL LLVolumeParams::exportFile(LLFILE *fp) const |
3823 | { | 3826 | { |
3824 | fprintf(fp,"\tshape 0\n"); | 3827 | fprintf(fp,"\tshape 0\n"); |
3825 | fprintf(fp,"\t{\n"); | 3828 | fprintf(fp,"\t{\n"); |
@@ -3938,16 +3941,19 @@ const F32 MIN_CONCAVE_PATH_WEDGE = 0.111111f; // 1/9 unity | |||
3938 | BOOL LLVolumeParams::isConvex() const | 3941 | BOOL LLVolumeParams::isConvex() const |
3939 | { | 3942 | { |
3940 | F32 path_length = mPathParams.getEnd() - mPathParams.getBegin(); | 3943 | F32 path_length = mPathParams.getEnd() - mPathParams.getBegin(); |
3944 | F32 hollow = mProfileParams.getHollow(); | ||
3941 | 3945 | ||
3942 | if ( mPathParams.getTwist() != mPathParams.getTwistBegin() | 3946 | U8 path_type = mPathParams.getCurveType(); |
3943 | && path_length > MIN_CONCAVE_PATH_WEDGE ) | 3947 | if ( path_length > MIN_CONCAVE_PATH_WEDGE |
3948 | && ( mPathParams.getTwist() != mPathParams.getTwistBegin() | ||
3949 | || (hollow > 0.f | ||
3950 | && LL_PCODE_PATH_LINE != path_type) ) ) | ||
3944 | { | 3951 | { |
3945 | // twist along a "not too short" path is concave | 3952 | // twist along a "not too short" path is concave |
3946 | return FALSE; | 3953 | return FALSE; |
3947 | } | 3954 | } |
3948 | 3955 | ||
3949 | F32 profile_length = mProfileParams.getEnd() - mProfileParams.getBegin(); | 3956 | F32 profile_length = mProfileParams.getEnd() - mProfileParams.getBegin(); |
3950 | F32 hollow = mProfileParams.getHollow(); | ||
3951 | BOOL same_hole = hollow == 0.f | 3957 | BOOL same_hole = hollow == 0.f |
3952 | || (mProfileParams.getCurveType() & LL_PCODE_HOLE_MASK) == LL_PCODE_HOLE_SAME; | 3958 | || (mProfileParams.getCurveType() & LL_PCODE_HOLE_MASK) == LL_PCODE_HOLE_SAME; |
3953 | 3959 | ||
@@ -3971,7 +3977,6 @@ BOOL LLVolumeParams::isConvex() const | |||
3971 | return FALSE; | 3977 | return FALSE; |
3972 | } | 3978 | } |
3973 | 3979 | ||
3974 | U8 path_type = mPathParams.getCurveType(); | ||
3975 | if ( LL_PCODE_PATH_LINE == path_type ) | 3980 | if ( LL_PCODE_PATH_LINE == path_type ) |
3976 | { | 3981 | { |
3977 | // straight paths with convex profile | 3982 | // straight paths with convex profile |
@@ -4176,18 +4181,6 @@ std::ostream& operator<<(std::ostream &s, const LLVolume *volumep) | |||
4176 | } | 4181 | } |
4177 | 4182 | ||
4178 | 4183 | ||
4179 | LLVolumeFace::LLVolumeFace() | ||
4180 | { | ||
4181 | mTypeMask = 0; | ||
4182 | mID = 0; | ||
4183 | mBeginS = 0; | ||
4184 | mBeginT = 0; | ||
4185 | mNumS = 0; | ||
4186 | mNumT = 0; | ||
4187 | mHasBinormals = FALSE; | ||
4188 | } | ||
4189 | |||
4190 | |||
4191 | BOOL LLVolumeFace::create(LLVolume* volume, BOOL partial_build) | 4184 | BOOL LLVolumeFace::create(LLVolume* volume, BOOL partial_build) |
4192 | { | 4185 | { |
4193 | if (mTypeMask & CAP_MASK) | 4186 | if (mTypeMask & CAP_MASK) |
@@ -4796,6 +4789,11 @@ BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build) | |||
4796 | mIndices.resize(num_indices); | 4789 | mIndices.resize(num_indices); |
4797 | mEdge.resize(num_indices); | 4790 | mEdge.resize(num_indices); |
4798 | } | 4791 | } |
4792 | else | ||
4793 | { | ||
4794 | mHasBinormals = FALSE; | ||
4795 | } | ||
4796 | |||
4799 | 4797 | ||
4800 | LLVector3& face_min = mExtents[0]; | 4798 | LLVector3& face_min = mExtents[0]; |
4801 | LLVector3& face_max = mExtents[1]; | 4799 | LLVector3& face_max = mExtents[1]; |
diff --git a/linden/indra/llmath/llvolume.h b/linden/indra/llmath/llvolume.h index c239685..5b48cfc 100644 --- a/linden/indra/llmath/llvolume.h +++ b/linden/indra/llmath/llvolume.h | |||
@@ -52,6 +52,7 @@ class LLVolume; | |||
52 | #include "llstrider.h" | 52 | #include "llstrider.h" |
53 | #include "v4coloru.h" | 53 | #include "v4coloru.h" |
54 | #include "llmemory.h" | 54 | #include "llmemory.h" |
55 | #include "llfile.h" | ||
55 | 56 | ||
56 | //============================================================================ | 57 | //============================================================================ |
57 | 58 | ||
@@ -229,8 +230,8 @@ public: | |||
229 | 230 | ||
230 | void copyParams(const LLProfileParams ¶ms); | 231 | void copyParams(const LLProfileParams ¶ms); |
231 | 232 | ||
232 | BOOL importFile(FILE *fp); | 233 | BOOL importFile(LLFILE *fp); |
233 | BOOL exportFile(FILE *fp) const; | 234 | BOOL exportFile(LLFILE *fp) const; |
234 | 235 | ||
235 | BOOL importLegacyStream(std::istream& input_stream); | 236 | BOOL importLegacyStream(std::istream& input_stream); |
236 | BOOL exportLegacyStream(std::ostream& output_stream) const; | 237 | BOOL exportLegacyStream(std::ostream& output_stream) const; |
@@ -354,8 +355,8 @@ public: | |||
354 | 355 | ||
355 | void copyParams(const LLPathParams ¶ms); | 356 | void copyParams(const LLPathParams ¶ms); |
356 | 357 | ||
357 | BOOL importFile(FILE *fp); | 358 | BOOL importFile(LLFILE *fp); |
358 | BOOL exportFile(FILE *fp) const; | 359 | BOOL exportFile(LLFILE *fp) const; |
359 | 360 | ||
360 | BOOL importLegacyStream(std::istream& input_stream); | 361 | BOOL importLegacyStream(std::istream& input_stream); |
361 | BOOL exportLegacyStream(std::ostream& output_stream) const; | 362 | BOOL exportLegacyStream(std::ostream& output_stream) const; |
@@ -545,8 +546,8 @@ public: | |||
545 | const LLPathParams &getPathParams() const {return mPathParams;} | 546 | const LLPathParams &getPathParams() const {return mPathParams;} |
546 | LLPathParams &getPathParams() {return mPathParams;} | 547 | LLPathParams &getPathParams() {return mPathParams;} |
547 | 548 | ||
548 | BOOL importFile(FILE *fp); | 549 | BOOL importFile(LLFILE *fp); |
549 | BOOL exportFile(FILE *fp) const; | 550 | BOOL exportFile(LLFILE *fp) const; |
550 | 551 | ||
551 | BOOL importLegacyStream(std::istream& input_stream); | 552 | BOOL importLegacyStream(std::istream& input_stream); |
552 | BOOL exportLegacyStream(std::ostream& output_stream) const; | 553 | BOOL exportLegacyStream(std::ostream& output_stream) const; |
@@ -760,7 +761,17 @@ public: | |||
760 | class LLVolumeFace | 761 | class LLVolumeFace |
761 | { | 762 | { |
762 | public: | 763 | public: |
763 | LLVolumeFace(); | 764 | LLVolumeFace() : |
765 | mID(0), | ||
766 | mTypeMask(0), | ||
767 | mHasBinormals(FALSE), | ||
768 | mBeginS(0), | ||
769 | mBeginT(0), | ||
770 | mNumS(0), | ||
771 | mNumT(0) | ||
772 | { | ||
773 | } | ||
774 | |||
764 | BOOL create(LLVolume* volume, BOOL partial_build = FALSE); | 775 | BOOL create(LLVolume* volume, BOOL partial_build = FALSE); |
765 | void createBinormals(); | 776 | void createBinormals(); |
766 | 777 | ||
diff --git a/linden/indra/llmath/m4math.h b/linden/indra/llmath/m4math.h index 27eb865..96e0a31 100644 --- a/linden/indra/llmath/m4math.h +++ b/linden/indra/llmath/m4math.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /** | 1 | /** |
2 | * @file m4math.h | 2 | * @file m4math.h |
3 | * @brief LLMatrix3 class header file. | 3 | * @brief LLMatrix4 class header file. |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2000&license=viewergpl$ | 5 | * $LicenseInfo:firstyear=2000&license=viewergpl$ |
6 | * | 6 | * |
@@ -101,9 +101,13 @@ class LLMatrix4 | |||
101 | public: | 101 | public: |
102 | F32 mMatrix[NUM_VALUES_IN_MAT4][NUM_VALUES_IN_MAT4]; | 102 | F32 mMatrix[NUM_VALUES_IN_MAT4][NUM_VALUES_IN_MAT4]; |
103 | 103 | ||
104 | LLMatrix4(); // Initializes Matrix to identity matrix | 104 | // Initializes Matrix to identity matrix |
105 | LLMatrix4() | ||
106 | { | ||
107 | setIdentity(); | ||
108 | } | ||
105 | explicit LLMatrix4(const F32 *mat); // Initializes Matrix to values in mat | 109 | explicit LLMatrix4(const F32 *mat); // Initializes Matrix to values in mat |
106 | explicit LLMatrix4(const LLMatrix3 &mat); // Initializes Matrix to valuee in mat and sets position to (0,0,0) | 110 | explicit LLMatrix4(const LLMatrix3 &mat); // Initializes Matrix to values in mat and sets position to (0,0,0) |
107 | explicit LLMatrix4(const LLQuaternion &q); // Initializes Matrix with rotation q and sets position to (0,0,0) | 111 | explicit LLMatrix4(const LLQuaternion &q); // Initializes Matrix with rotation q and sets position to (0,0,0) |
108 | 112 | ||
109 | LLMatrix4(const LLMatrix3 &mat, const LLVector4 &pos); // Initializes Matrix to values in mat and pos | 113 | LLMatrix4(const LLMatrix3 &mat, const LLVector4 &pos); // Initializes Matrix to values in mat and pos |
@@ -240,12 +244,6 @@ public: | |||
240 | friend std::ostream& operator<<(std::ostream& s, const LLMatrix4 &a); // Stream a | 244 | friend std::ostream& operator<<(std::ostream& s, const LLMatrix4 &a); // Stream a |
241 | }; | 245 | }; |
242 | 246 | ||
243 | |||
244 | inline LLMatrix4::LLMatrix4() | ||
245 | { | ||
246 | setIdentity(); | ||
247 | } | ||
248 | |||
249 | inline const LLMatrix4& LLMatrix4::setIdentity() | 247 | inline const LLMatrix4& LLMatrix4::setIdentity() |
250 | { | 248 | { |
251 | mMatrix[0][0] = 1.f; | 249 | mMatrix[0][0] = 1.f; |