Exemplo n.º 1
0
 private void OnOgrGeometryChanged()
 {
     _ignoreGeoChanged   = true;
     _ignoreCoordChanged = true;
     Geometries.Clear();
     Coordinates.Clear();
     if (OgrGeometry != null)
     {
         var geometryCount = OgrGeometry.GetGeometryCount();
         if (geometryCount == 0)
         {
             var pointCount = OgrGeometry.GetPointCount();
             var dimension  = OgrGeometry.GetCoordinateDimension();
             for (int i = 0; i < pointCount; i++)
             {
                 double[] argout = new double[dimension];
                 OgrGeometry.GetPoint(i, argout);
                 Coordinate coordinate = new Coordinate(argout);
                 Coordinates.Add(coordinate);
             }
         }
         else
         {
             for (int i = 0; i < geometryCount; i++)
             {
                 var      ogrGeometry = OgrGeometry.GetGeometryRef(i);
                 Geometry geometry    = new Geometry(ogrGeometry);
                 Geometries.Add(geometry);
             }
         }
     }
     _ignoreGeoChanged   = false;
     _ignoreCoordChanged = false;
 }
Exemplo n.º 2
0
 private void ClearAll()
 {
     Vertices.Clear();
     Normals.Clear();
     Colors.Clear();
     UV.Clear();
     Geometries.Clear();
     Materials.Clear();
     BoundingBox = new BoundingBox();
 }
Exemplo n.º 3
0
 public void DetachAllGeometries()
 {
     Geometries.Clear();
 }