Ejemplo n.º 1
0
 public override void DoWork()
 {
     try
     {
         foreach (Vector3I vectori in this.CellBatch)
         {
             if (!this.m_isCancelled)
             {
                 VrVoxelMesh self = this.m_targetPhysics.CreateMesh(new MyCellCoord(this.Lod, vectori));
                 if (!this.m_isCancelled)
                 {
                     if (self.IsEmpty())
                     {
                         this.m_newShapes.Add(vectori, (HkBvCompressedMeshShape)HkShape.Empty);
                     }
                     else
                     {
                         this.m_newShapes.Add(vectori, this.m_targetPhysics.CreateShape(self, this.Lod));
                     }
                     if (self != null)
                     {
                         self.Dispose();
                     }
                     continue;
                 }
             }
             break;
         }
     }
     finally
     {
     }
 }
Ejemplo n.º 2
0
 public override void DoWork()
 {
     try
     {
         if (!this.m_isCancelled)
         {
             using (VrVoxelMesh mesh = this.m_args.TargetPhysics.CreateMesh(this.m_args.GeometryCell))
             {
                 if (!mesh.IsEmpty())
                 {
                     if (!this.m_isCancelled)
                     {
                         this.Result = this.m_args.TargetPhysics.CreateShape(mesh, this.m_args.GeometryCell.Lod);
                     }
                     else
                     {
                         return;
                     }
                 }
             }
             this.ResultComplete = true;
         }
     }
     finally
     {
     }
 }