public override Color32[] get_pixels(NormalizedCartesianCoordinates[] positions) { Color32[] colors = new Color32[positions.Length]; for (int index = 0; index < positions.Length; ++index) { PolarCoordinates polar = positions[index]; SphericalCircleQVCoordinates spherical_circle = polar.to_spherical_circle(radius_variable); if (!spherical_circle.valid()) { colors[index] = new Color32(0, 0, 0, 0); // Color.clear } else { Vector2 texture_indices = spherical_circle.to_texture_coordinate(texture.width); colors[index] = texture.GetPixel((int)texture_indices.x, (int)texture_indices.y); } } return(colors); }
/// <summary> /// Inspector - Creates a spherical circle QV (Quadrant-ValenceShell) coordinate from a point (implicit caller) and a radius (explicit). /// </summary> /// <param name="radius">A radius (measuring radians) representing the angle of the circle from Vector3.forward. Range: [0, +PI].</param> /// <returns>QV (Quadrant-ValenceShell) Coordinates for a spherical circle.</returns> public SphericalCircleQVCoordinates to_spherical_circle(float radius) { return(SphericalCircleQVCoordinates.polar_to_spherical_circle(this, radius)); }