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(); }
} // 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; }
public void Initialize() { rand = new Random(0); geometry = RendererFactory.CreateIcosphere(4); geometry.PrimitiveType = PrimitiveType.Points; }