public static void DrawSphere(Vector3 pos, float radius, ColorSingle color, float timeout) { DebugInterop.AddPersistentSphere(pos, radius, color, timeout); }
public static void DrawDirection(Vector3 pos, float radius, Vector3 dir, ColorSingle color, float timeout) { DebugInterop.AddDirection(pos, radius, dir, color, timeout); }
public static void DrawLine(Vector3 startPos, Vector3 endPos, ColorSingle color, float timeout) { DebugInterop.AddPersistentLine(startPos, endPos, color, timeout); }
internal static extern void SetShaderParam(IntPtr ptr, string paramName, ColorSingle newVal);
public static void DrawBoundingBox(Vector3 pos, BoundingBox bbox, ColorSingle color, float timeout) { DebugInterop.AddAABB(pos, bbox, color, timeout); }
public static void DrawTextToScreen(float x, float y, float fontSize, ColorSingle color, bool centered, string text, params object[] args) { RendererInterop.DrawTextToScreen(x, y, fontSize, color, centered, string.Format(text, args)); }
/// <summary> /// Attempts to get parameter value by name. /// </summary> /// <param name="paramName"></param> /// <param name="value"></param> /// <returns>true if successful, otherwise false.</returns> public bool TryGetParam(string paramName, out ColorSingle value) { Vector3 vecVal = Vector3.Zero; bool result = MaterialInterop.SetGetMaterialParamVec3(Handle, paramName, ref vecVal, true); value = new ColorSingle {R = vecVal.X, G = vecVal.Y, B = vecVal.Z, A = this.Opacity}; return result; }
/// <summary> /// Sets a material parameter value by name. /// </summary> /// <param name="paramName"></param> /// <param name="value"></param> /// <returns>true if successful, otherwise false.</returns> public bool SetParam(string paramName, ColorSingle value) { Vector3 vecValue = new Vector3(value.R, value.G, value.B); var result = MaterialInterop.SetGetMaterialParamVec3(Handle, paramName, ref vecValue, false); Opacity = value.A; return result; }
/// <summary> /// Sets a shader parameter value by name. /// </summary> /// <param name="paramName"></param> /// <param name="newVal"></param> public void SetShaderParam(string paramName, ColorSingle newVal) { MaterialInterop.SetShaderParam(Handle, paramName, newVal); }
internal static extern void AddPersistentSphere(Vector3 pos, float radius, ColorSingle color, float timeout);
internal static extern void AddPersistentText2D(string text, float size, ColorSingle color, float timeout);
internal static extern void AddPersistentLine(Vector3 pos, Vector3 end, ColorSingle color, float timeout);
internal static extern void AddDirection(Vector3 pos, float radius, Vector3 dir, ColorSingle color, float timeout);
internal static extern void AddAABB(Vector3 pos, BoundingBox bbox, ColorSingle color, float timeout);
public static void DrawText(string text, float size, ColorSingle color, float timeout) { DebugInterop.AddPersistentText2D(text, size, color, timeout); }
/// <summary> /// Sets a shader parameter value by name. /// </summary> /// <param name="param"></param> /// <param name="value"></param> public void SetShaderParam(ShaderColorParameter param, ColorSingle value) { SetShaderParam(param.GetEngineName(), value); }
internal static extern void DrawTextToScreen(float x, float y, float fontSize, ColorSingle color, bool center, string text);
public static void DrawTextToScreen(float x, float y, float fontSize, ColorSingle color, string text, params object[] args) { DrawTextToScreen(x, y, fontSize, color, false, text, args); }