public void SetSpeed(Color color, float ratio) { if (!speedRatio.ContainsKey(color)) { speedRatio.Add(color, ratio); } else { speedRatio[color] = ratio; } }
public ComponentGeometry(Array elementTypes) { positions_ = new ArrayDictionary(); mapNodeNames = new StringDictionary(); nodeNames = new ArrayDictionary(); nodeAngles = new ArrayDictionary(); nodeCoordinates = new ArrayDictionary(); elementData = new ElementDictionary(); vertices = new ArrayDictionary(); normals = new ArrayDictionary(); foreach (ElementType type in elementTypes) { elementData.Add(type, new Dictionary <string, Array>()); } colors = new ColorDictionary(); }