public Core.TextureLib.UCL_Texture2D DrawRandomPoints() { if (m_Texture == null) { m_Texture = new TextureLib.UCL_Texture2D(new Vector2Int(256, 256), TextureFormat.RGB24); } m_Texture.SetColor(Color.white); if (m_RandomPoints != null) { foreach (var point in m_RandomPoints) { m_Texture.DrawDot((0.98f * point).ToTextureSpace(), m_DotColor, 1); } } return(m_Texture); }
public void Editor_DebugCurve(Core.TextureLib.UCL_Texture2D m_CurveTexture) { m_CurveTexture.SetColor(Color.black); float min = 0, max = 1.2f; if (m_Datas.Count > 1) { m_CurveTexture.DrawLineAutoFit(delegate(float u) { return(u); }, Color.red, min, max, true, true); m_CurveTexture.DrawLineAutoFit(delegate(float u) { return(MathLib.LinearMapping.GetY(m_Datas, u)); }, Color.green, min, max, false, false); m_CurveTexture.DrawLineAutoFit(delegate(float u) { return(CurveFunc(u)); }, Color.yellow, min, max, false, false); m_CurveTexture.DrawDot(m_TargetVal, MathLib.LinearMapping.GetY(m_Datas, m_TargetVal) / max, Color.white, 2); m_CurveTexture.DrawDot(m_TargetVal, MathLib.LinearMapping.GetX(m_Datas, m_TargetVal) / max, Color.cyan, 2); } }