Ejemplo n.º 1
0
    public starInfo(string infoString)
    {
        var lines = infoString.Split(',');

        hygID      = ParseUtility.SafeParseInt(lines[0]);
        hipID      = ParseUtility.SafeParseInt(lines[1]);
        ProperName = lines[6];

        colourIndex = ParseUtility.SafeParseFloat(lines[16]);
        color       = colourUtility.colourIndexToRGB(colourIndex);


        AppMagnitude      = ParseUtility.SafeParseFloat(lines[13]);
        AbsoluteMagnitude = ParseUtility.SafeParseFloat(lines[14]);

        position = new Vector3(
            ParseUtility.SafeParseFloat(lines[17]),
            ParseUtility.SafeParseFloat(lines[18]),
            ParseUtility.SafeParseFloat(lines[19]));

        position = Vector3.ClampMagnitude(position, 1000);

        velocity = new Vector3(
            ParseUtility.SafeParseFloat(lines[20]),
            ParseUtility.SafeParseFloat(lines[21]),
            ParseUtility.SafeParseFloat(lines[22]));
    }