Beispiel #1
0
 public Plates(ref Random rand, int numPlates, IComplexGeometry geometry)
 {
     this.plates   = new Plate[numPlates];
     this.borders  = new Dictionary <long, Border>();
     this.rand     = rand;
     this.geometry = geometry;
     CreatePlates();
 }
Beispiel #2
0
        }                                 // centroid indices, sorted by distance from center

        public Plate(int[] vertexToPlate, IComplexGeometry geometry, PlatePhysicsTraits traits, int plateIndex, int startIndex, ref Random rand)
        {
            this.geometry      = geometry;
            this.startIndex    = startIndex;
            this.vertexToPlate = vertexToPlate;
            this.plateIndex    = plateIndex;
            this.Traits        = traits;
            Corners            = new List <int>();

            allIndices = new List <int>(6);
            allIndices.Add(startIndex);
            outerIndices = new List <int>(6);
            outerIndices.Add(startIndex);
            hue = rand.Next(500) / 500.0f;
            Vector4 color = NextColor(0);

            geometry.Mesh.SetColor(startIndex, ref color);
            vertexToPlate[startIndex] = plateIndex;
        }
Beispiel #3
0
 public void Initialize()
 {
     rand     = new Random(0);
     geometry = RendererFactory.CreateIcosphere(4);
     geometry.PrimitiveType = PrimitiveType.Points;
 }