Пример #1
0
 public static void DrawSphere(Vector3 pos, float radius, ColorSingle color, float timeout)
 {
     DebugInterop.AddPersistentSphere(pos, radius, color, timeout);
 }
Пример #2
0
 public static void DrawDirection(Vector3 pos, float radius, Vector3 dir, ColorSingle color, float timeout)
 {
     DebugInterop.AddDirection(pos, radius, dir, color, timeout);
 }
Пример #3
0
 public static void DrawLine(Vector3 startPos, Vector3 endPos, ColorSingle color, float timeout)
 {
     DebugInterop.AddPersistentLine(startPos, endPos, color, timeout);
 }
Пример #4
0
 internal static extern void SetShaderParam(IntPtr ptr, string paramName, ColorSingle newVal);
Пример #5
0
 public static void DrawBoundingBox(Vector3 pos, BoundingBox bbox, ColorSingle color, float timeout)
 {
     DebugInterop.AddAABB(pos, bbox, color, timeout);
 }
Пример #6
0
 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));
 }
Пример #7
0
        /// <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;
        }
Пример #8
0
        /// <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;
        }
Пример #9
0
 /// <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);
 }
Пример #10
0
 internal static extern void AddPersistentSphere(Vector3 pos, float radius, ColorSingle color, float timeout);
Пример #11
0
 internal static extern void AddPersistentText2D(string text, float size, ColorSingle color, float timeout);
Пример #12
0
 internal static extern void AddPersistentLine(Vector3 pos, Vector3 end, ColorSingle color, float timeout);
Пример #13
0
 internal static extern void AddDirection(Vector3 pos, float radius, Vector3 dir, ColorSingle color, float timeout);
Пример #14
0
 internal static extern void AddAABB(Vector3 pos, BoundingBox bbox, ColorSingle color, float timeout);
Пример #15
0
 public static void DrawText(string text, float size, ColorSingle color, float timeout)
 {
     DebugInterop.AddPersistentText2D(text, size, color, timeout);
 }
Пример #16
0
 /// <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);
 }
Пример #17
0
 internal static extern void DrawTextToScreen(float x, float y, float fontSize, ColorSingle color, bool center, string text);
Пример #18
0
 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);
 }