diff options
| author | Dave Parks <davep@lindenlab.com> | 2011-06-09 00:29:37 -0500 | 
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2011-06-09 00:29:37 -0500 | 
| commit | 75e366dd6f9abd50263c87e0e8106dc0abbcefb4 (patch) | |
| tree | f53c8ca99c0a9add07b352c4ef04b7de64281271 /indra/llmath | |
| parent | 3ede390b87507cd6a6ef31ac3f1be1906abcb723 (diff) | |
| parent | 6d953e60b74538aa26b7bfe4ceeee44ac7eefead (diff) | |
merge
Diffstat (limited to 'indra/llmath')
| -rw-r--r-- | indra/llmath/llvolume.cpp | 15 | 
1 files changed, 14 insertions, 1 deletions
| diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 9eecb7bfe2..379ef4b344 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -2419,12 +2419,25 @@ bool LLVolume::unpackVolumeFaces(std::istream& is, S32 size)  		for (U32 i = 0; i < face_count; ++i)  		{ +			LLVolumeFace& face = mVolumeFaces[i]; + +			if (mdl[i].has("NoGeometry")) +			{ //face has no geometry, continue +				face.resizeIndices(3); +				face.resizeVertices(1); +				memset(face.mPositions, 0, sizeof(LLVector4a)); +				memset(face.mNormals, 0, sizeof(LLVector4a)); +				memset(face.mTexCoords, 0, sizeof(LLVector2)); +				memset(face.mIndices, 0, sizeof(U16)*3); +				continue; +			} +  			LLSD::Binary pos = mdl[i]["Position"];  			LLSD::Binary norm = mdl[i]["Normal"];  			LLSD::Binary tc = mdl[i]["TexCoord0"];  			LLSD::Binary idx = mdl[i]["TriangleList"]; -			LLVolumeFace& face = mVolumeFaces[i]; +			  			//copy out indices  			face.resizeIndices(idx.size()/2); | 
