aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs
diff options
context:
space:
mode:
authorMelanie2013-06-11 01:03:15 +0100
committerMelanie2013-06-11 01:03:15 +0100
commita022ee576639c1bbceb5c4ba8de3cbd82e538bb3 (patch)
treefb0d2ee165b7c87e814fc35c6551a26c2c6a488a /OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs
parentMerge branch 'master' into careminster (diff)
parentCheck For NaN and Infinity in llRot2Axis/Angle Fixes mantis #6669 (diff)
downloadopensim-SC-a022ee576639c1bbceb5c4ba8de3cbd82e538bb3.zip
opensim-SC-a022ee576639c1bbceb5c4ba8de3cbd82e538bb3.tar.gz
opensim-SC-a022ee576639c1bbceb5c4ba8de3cbd82e538bb3.tar.bz2
opensim-SC-a022ee576639c1bbceb5c4ba8de3cbd82e538bb3.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSShapes.cs35
1 files changed, 25 insertions, 10 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs b/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs
index 326fc9e..a780526 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs
@@ -167,7 +167,7 @@ public abstract class BSShape
167 // Prevent trying to keep fetching the mesh by declaring failure. 167 // Prevent trying to keep fetching the mesh by declaring failure.
168 if (prim.PrimAssetState == BSPhysObject.PrimAssetCondition.Fetched) 168 if (prim.PrimAssetState == BSPhysObject.PrimAssetCondition.Fetched)
169 { 169 {
170 prim.PrimAssetState = BSPhysObject.PrimAssetCondition.Failed; 170 prim.PrimAssetState = BSPhysObject.PrimAssetCondition.FailedMeshing;
171 physicsScene.Logger.WarnFormat("{0} Fetched asset would not mesh. {1}, texture={2}", 171 physicsScene.Logger.WarnFormat("{0} Fetched asset would not mesh. {1}, texture={2}",
172 LogHeader, prim.PhysObjectName, prim.BaseShape.SculptTexture); 172 LogHeader, prim.PhysObjectName, prim.BaseShape.SculptTexture);
173 physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,setFailed,objNam={1},tex={2}", 173 physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,setFailed,objNam={1},tex={2}",
@@ -177,7 +177,8 @@ public abstract class BSShape
177 { 177 {
178 // If this mesh has an underlying asset and we have not failed getting it before, fetch the asset 178 // If this mesh has an underlying asset and we have not failed getting it before, fetch the asset
179 if (prim.BaseShape.SculptEntry 179 if (prim.BaseShape.SculptEntry
180 && prim.PrimAssetState != BSPhysObject.PrimAssetCondition.Failed 180 && prim.PrimAssetState != BSPhysObject.PrimAssetCondition.FailedAssetFetch
181 && prim.PrimAssetState != BSPhysObject.PrimAssetCondition.FailedMeshing
181 && prim.PrimAssetState != BSPhysObject.PrimAssetCondition.Waiting 182 && prim.PrimAssetState != BSPhysObject.PrimAssetCondition.Waiting
182 && prim.BaseShape.SculptTexture != OMV.UUID.Zero 183 && prim.BaseShape.SculptTexture != OMV.UUID.Zero
183 ) 184 )
@@ -219,7 +220,7 @@ public abstract class BSShape
219 } 220 }
220 if (!assetFound) 221 if (!assetFound)
221 { 222 {
222 yprim.PrimAssetState = BSPhysObject.PrimAssetCondition.Failed; 223 yprim.PrimAssetState = BSPhysObject.PrimAssetCondition.FailedAssetFetch;
223 } 224 }
224 physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,fetchAssetCallback,found={1},isSculpt={2},ids={3}", 225 physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,fetchAssetCallback,found={1},isSculpt={2},ids={3}",
225 yprim.LocalID, assetFound, yprim.BaseShape.SculptEntry, mismatchIDs ); 226 yprim.LocalID, assetFound, yprim.BaseShape.SculptEntry, mismatchIDs );
@@ -227,7 +228,7 @@ public abstract class BSShape
227 } 228 }
228 else 229 else
229 { 230 {
230 xprim.PrimAssetState = BSPhysObject.PrimAssetCondition.Failed; 231 xprim.PrimAssetState = BSPhysObject.PrimAssetCondition.FailedAssetFetch;
231 physicsScene.Logger.ErrorFormat("{0} Physical object requires asset but no asset provider. Name={1}", 232 physicsScene.Logger.ErrorFormat("{0} Physical object requires asset but no asset provider. Name={1}",
232 LogHeader, physicsScene.Name); 233 LogHeader, physicsScene.Name);
233 } 234 }
@@ -235,13 +236,20 @@ public abstract class BSShape
235 } 236 }
236 else 237 else
237 { 238 {
238 if (prim.PrimAssetState == BSPhysObject.PrimAssetCondition.Failed) 239 if (prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedAssetFetch)
239 { 240 {
240 physicsScene.Logger.WarnFormat("{0} Mesh failed to fetch asset. obj={1}, texture={2}", 241 physicsScene.Logger.WarnFormat("{0} Mesh failed to fetch asset. obj={1}, texture={2}",
241 LogHeader, prim.PhysObjectName, prim.BaseShape.SculptTexture); 242 LogHeader, prim.PhysObjectName, prim.BaseShape.SculptTexture);
242 physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,wasFailed,objNam={1},tex={2}", 243 physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,wasFailed,objNam={1},tex={2}",
243 prim.LocalID, prim.PhysObjectName, prim.BaseShape.SculptTexture); 244 prim.LocalID, prim.PhysObjectName, prim.BaseShape.SculptTexture);
244 } 245 }
246 if (prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedMeshing)
247 {
248 physicsScene.Logger.WarnFormat("{0} Mesh asset would not mesh. obj={1}, texture={2}",
249 LogHeader, prim.PhysObjectName, prim.BaseShape.SculptTexture);
250 physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,wasFailedMeshing,objNam={1},tex={2}",
251 prim.LocalID, prim.PhysObjectName, prim.BaseShape.SculptTexture);
252 }
245 } 253 }
246 } 254 }
247 255
@@ -374,7 +382,9 @@ public class BSShapeMesh : BSShape
374 382
375 // Check to see if mesh was created (might require an asset). 383 // Check to see if mesh was created (might require an asset).
376 newShape = VerifyMeshCreated(physicsScene, newShape, prim); 384 newShape = VerifyMeshCreated(physicsScene, newShape, prim);
377 if (!newShape.isNativeShape || prim.PrimAssetState == BSPhysObject.PrimAssetCondition.Failed) 385 if (!newShape.isNativeShape
386 || prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedMeshing
387 || prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedAssetFetch)
378 { 388 {
379 // If a mesh was what was created, remember the built shape for later sharing. 389 // If a mesh was what was created, remember the built shape for later sharing.
380 // Also note that if meshing failed we put it in the mesh list as there is nothing else to do about the mesh. 390 // Also note that if meshing failed we put it in the mesh list as there is nothing else to do about the mesh.
@@ -519,7 +529,7 @@ public class BSShapeMesh : BSShape
519 else 529 else
520 { 530 {
521 // Force the asset condition to 'failed' so we won't try to keep fetching and processing this mesh. 531 // Force the asset condition to 'failed' so we won't try to keep fetching and processing this mesh.
522 prim.PrimAssetState = BSPhysObject.PrimAssetCondition.Failed; 532 prim.PrimAssetState = BSPhysObject.PrimAssetCondition.FailedMeshing;
523 physicsScene.Logger.DebugFormat("{0} All mesh triangles degenerate. Prim {1} at {2} in {3}", 533 physicsScene.Logger.DebugFormat("{0} All mesh triangles degenerate. Prim {1} at {2} in {3}",
524 LogHeader, prim.PhysObjectName, prim.RawPosition, physicsScene.Name); 534 LogHeader, prim.PhysObjectName, prim.RawPosition, physicsScene.Name);
525 physicsScene.DetailLog("{0},BSShapeMesh.CreatePhysicalMesh,allDegenerate,key={1}", prim.LocalID, newMeshKey); 535 physicsScene.DetailLog("{0},BSShapeMesh.CreatePhysicalMesh,allDegenerate,key={1}", prim.LocalID, newMeshKey);
@@ -561,7 +571,9 @@ public class BSShapeHull : BSShape
561 571
562 // Check to see if hull was created (might require an asset). 572 // Check to see if hull was created (might require an asset).
563 newShape = VerifyMeshCreated(physicsScene, newShape, prim); 573 newShape = VerifyMeshCreated(physicsScene, newShape, prim);
564 if (!newShape.isNativeShape || prim.PrimAssetState == BSPhysObject.PrimAssetCondition.Failed) 574 if (!newShape.isNativeShape
575 || prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedMeshing
576 || prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedAssetFetch)
565 { 577 {
566 // If a mesh was what was created, remember the built shape for later sharing. 578 // If a mesh was what was created, remember the built shape for later sharing.
567 Hulls.Add(newHullKey, retHull); 579 Hulls.Add(newHullKey, retHull);
@@ -1081,10 +1093,13 @@ public class BSShapeGImpact : BSShape
1081 // Check to see if mesh was created (might require an asset). 1093 // Check to see if mesh was created (might require an asset).
1082 newShape = VerifyMeshCreated(physicsScene, newShape, prim); 1094 newShape = VerifyMeshCreated(physicsScene, newShape, prim);
1083 newShape.shapeKey = newMeshKey; 1095 newShape.shapeKey = newMeshKey;
1084 if (!newShape.isNativeShape || prim.PrimAssetState == BSPhysObject.PrimAssetCondition.Failed) 1096 if (!newShape.isNativeShape
1097 || prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedMeshing
1098 || prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedAssetFetch)
1085 { 1099 {
1086 // If a mesh was what was created, remember the built shape for later sharing. 1100 // If a mesh was what was created, remember the built shape for later sharing.
1087 // Also note that if meshing failed we put it in the mesh list as there is nothing else to do about the mesh. 1101 // Also note that if meshing failed we put it in the mesh list as there is nothing
1102 // else to do about the mesh.
1088 GImpacts.Add(newMeshKey, retGImpact); 1103 GImpacts.Add(newMeshKey, retGImpact);
1089 } 1104 }
1090 1105