예제 #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);
 }