Daily update on 20231211 by nitload youmu
This commit is contained in:
@@ -1,12 +1,17 @@
|
||||
using StgSharp.Controlling;
|
||||
using StgSharp.Graphics;
|
||||
using StgSharp.Math;
|
||||
using System;
|
||||
using System.Security.Cryptography;
|
||||
|
||||
namespace StgSharp
|
||||
{
|
||||
public static partial class Operation
|
||||
{
|
||||
|
||||
internal static void RegistForm(Form form)
|
||||
{
|
||||
TimeLine.allForm.Add(form);
|
||||
}
|
||||
|
||||
public static void LoadTimeline()
|
||||
{
|
||||
|
||||
@@ -8,10 +8,5 @@ namespace StgSharp.Controlling
|
||||
{
|
||||
public static partial class TimeLine
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,17 +8,11 @@ namespace StgSharp.Controlling
|
||||
{
|
||||
public static partial class TimeLine
|
||||
{
|
||||
public const long version = 430;
|
||||
internal static LinkedList<Form> allForm;
|
||||
|
||||
private static SemaphoreSlim ping;
|
||||
private static SemaphoreSlim pong;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Tick counter count the frames passed since the program start.
|
||||
/// </summary>
|
||||
public static readonly Counter<uint> tickCounter = new Counter<uint>(0, 1, 1);
|
||||
private static LinkedList<Form.FrameUpdateTimer> refreshList = new LinkedList<Form.FrameUpdateTimer>();
|
||||
internal static LinkedListNode<Form.FrameUpdateTimer> signalNode;
|
||||
private static LinkedList<Form> allFormList = new LinkedList<Form>();
|
||||
|
||||
internal static TimelineBlock currentOperation;
|
||||
private static bool isPaused = false;
|
||||
@@ -39,13 +33,6 @@ namespace StgSharp.Controlling
|
||||
currentOperation = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void TimelineMain()
|
||||
{
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
internal static void UodateAllFrame()
|
||||
@@ -56,5 +43,8 @@ namespace StgSharp.Controlling
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,9 @@ using System;
|
||||
|
||||
namespace StgSharp.Geometries
|
||||
{
|
||||
/// <summary>
|
||||
/// Part of a circle. All points on a arc has the same distance to their center.
|
||||
/// </summary>
|
||||
public class Arc : PlainGeometry
|
||||
{
|
||||
internal Point center;
|
||||
@@ -22,7 +25,7 @@ namespace StgSharp.Geometries
|
||||
|
||||
internal override void UpdateCoordinate(uint tick)
|
||||
{
|
||||
tick -= bornTick;
|
||||
tick = time;
|
||||
center.Position = this.coordinate.origin + MoveCenter(tick);
|
||||
beginPoint.Position = this.coordinate.origin + MovBegin(tick);
|
||||
endPoint.Position = this.coordinate.origin + MovEnd(tick);
|
||||
|
||||
@@ -3,6 +3,9 @@ using System;
|
||||
|
||||
namespace StgSharp.Geometries
|
||||
{
|
||||
/// <summary>
|
||||
/// A collection of all point on the same plain and has the same distance to a point
|
||||
/// </summary>
|
||||
public class Circle : PlainGeometry
|
||||
{
|
||||
internal Point center;
|
||||
@@ -26,9 +29,10 @@ namespace StgSharp.Geometries
|
||||
return new Plain(center, pointOnCircle, pointOnPlain);
|
||||
}
|
||||
|
||||
|
||||
internal override void UpdateCoordinate(uint tick)
|
||||
{
|
||||
tick -= bornTick;
|
||||
tick = time;
|
||||
center.Position = this.coordinate.origin + MoveCenter(tick);
|
||||
pointOnCircle.Position = this.coordinate.origin + UpdateRadius(tick);
|
||||
pointOnPlain.Position = this.coordinate.origin + UpdatePlain(tick);
|
||||
|
||||
@@ -32,19 +32,29 @@ namespace StgSharp.Geometries
|
||||
|
||||
public Line() { }
|
||||
|
||||
//method to calculate begin point of the the line
|
||||
/// <summary>
|
||||
/// Move begin side of a line.
|
||||
/// It is recommended to override this function rather than
|
||||
/// loading an <see cref="GetLocationHandler"/> with same function.
|
||||
/// </summary>
|
||||
/// <param name="tick">Time passed since current line was created.</param>
|
||||
public virtual vec3d MoveBeginPoint(uint tick)
|
||||
=> movBegin.Invoke(tick);
|
||||
=> movBegin.Invoke(time);
|
||||
|
||||
//计算线重点的方法,通过对线的派生的重写实现功能
|
||||
/// <summary>
|
||||
/// Move end side of a line.
|
||||
/// It is recommended to override this function rather than
|
||||
/// loading an <see cref="GetLocationHandler"/> with same function.
|
||||
/// </summary>
|
||||
/// <param name="tick">Time passed since current line was created.</param>
|
||||
/// <returns></returns>
|
||||
public virtual vec3d MoveEndPoint(uint tick)
|
||||
=> movEnd.Invoke(tick);
|
||||
=> movEnd.Invoke(time);
|
||||
|
||||
internal override void UpdateCoordinate(uint tick)
|
||||
{
|
||||
tick -= bornTick;
|
||||
beginPoint.Position = coordinate.origin + MoveBeginPoint(tick);
|
||||
endPoint.Position = coordinate.origin + MoveEndPoint(tick);
|
||||
beginPoint.Position = coordinate.origin + MoveBeginPoint(time);
|
||||
endPoint.Position = coordinate.origin + MoveEndPoint(time);
|
||||
}
|
||||
|
||||
public override Line[] GetAllSides()
|
||||
|
||||
@@ -64,7 +64,6 @@ namespace StgSharp.Geometries
|
||||
|
||||
internal sealed override void UpdateCoordinate(uint tick)
|
||||
{
|
||||
uint nowTick = TimeLine.tickCounter._value;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using StgSharp.Math;
|
||||
using StgSharp.Graphics;
|
||||
using StgSharp.Math;
|
||||
|
||||
namespace StgSharp.Geometries
|
||||
{
|
||||
@@ -8,7 +9,7 @@ namespace StgSharp.Geometries
|
||||
/// </summary>
|
||||
public abstract class PlainGeometry
|
||||
{
|
||||
protected readonly uint bornTick;
|
||||
protected FrameTimer time;
|
||||
|
||||
internal PartialPlainCoordinate coordinate;
|
||||
internal Matrix2x4 textureFrame;
|
||||
@@ -18,26 +19,32 @@ namespace StgSharp.Geometries
|
||||
get => this.coordinate;
|
||||
}
|
||||
|
||||
public uint BornTime => bornTick;
|
||||
/// <summary>
|
||||
/// Tick time this geometry eas crested
|
||||
/// </summary>
|
||||
public uint BornTime => time;
|
||||
|
||||
internal abstract int[] Indices { get; }
|
||||
|
||||
public PlainGeometry(uint bornTime)
|
||||
public PlainGeometry(Form form)
|
||||
{
|
||||
bornTick = bornTime;
|
||||
}
|
||||
|
||||
public PlainGeometry(Counter<uint> MainTimer)
|
||||
{
|
||||
bornTick = MainTimer.Value;
|
||||
time = new FrameTimer(form);
|
||||
}
|
||||
|
||||
public PlainGeometry() { }
|
||||
|
||||
internal abstract void UpdateCoordinate(uint tick);
|
||||
|
||||
/// <summary>
|
||||
/// Get all sides of this <see cref="PlainGeometry"/>.
|
||||
/// </summary>
|
||||
/// <returns>A array contains all straight <see cref="Line"/>s of current geometry item.</returns>
|
||||
public abstract Line[] GetAllSides();
|
||||
|
||||
/// <summary>
|
||||
/// Get a flat <see cref="Plain"/> cincide with current geometry.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public abstract Plain GetPlain();
|
||||
|
||||
//public abstract Rectangle GetRenderFrame();
|
||||
|
||||
@@ -146,7 +146,6 @@ namespace StgSharp.Geometries
|
||||
|
||||
internal override void UpdateCoordinate(uint tick)
|
||||
{
|
||||
uint nowTick = TimeLine.tickCounter._value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,15 +103,15 @@ namespace StgSharp.Geometries
|
||||
return new Plain(Vertex0, Vertex1, Vertex2);
|
||||
}
|
||||
|
||||
public virtual vec3d movVertex01(uint tick) => movP01Operation.Invoke(TimeLine.tickCounter._value);
|
||||
public virtual vec3d movVertex01(uint tick) => movP01Operation.Invoke(time);
|
||||
|
||||
public virtual vec3d movVertex02(uint tick) => movP02Operation.Invoke(TimeLine.tickCounter._value);
|
||||
public virtual vec3d movVertex02(uint tick) => movP02Operation.Invoke(time);
|
||||
|
||||
public virtual vec3d movVertex03(uint tick) => movP03Operation.Invoke(TimeLine.tickCounter._value);
|
||||
public virtual vec3d movVertex03(uint tick) => movP03Operation.Invoke(time);
|
||||
|
||||
public virtual vec3d movVertex04(uint tick) => movP04Operation.Invoke(TimeLine.tickCounter._value);
|
||||
public virtual vec3d movVertex04(uint tick) => movP04Operation.Invoke(time);
|
||||
|
||||
public virtual vec3d movVertex05(uint tick) => movP05Operation.Invoke(TimeLine.tickCounter._value);
|
||||
public virtual vec3d movVertex05(uint tick) => movP05Operation.Invoke(time);
|
||||
|
||||
|
||||
internal override void UpdateCoordinate(uint tick)
|
||||
|
||||
@@ -91,32 +91,32 @@ namespace StgSharp.Geometries
|
||||
|
||||
public virtual vec3d movVertex0(uint tick)
|
||||
{
|
||||
return movVertex0Operation.Invoke(TimeLine.tickCounter._value);
|
||||
return movVertex0Operation.Invoke(time);
|
||||
}
|
||||
|
||||
public virtual vec3d movVertex1(uint tick)
|
||||
{
|
||||
return movVertex1Operation.Invoke(TimeLine.tickCounter._value);
|
||||
return movVertex1Operation.Invoke(time);
|
||||
}
|
||||
|
||||
public virtual vec3d movVertex2(uint tick)
|
||||
{
|
||||
return movVertex2Operation.Invoke(TimeLine.tickCounter._value);
|
||||
return movVertex2Operation.Invoke(time);
|
||||
}
|
||||
|
||||
public virtual vec3d movVertex3(uint tick)
|
||||
{
|
||||
return movVertex3Operation.Invoke(TimeLine.tickCounter._value);
|
||||
return movVertex3Operation.Invoke(time);
|
||||
}
|
||||
|
||||
public virtual vec3d movVertex4(uint tick)
|
||||
{
|
||||
return movVertex4Operation.Invoke(TimeLine.tickCounter._value);
|
||||
return movVertex4Operation.Invoke(time);
|
||||
}
|
||||
|
||||
public virtual vec3d movVertex5(uint tick)
|
||||
{
|
||||
return movVertex5Operation.Invoke(TimeLine.tickCounter._value);
|
||||
return movVertex5Operation.Invoke(time);
|
||||
}
|
||||
|
||||
internal override void UpdateCoordinate(uint tick)
|
||||
|
||||
@@ -81,10 +81,10 @@ namespace StgSharp.Geometries
|
||||
|
||||
internal sealed override void UpdateCoordinate(uint tick)
|
||||
{
|
||||
tick -= this.bornTick;
|
||||
vertexMat.mat.colum0 = coordinate.origin.vec + MovVertex01(tick).vec;
|
||||
vertexMat.mat.colum1 = coordinate.origin.vec + MovVertex02(tick).vec;
|
||||
vertexMat.mat.colum2 = coordinate.origin.vec + MovVertex03(tick).vec;
|
||||
tick = time;
|
||||
vertexMat.mat.colum0 = coordinate.origin.vec + MovVertex01(time).vec;
|
||||
vertexMat.mat.colum1 = coordinate.origin.vec + MovVertex02(time).vec;
|
||||
vertexMat.mat.colum2 = coordinate.origin.vec + MovVertex03(time).vec;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2640,7 +2640,7 @@ namespace StgSharp.Graphics
|
||||
[UnmanagedFunctionPointer(callingConvention: CallingConvention.StdCall, CharSet = CharSet.Ansi)] internal unsafe delegate GLFWcursorposfun glfwSetCursorPosCallback(IntPtr window, GLFWcursorposfun callback);
|
||||
[UnmanagedFunctionPointer(callingConvention: CallingConvention.StdCall, CharSet = CharSet.Ansi)] internal unsafe delegate GLFWdropfun glfwSetDropCallback(IntPtr window, GLFWdropfun callback);
|
||||
[UnmanagedFunctionPointer(callingConvention: CallingConvention.StdCall, CharSet = CharSet.Ansi)] internal unsafe delegate GLFWerrorfun glfwSetErrorCallback(GLFWerrorfun callback);
|
||||
[UnmanagedFunctionPointer(callingConvention: CallingConvention.StdCall, CharSet = CharSet.Ansi)] internal unsafe delegate FramebuffersizeHandler glfwSetFramebufferSizeCallback(IntPtr window, FrameBufferSizeHandler callback);
|
||||
[UnmanagedFunctionPointer(callingConvention: CallingConvention.StdCall, CharSet = CharSet.Ansi)] internal unsafe delegate FramebuffersizeHandler glfwSetFramebufferSizeCallback(IntPtr window, IntPtr callback);
|
||||
[UnmanagedFunctionPointer(callingConvention: CallingConvention.StdCall, CharSet = CharSet.Ansi)] internal unsafe delegate void glfwSetGamma(IntPtr monitor, float gamma);
|
||||
[UnmanagedFunctionPointer(callingConvention: CallingConvention.StdCall, CharSet = CharSet.Ansi)] internal unsafe delegate void glfwSetGammaRamp(IntPtr monitor, GLFWgammaramp* ramp);
|
||||
[UnmanagedFunctionPointer(callingConvention: CallingConvention.StdCall, CharSet = CharSet.Ansi)] internal unsafe delegate void glfwSetInputMode(IntPtr window, int mode, int value);
|
||||
|
||||
+116
-41
@@ -6,6 +6,9 @@ using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using System.Reflection;
|
||||
using System.Reflection.Emit;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
@@ -24,7 +27,7 @@ namespace StgSharp.Graphics
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public unsafe abstract partial class Form
|
||||
public abstract partial class Form
|
||||
{
|
||||
internal LinkedList<Control> allControl;
|
||||
internal Vector4 color;
|
||||
@@ -35,23 +38,32 @@ namespace StgSharp.Graphics
|
||||
internal Form sharedForm;
|
||||
internal int width;
|
||||
internal IntPtr windowID;
|
||||
protected IglFunc GL;
|
||||
|
||||
private GLonRender glRender;
|
||||
private GLonUpdate glUpdate;
|
||||
|
||||
~Form()
|
||||
{
|
||||
Marshal.FreeHGlobal((IntPtr)contextID);
|
||||
glRender.api = default;
|
||||
}
|
||||
internal FrameUpdateTimer timer = new FrameUpdateTimer();
|
||||
private SemaphoreSlim ping = new SemaphoreSlim(1, 1);
|
||||
private SemaphoreSlim pong = new SemaphoreSlim(0, 1);
|
||||
|
||||
private UpdateWhenRender updateWhenRender;
|
||||
private DynamicMethod updateWhenRenderDM;
|
||||
private ILGenerator updateWhenRenderIL;
|
||||
|
||||
private delegate void UpdateWhenRender();
|
||||
|
||||
/// <summary>
|
||||
/// Height of this form, represent in <see cref="int"/>
|
||||
/// </summary>
|
||||
public int Height
|
||||
{
|
||||
get => height;
|
||||
set => height = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Width of this form, represent in <see cref="int"/>
|
||||
/// </summary>
|
||||
public Vec2d Size
|
||||
{
|
||||
get { return new Vec2d(width, height); }
|
||||
@@ -68,30 +80,107 @@ namespace StgSharp.Graphics
|
||||
set => width = value;
|
||||
}
|
||||
|
||||
#region form main
|
||||
|
||||
public abstract void Deinit(object[] args);
|
||||
|
||||
public abstract void Init(object[] args);
|
||||
|
||||
public abstract void OnRenderFrame(object[] args);
|
||||
|
||||
public abstract void OnUpdateFrame(object[] args);
|
||||
|
||||
internal void internalShowForm(object arg)
|
||||
unsafe ~Form()
|
||||
{
|
||||
object[] args = (object[])arg;
|
||||
Init((object[])args[0]);
|
||||
while (InternalIO.glfw.WindowShouldClose(windowID) == 0)
|
||||
{
|
||||
OnUpdateFrame((object[])args[1]);
|
||||
}
|
||||
Deinit((object[])args[2]);
|
||||
Marshal.FreeHGlobal((IntPtr)contextID);
|
||||
glRender.api = default;
|
||||
}
|
||||
|
||||
#region form main
|
||||
|
||||
public abstract void Deinit(object[] args, IglFunc GL);
|
||||
|
||||
public abstract void Init(object[] args, IglFunc GL);
|
||||
|
||||
public abstract void OnRenderFrame(object[] args, IglFunc GL);
|
||||
|
||||
public abstract void OnUpdateFrame(object[] args, IglFunc GL);
|
||||
|
||||
/// <summary>
|
||||
/// Init this form and render it on screen, and respond with operation
|
||||
/// </summary>
|
||||
public void Show(object[] args)
|
||||
{
|
||||
if (args == null)
|
||||
{
|
||||
args = new object[3] { null, null, null };
|
||||
}
|
||||
Operation.RegistForm(this);
|
||||
try
|
||||
{
|
||||
Thread updateThread = new Thread(InternalUpdateFrame);
|
||||
Thread renderThread = new Thread(InternalRenderFrame);
|
||||
|
||||
updateThread.Start();
|
||||
renderThread.Start();
|
||||
|
||||
updateThread.Join();
|
||||
renderThread.Join();
|
||||
|
||||
ping.Dispose();
|
||||
pong.Dispose();
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
internal void InternalInit(object[] args)
|
||||
{
|
||||
updateWhenRenderDM = new DynamicMethod(
|
||||
name: "updateWhenRender",
|
||||
returnType: typeof(void),
|
||||
parameterTypes: new Type[] { typeof(void) },
|
||||
restrictedSkipVisibility: true
|
||||
);
|
||||
updateWhenRenderIL = updateWhenRenderDM.GetILGenerator();
|
||||
|
||||
Init((object[])args, this.glRender);
|
||||
|
||||
}
|
||||
|
||||
|
||||
internal void InternalRenderFrame(object args)
|
||||
{
|
||||
while (InternalIO.glfw.WindowShouldClose(windowID) != 0)
|
||||
{
|
||||
ping.Wait();
|
||||
try
|
||||
{
|
||||
OnRenderFrame((object[])args, glRender);
|
||||
timer.GoNextFrame();
|
||||
throw new Exception("Forget to reload GL apis");
|
||||
pong.Release();
|
||||
}
|
||||
catch (NullReferenceException)
|
||||
{
|
||||
throw new Exception("Forget to reload GL apis");
|
||||
pong.Release();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
internal void InternalUpdateFrame(object args)
|
||||
{
|
||||
OnUpdateFrame((object[])args);
|
||||
while (InternalIO.glfw.WindowShouldClose(windowID) != 0)
|
||||
{
|
||||
pong.Wait();
|
||||
try
|
||||
{
|
||||
OnUpdateFrame((object[])args, glUpdate);
|
||||
timer.GoNextFrame();
|
||||
throw new Exception("Forget to reload GL apis");
|
||||
ping.Release();
|
||||
}
|
||||
catch (NullReferenceException)
|
||||
{
|
||||
throw new Exception("Forget to reload GL apis");
|
||||
ping.Release();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -115,7 +204,7 @@ namespace StgSharp.Graphics
|
||||
/// </summary>
|
||||
/// <exception cref="Exception">Something goes wrong and
|
||||
/// StgSharp fails in creating a new OpenGL context. </exception>
|
||||
public void MakeAsCurrentContext()
|
||||
public unsafe void MakeAsCurrentContext()
|
||||
{
|
||||
if (windowID == default)
|
||||
{
|
||||
@@ -207,20 +296,6 @@ namespace StgSharp.Graphics
|
||||
(int)minSize.X, (int)minSize.Y, (int)maxSize.X, (int)maxSize.Y);
|
||||
}
|
||||
|
||||
public void ShowForm(
|
||||
object[] initArgs,
|
||||
object[] updateArgs,
|
||||
object[] deinitArgs)
|
||||
{
|
||||
Thread t = new Thread(new ParameterizedThreadStart(internalShowForm));
|
||||
t.Start(new object[] { initArgs, updateArgs, deinitArgs });
|
||||
}
|
||||
|
||||
public void ShowForm()
|
||||
{
|
||||
Thread t = new Thread(new ParameterizedThreadStart(internalShowForm));
|
||||
t.Start(new object[3] { null, null, null });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Bind this form to StgSharp platform.
|
||||
|
||||
@@ -0,0 +1,132 @@
|
||||
using StgSharp;
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StgSharp.Graphics
|
||||
{
|
||||
/// <summary>
|
||||
/// A timer counting frames after its construction.
|
||||
/// </summary>
|
||||
public class FrameTimer
|
||||
{
|
||||
private Form timeProvider;
|
||||
internal readonly uint bornTick;
|
||||
|
||||
/// <summary>
|
||||
/// Frames after this timer created.
|
||||
/// </summary>
|
||||
public uint Time
|
||||
{
|
||||
get { return timeProvider.timer.totalFrame - bornTick; }
|
||||
}
|
||||
|
||||
public FrameTimer(Form provaider)
|
||||
{
|
||||
timeProvider = provaider;
|
||||
bornTick = timeProvider.timer.totalFrame;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Convert a <see cref="FrameTimer"/> into uint value.
|
||||
/// this will get total frames since the timer was created.
|
||||
/// </summary>
|
||||
/// <param name="timer"><see cref="FrameTimer"/> to be converted</param>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static implicit operator uint(FrameTimer timer)
|
||||
{
|
||||
return timer.Time;
|
||||
}
|
||||
}
|
||||
|
||||
public partial class Form
|
||||
{
|
||||
|
||||
internal class FrameUpdateTimer
|
||||
{
|
||||
private Counter<uint> tickCounter;
|
||||
private float frameLength;
|
||||
private double frameTime;
|
||||
private bool refreshed;
|
||||
private SemaphoreSlim pong;
|
||||
private bool isOnceFulFrame = false;
|
||||
|
||||
public uint totalFrame
|
||||
{
|
||||
get { return tickCounter; }
|
||||
}
|
||||
|
||||
public double timeAfterFrame
|
||||
{
|
||||
get { return InternalIO.glfw.GetTime() - frameTime; }
|
||||
}
|
||||
|
||||
internal bool IsOnceFullFrame
|
||||
{
|
||||
get { return isOnceFulFrame; }
|
||||
set
|
||||
{
|
||||
if (!isOnceFulFrame)
|
||||
{
|
||||
isOnceFulFrame = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal void Init(SemaphoreSlim semaphore)
|
||||
{
|
||||
pong = semaphore;
|
||||
}
|
||||
|
||||
internal void Refresh()
|
||||
{
|
||||
refreshed = false;
|
||||
}
|
||||
|
||||
internal bool GoNextFrame()
|
||||
{
|
||||
try
|
||||
{
|
||||
while (refreshed) { }
|
||||
refreshed = true;
|
||||
return refreshed;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
InternalIO.InternalWriteLog(ex.Message, LogType.Error);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool isFullyRendered = false;
|
||||
|
||||
/// <summary>
|
||||
/// Wait until the next frame of a certain <see cref="Form"/> started,
|
||||
/// all GL function after this method will be blocked until the next frame started.
|
||||
/// When a frame refreshed before
|
||||
/// It should be noticed that do not use this method too often to avoid unexpected performance problem
|
||||
/// </summary>
|
||||
/// <param name="form">The <see cref="Form"/> that can provide a frame refresh benchmark</param>
|
||||
/// <param name="action"><see cref="Action"/> to be done and aligned.</param>
|
||||
/// <returns>
|
||||
/// A bool value indicating if the <see cref="Form"/> successfully refresh the frame.
|
||||
/// If the retur value is false, please set a new <see cref="Form"/> as benchmark.
|
||||
/// </returns>
|
||||
protected bool AlignFrame(Form form, Action action)
|
||||
{
|
||||
try
|
||||
{
|
||||
bool isAligned = form.timer.GoNextFrame();
|
||||
action();
|
||||
return isAligned;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -6,54 +6,46 @@ using System.Text;
|
||||
|
||||
namespace StgSharp.Graphics
|
||||
{
|
||||
public partial class Form
|
||||
public unsafe class ElementBuffer : IDisposable, IBufferObject
|
||||
{
|
||||
protected ElementBuffer CreateElementBuffer(int n)
|
||||
uint[] _bufferID;
|
||||
private IglFunc GL;
|
||||
|
||||
internal ElementBuffer(int n, IglFunc glFunc)
|
||||
{
|
||||
return new ElementBuffer(n, GL);
|
||||
_bufferID = new uint[n];
|
||||
GL = glFunc;
|
||||
fixed (uint* id = _bufferID)
|
||||
{
|
||||
GL.GenBuffers(n, id);
|
||||
}
|
||||
}
|
||||
|
||||
protected unsafe class ElementBuffer : IDisposable
|
||||
public uint this[int n]
|
||||
{
|
||||
uint[] _bufferID;
|
||||
private IglFunc GL;
|
||||
|
||||
internal ElementBuffer(int n, IglFunc glFunc)
|
||||
{
|
||||
_bufferID = new uint[n];
|
||||
GL = glFunc;
|
||||
fixed (uint* id = _bufferID)
|
||||
{
|
||||
GL.GenBuffers(n, id);
|
||||
}
|
||||
}
|
||||
|
||||
public uint this[int n]
|
||||
{
|
||||
get { return _bufferID[n]; }
|
||||
}
|
||||
|
||||
public void Bind(int index)
|
||||
{
|
||||
GL.BindBuffer(BufferType.ELEMENT_ARRAY_BUFFER, _bufferID[index]);
|
||||
}
|
||||
|
||||
public void SetValue<T>(int index, T[] bufferArray, BufferUsage usage)
|
||||
where T : struct, IConvertible
|
||||
{
|
||||
GL.BindBuffer(BufferType.ELEMENT_ARRAY_BUFFER, _bufferID[index]);
|
||||
GL.SetBufferData(BufferType.ELEMENT_ARRAY_BUFFER, bufferArray, usage);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
fixed (uint* id = _bufferID)
|
||||
{
|
||||
GL.DeleteBuffers(_bufferID.Length, id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
get { return _bufferID[n]; }
|
||||
}
|
||||
|
||||
public void Bind(int index)
|
||||
{
|
||||
GL.BindBuffer(BufferType.ELEMENT_ARRAY_BUFFER, _bufferID[index]);
|
||||
}
|
||||
|
||||
public void SetValue<T>(int index, T[] bufferArray, BufferUsage usage)
|
||||
where T : struct, IConvertible
|
||||
{
|
||||
GL.BindBuffer(BufferType.ELEMENT_ARRAY_BUFFER, _bufferID[index]);
|
||||
GL.SetBufferData(BufferType.ELEMENT_ARRAY_BUFFER, bufferArray, usage);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
fixed (uint* id = _bufferID)
|
||||
{
|
||||
GL.DeleteBuffers(_bufferID.Length, id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StgSharp.Graphics
|
||||
{
|
||||
internal class FrameBuffer
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StgSharp.Graphics
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface of all kinds OpenGL buffer onjects
|
||||
/// </summary>
|
||||
public interface IBufferObject
|
||||
{
|
||||
uint this[int index] { get; }
|
||||
void Bind(int index);
|
||||
}
|
||||
}
|
||||
@@ -5,62 +5,55 @@ using System.Text;
|
||||
|
||||
namespace StgSharp.Graphics
|
||||
{
|
||||
public partial class Form
|
||||
|
||||
public unsafe struct VertexArray : IDisposable, IBufferObject
|
||||
{
|
||||
protected VertexArray CreateVertexArray(int n)
|
||||
internal uint[] _bufferID;
|
||||
private IglFunc GL;
|
||||
|
||||
internal VertexArray(int n, IglFunc glFunc)
|
||||
{
|
||||
return new VertexArray(n, GL);
|
||||
_bufferID = new uint[n];
|
||||
GL = glFunc;
|
||||
fixed (uint* id = _bufferID)
|
||||
{
|
||||
GL.GenVertexArrays(n, id);
|
||||
}
|
||||
}
|
||||
|
||||
protected unsafe struct VertexArray : IDisposable
|
||||
public uint this[int n]
|
||||
{
|
||||
internal uint[] _bufferID;
|
||||
private IglFunc GL;
|
||||
|
||||
internal VertexArray(int n, IglFunc glFunc)
|
||||
get
|
||||
{
|
||||
_bufferID = new uint[n];
|
||||
GL = glFunc;
|
||||
fixed (uint* id = _bufferID)
|
||||
{
|
||||
GL.GenVertexArrays(n, id);
|
||||
}
|
||||
return _bufferID[n];
|
||||
}
|
||||
}
|
||||
|
||||
public uint this[int n]
|
||||
{
|
||||
get
|
||||
{
|
||||
return _bufferID[n];
|
||||
}
|
||||
}
|
||||
public void Bind(int index)
|
||||
{
|
||||
GL.BindVertexArray(_bufferID[index]);
|
||||
}
|
||||
|
||||
public void Bind(int index)
|
||||
public void Dispose()
|
||||
{
|
||||
fixed (uint* id = _bufferID)
|
||||
{
|
||||
GL.BindVertexArray(_bufferID[index]);
|
||||
GL.DeleteVertexArrays(_bufferID.Length, id);
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
fixed (uint* id = _bufferID)
|
||||
{
|
||||
GL.DeleteVertexArrays(_bufferID.Length, id);
|
||||
}
|
||||
}
|
||||
public void BindNull()
|
||||
{
|
||||
GL.BindVertexArray(0);
|
||||
}
|
||||
|
||||
public void BindNull()
|
||||
{
|
||||
GL.BindVertexArray(0);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void SetVertexAttribute(uint index, int vertexLength, Type dataType, bool isNomalized, int stride, int pointer)
|
||||
{
|
||||
GL.SetVertexAttribute(
|
||||
index, vertexLength, dataType,
|
||||
isNomalized,
|
||||
stride, pointer);
|
||||
}
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void SetVertexAttribute(uint index, int vertexLength, Type dataType, bool isNomalized, int stride, int pointer)
|
||||
{
|
||||
GL.SetVertexAttribute(
|
||||
index, vertexLength, dataType,
|
||||
isNomalized,
|
||||
stride, pointer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,72 +8,72 @@ using System.Text;
|
||||
|
||||
namespace StgSharp.Graphics
|
||||
{
|
||||
public partial class Form
|
||||
public unsafe struct VertexBuffer : IDisposable, IBufferObject
|
||||
{
|
||||
protected VertexBuffer CreateVertexBuffer(int n)
|
||||
internal uint[] _bufferID;
|
||||
private IglFunc GL;
|
||||
|
||||
internal VertexBuffer(int n, IglFunc glFunc)
|
||||
{
|
||||
return new VertexBuffer(n, GL);
|
||||
_bufferID = new uint[n];
|
||||
GL = glFunc;
|
||||
fixed (uint* ptr = _bufferID)
|
||||
{
|
||||
GL.GenBuffers(n, ptr);
|
||||
}
|
||||
}
|
||||
|
||||
protected unsafe struct VertexBuffer : IDisposable
|
||||
public uint this[int n]
|
||||
{
|
||||
internal uint[] _bufferID;
|
||||
private IglFunc GL;
|
||||
get { return _bufferID[n]; }
|
||||
}
|
||||
|
||||
internal VertexBuffer(int n, IglFunc glFunc)
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public void Unbind()
|
||||
{
|
||||
GL.BindBuffer(BufferType.ARRAY_BUFFER, 0);
|
||||
}
|
||||
|
||||
public void Bind(int index)
|
||||
{
|
||||
GL.BindBuffer(BufferType.ARRAY_BUFFER, _bufferID[index]);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
fixed (uint* id = _bufferID)
|
||||
{
|
||||
_bufferID = new uint[n];
|
||||
GL = glFunc;
|
||||
fixed (uint* ptr = _bufferID)
|
||||
{
|
||||
GL.GenBuffers(n, ptr);
|
||||
}
|
||||
GL.DeleteBuffers(_bufferID.Length, id);
|
||||
}
|
||||
}
|
||||
|
||||
public uint this[int n]
|
||||
{
|
||||
get { return _bufferID[n]; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Set data to current vertex buffer object
|
||||
/// </summary>
|
||||
/// <typeparam name="T">Type of bufferData</typeparam>
|
||||
/// <param name="index">Index to find certain VBO in this instance</param>
|
||||
/// <param name="bufferData">Data to write in</param>
|
||||
/// <param name="usage">How OpenGL use these data, defined by <see cref="BufferUsage"/></param>
|
||||
public void SetValue<T>(int index, T bufferData, BufferUsage usage) where T : IMat
|
||||
{
|
||||
GL.BindBuffer(BufferType.ARRAY_BUFFER, _bufferID[index]);
|
||||
GL.SetBufferData(BufferType.ARRAY_BUFFER, bufferData, usage);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public void Unbind()
|
||||
{
|
||||
GL.BindBuffer(BufferType.ARRAY_BUFFER, 0);
|
||||
}
|
||||
}
|
||||
|
||||
public void Bind(int index)
|
||||
{
|
||||
GL.BindBuffer(BufferType.ARRAY_BUFFER, _bufferID[index]);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
fixed (uint* id = _bufferID)
|
||||
{
|
||||
GL.DeleteBuffers(_bufferID.Length, id);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="bufferData"></param>
|
||||
/// <param name="readType"></param>
|
||||
public void SetValue<T>(int index, T bufferData, BufferUsage usage) where T : IMat
|
||||
{
|
||||
GL.BindBuffer(BufferType.ARRAY_BUFFER, _bufferID[index]);
|
||||
GL.SetBufferData(BufferType.ARRAY_BUFFER, bufferData, usage);
|
||||
|
||||
}
|
||||
|
||||
public void SetValueArray<T>(int index, T[] bufferArray, BufferUsage usage) where T : struct, IConvertible
|
||||
{
|
||||
GL.BindBuffer(BufferType.ARRAY_BUFFER, _bufferID[index]);
|
||||
GL.SetBufferData(BufferType.ARRAY_BUFFER, bufferArray, usage);
|
||||
}
|
||||
/// <summary>
|
||||
/// Set data to current vertex buffer object
|
||||
/// </summary>
|
||||
/// <typeparam name="T">Type of bufferData</typeparam>
|
||||
/// <param name="index">Index to find certain VBO in this instance</param>
|
||||
/// <param name="bufferArray">A array of data to write in</param>
|
||||
/// <param name="usage">How OpenGL use these data, defined by <see cref="BufferUsage"/></param>
|
||||
public void SetValueArray<T>(int index, T[] bufferArray, BufferUsage usage) where T : struct, IConvertible
|
||||
{
|
||||
GL.BindBuffer(BufferType.ARRAY_BUFFER, _bufferID[index]);
|
||||
GL.SetBufferData(BufferType.ARRAY_BUFFER, bufferArray, usage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,11 @@ namespace StgSharp.Graphics
|
||||
internal GLcontext glContext
|
||||
{
|
||||
get { return glRender.api; }
|
||||
set { glRender.api = value; }
|
||||
set
|
||||
{
|
||||
glUpdate.api = value;
|
||||
glRender.api = value;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace StgSharp.Graphics
|
||||
api.ActiveTexture(type);
|
||||
}
|
||||
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
void IglFunc.AttachShader(uint program, uint shader)
|
||||
{
|
||||
@@ -56,7 +57,6 @@ namespace StgSharp.Graphics
|
||||
{
|
||||
while (api.GetError() != 0) { }
|
||||
}
|
||||
|
||||
uint IglFunc.CompileShader(string shaderCode, ShaderType shaderType)
|
||||
{
|
||||
uint shaderID;
|
||||
@@ -262,7 +262,8 @@ namespace StgSharp.Graphics
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
void IglFunc.SetFrameBufferSizeCallback(IntPtr id, FrameBufferSizeHandler handler)
|
||||
{
|
||||
InternalIO.glfw.SetFramebufferSizeCallback(id, handler);
|
||||
IntPtr handlerPtr = Marshal.GetFunctionPointerForDelegate(handler);
|
||||
InternalIO.glfw.SetFramebufferSizeCallback(id, handlerPtr);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace StgSharp.Graphics
|
||||
internal unsafe GLFWwindowfocusfun SetWindowFocusCallback(IntPtr window, GLFWwindowfocusfun callback);
|
||||
internal unsafe GLFWwindowiconifyfun SetWindowIconifyCallback(IntPtr window, GLFWwindowiconifyfun callback);
|
||||
internal unsafe GLFWwindowmaximizefun SetWindowMaximizeCallback(IntPtr window, GLFWwindowmaximizefun callback);
|
||||
internal unsafe FramebuffersizeHandler SetFramebufferSizeCallback(IntPtr window, FrameBufferSizeHandler callback);
|
||||
internal unsafe FramebuffersizeHandler SetFramebufferSizeCallback(IntPtr window, IntPtr callback);
|
||||
internal unsafe GLFWwindowcontentscalefun SetWindowContentScaleCallback(IntPtr window, GLFWwindowcontentscalefun callback);
|
||||
internal unsafe void PollEvents();
|
||||
internal unsafe void WaitEvents();
|
||||
@@ -195,7 +195,7 @@ namespace StgSharp.Graphics
|
||||
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetWindowFocusCallback")] internal extern unsafe static GLFWwindowfocusfun glfwSetWindowFocusCallback(IntPtr window, GLFWwindowfocusfun callback);
|
||||
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetWindowIconifyCallback")] internal extern unsafe static GLFWwindowiconifyfun glfwSetWindowIconifyCallback(IntPtr window, GLFWwindowiconifyfun callback);
|
||||
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetWindowMaximizeCallback")] internal extern unsafe static GLFWwindowmaximizefun glfwSetWindowMaximizeCallback(IntPtr window, GLFWwindowmaximizefun callback);
|
||||
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetFramebufferSizeCallback")] internal extern unsafe static FramebuffersizeHandler glfwSetFramebufferSizeCallback(IntPtr window, FrameBufferSizeHandler callback);
|
||||
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetFramebufferSizeCallback")] internal extern unsafe static FramebuffersizeHandler glfwSetFramebufferSizeCallback(IntPtr window, IntPtr callback);
|
||||
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetWindowContentScaleCallback")] internal extern unsafe static GLFWwindowcontentscalefun glfwSetWindowContentScaleCallback(IntPtr window, GLFWwindowcontentscalefun callback);
|
||||
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwPollEvents")] internal extern unsafe static void glfwPollEvents();
|
||||
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwWaitEvents")] internal extern unsafe static void glfwWaitEvents();
|
||||
@@ -317,7 +317,7 @@ namespace StgSharp.Graphics
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWwindowfocusfun SetWindowFocusCallback(IntPtr window, GLFWwindowfocusfun callback) => glfwSetWindowFocusCallback(window, callback);
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWwindowiconifyfun SetWindowIconifyCallback(IntPtr window, GLFWwindowiconifyfun callback) => glfwSetWindowIconifyCallback(window, callback);
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWwindowmaximizefun SetWindowMaximizeCallback(IntPtr window, GLFWwindowmaximizefun callback) => glfwSetWindowMaximizeCallback(window, callback);
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe FramebuffersizeHandler SetFramebufferSizeCallback(IntPtr window, FrameBufferSizeHandler callback) => glfwSetFramebufferSizeCallback(window, callback);
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe FramebuffersizeHandler SetFramebufferSizeCallback(IntPtr window, IntPtr callback) => glfwSetFramebufferSizeCallback(window, callback);
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWwindowcontentscalefun SetWindowContentScaleCallback(IntPtr window, GLFWwindowcontentscalefun callback) => glfwSetWindowContentScaleCallback(window, callback);
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void PollEvents() => glfwPollEvents();
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void WaitEvents() => glfwWaitEvents();
|
||||
@@ -568,7 +568,7 @@ namespace StgSharp.Graphics
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWwindowfocusfun SetWindowFocusCallback(IntPtr window, GLFWwindowfocusfun callback) => glfw_SetWindowFocusCallback(window, callback);
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWwindowiconifyfun SetWindowIconifyCallback(IntPtr window, GLFWwindowiconifyfun callback) => glfw_SetWindowIconifyCallback(window, callback);
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWwindowmaximizefun SetWindowMaximizeCallback(IntPtr window, GLFWwindowmaximizefun callback) => glfw_SetWindowMaximizeCallback(window, callback);
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe FramebuffersizeHandler SetFramebufferSizeCallback(IntPtr window, FrameBufferSizeHandler callback) => glfw_SetFramebufferSizeCallback(window, callback);
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe FramebuffersizeHandler SetFramebufferSizeCallback(IntPtr window, IntPtr callback) => glfw_SetFramebufferSizeCallback(window, callback);
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWwindowcontentscalefun SetWindowContentScaleCallback(IntPtr window, GLFWwindowcontentscalefun callback) => glfw_SetWindowContentScaleCallback(window, callback);
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void PollEvents() => glfw_PollEvents();
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void WaitEvents() => glfw_WaitEvents();
|
||||
|
||||
@@ -3,6 +3,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@@ -10,11 +11,15 @@ namespace StgSharp.Graphics
|
||||
{
|
||||
internal partial class GLonUpdate : IglFunc
|
||||
{
|
||||
internal GLcontext api;
|
||||
|
||||
|
||||
void IglFunc.ActiveTexture(uint type)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void IglFunc.AttachShader(uint program, uint shader)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
@@ -25,7 +30,6 @@ namespace StgSharp.Graphics
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void IglFunc.BindTexture(uint type, uint texture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
@@ -206,14 +210,11 @@ namespace StgSharp.Graphics
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void SetFrameBufferSizeCallback(IntPtr id, FrameBufferSizeHandler handler)
|
||||
{
|
||||
InternalIO.glfw.SetFramebufferSizeCallback(id, handler);
|
||||
}
|
||||
|
||||
void IglFunc.SetFrameBufferSizeCallback(IntPtr id, FrameBufferSizeHandler handler)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
IntPtr handlerPtr = Marshal.GetFunctionPointerForDelegate(handler);
|
||||
InternalIO.glfw.SetFramebufferSizeCallback(id, handlerPtr);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -5,6 +5,12 @@ namespace StgSharp.Graphics
|
||||
{
|
||||
public interface IglFunc
|
||||
{
|
||||
/// <summary>
|
||||
/// Same function as OpenGL api glActiveTexture
|
||||
/// </summary>
|
||||
/// <param name="type">type of texture to activate</param>
|
||||
void ActiveTexture(uint type);
|
||||
|
||||
/// <summary>
|
||||
/// Same fucntion as OpenGL api glAttachShader
|
||||
/// </summary>
|
||||
@@ -19,6 +25,13 @@ namespace StgSharp.Graphics
|
||||
/// <param name="index"></param>
|
||||
void BindBuffer(BufferType bufferType, uint index);
|
||||
|
||||
/// <summary>
|
||||
/// Same function as OpenGL api, glBindTexture.
|
||||
/// </summary>
|
||||
/// <param name="type">Type of texture to bind</param>
|
||||
/// <param name="texture">Sign of texture</param>
|
||||
void BindTexture(uint type, uint texture);
|
||||
|
||||
/// <summary>
|
||||
/// Same function as OpenGL api, glBindVertexArray
|
||||
/// </summary>
|
||||
@@ -95,6 +108,13 @@ namespace StgSharp.Graphics
|
||||
/// <param name="ptr"></param>
|
||||
unsafe void GenBuffers(int count, uint* ptr);
|
||||
|
||||
/// <summary>
|
||||
/// Same fucnction as OpenGL api glGenTextures.
|
||||
/// </summary>
|
||||
/// <param name="count">amount of textures to generate</param>
|
||||
/// <param name="ptr">pointer to texture signs' array</param>
|
||||
unsafe void GenTextures(int count, uint* ptr);
|
||||
|
||||
/// <summary>
|
||||
/// Same fucntion as OpenGL api, glGenVertexArray
|
||||
/// </summary>
|
||||
@@ -114,6 +134,10 @@ namespace StgSharp.Graphics
|
||||
|
||||
bool GetWindowShouldClose(Form form);
|
||||
|
||||
/// <summary>
|
||||
/// Make the OpenGL context of a vertain <see cref="Form"/> as the activated OpenGL context.
|
||||
/// </summary>
|
||||
/// <param name="form"></param>
|
||||
void MakeContexCurrent(Form form);
|
||||
|
||||
void SetBufferData<T>(BufferType bufferType, T bufferData, BufferUsage usage) where T : IMat;
|
||||
@@ -181,27 +205,6 @@ namespace StgSharp.Graphics
|
||||
/// </summary>
|
||||
/// <param name="program">Sign of program to be used</param>
|
||||
void UseProgram(uint program);
|
||||
|
||||
/// <summary>
|
||||
/// Same fucnction as OpenGL api glGenTextures.
|
||||
/// </summary>
|
||||
/// <param name="count">amount of textures to generate</param>
|
||||
/// <param name="ptr">pointer to texture signs' array</param>
|
||||
unsafe void GenTextures(int count, uint* ptr);
|
||||
|
||||
/// <summary>
|
||||
/// Same function as OpenGL api, glBindTexture.
|
||||
/// </summary>
|
||||
/// <param name="type">Type of texture to bind</param>
|
||||
/// <param name="texture">Sign of texture</param>
|
||||
void BindTexture(uint type, uint texture);
|
||||
|
||||
/// <summary>
|
||||
/// Same function as OpenGL api glActiveTexture
|
||||
/// </summary>
|
||||
/// <param name="type">type of texture to activate</param>
|
||||
void ActiveTexture(uint type);
|
||||
|
||||
/// <summary>
|
||||
/// Same function as the OpenGL api, glViewPort
|
||||
/// </summary>
|
||||
|
||||
@@ -1,21 +1,32 @@
|
||||
using System;
|
||||
using StgSharp.Graphics;
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
||||
namespace StgSharp
|
||||
{
|
||||
public class LinkedList<T> : IEnumerable
|
||||
{
|
||||
public Counter<uint> count = new Counter<uint>(0, 1, 1);
|
||||
internal readonly LinkedListNode<T> _hook;
|
||||
private LinkedListNode<T> _cache;
|
||||
private bool isEmpty;
|
||||
public Counter<uint> count = new Counter<uint>(0, 1, 1);
|
||||
|
||||
public LinkedList()
|
||||
{
|
||||
_hook = new LinkedListNode<T>();
|
||||
isEmpty = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Whether this linked list has no members or not.
|
||||
/// </summary>
|
||||
public bool IsEmpty
|
||||
{
|
||||
get { return count == 0; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The first memeber of this linkec list.
|
||||
/// Set value to this property will reset the first node.
|
||||
/// </summary>
|
||||
public T First
|
||||
{
|
||||
get { return _hook._next._value; }
|
||||
@@ -27,6 +38,10 @@ namespace StgSharp
|
||||
private set { _hook._next = default; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The last memeber of this linkec list.
|
||||
/// Set value to this property will reset the first node.
|
||||
/// </summary>
|
||||
public T Tail
|
||||
{
|
||||
get { return _hook._previous._value; }
|
||||
@@ -45,14 +60,13 @@ namespace StgSharp
|
||||
public void Add(T t)
|
||||
{
|
||||
//checkout if the linkedlist is null
|
||||
if (isEmpty)
|
||||
if (IsEmpty)
|
||||
{
|
||||
LinkedListNode<T> node = new LinkedListNode<T>(t);
|
||||
_hook._next = node;
|
||||
_hook._previous = node;
|
||||
node.Next = _hook;
|
||||
node.Previous = _hook;
|
||||
isEmpty = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -66,6 +80,53 @@ namespace StgSharp
|
||||
count++;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Remove all members from this list
|
||||
/// </summary>
|
||||
public void Clear()
|
||||
{
|
||||
_hook._previous = null;
|
||||
_hook._next = null;
|
||||
count.Reset();
|
||||
GC.Collect();
|
||||
}
|
||||
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return new LinkedListEnumrator<T>(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Insert a member to current linkedlist,
|
||||
/// the new member will be after a certain existed member.
|
||||
/// </summary>
|
||||
/// <param name="target">New member will be inserted after this member</param>
|
||||
/// <param name="newMember">The new member to be inserted</param>
|
||||
public void InsertAfter(T target, T newMember)
|
||||
{
|
||||
try
|
||||
{
|
||||
LinkedListNode<T> targetNode = Find(target);
|
||||
LinkedListNode<T> targetNext = targetNode._next;
|
||||
LinkedListNode<T> newNode = new LinkedListNode<T>(newMember);
|
||||
|
||||
targetNode._next = newNode;
|
||||
newNode._next = targetNext;
|
||||
targetNode._previous = newNode;
|
||||
newNode._previous = targetNode;
|
||||
|
||||
count++;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Remove a member from this linkedlist.
|
||||
/// </summary>
|
||||
/// <param name="value">Member to be removed from this list</param>
|
||||
public void Remove(T value)
|
||||
{
|
||||
LinkedListNode<T> node = Find(value);
|
||||
@@ -76,13 +137,14 @@ namespace StgSharp
|
||||
count--;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// remove the first member of the list
|
||||
/// </summary>
|
||||
public void RemoveFirst()
|
||||
{
|
||||
|
||||
if (count._value == 1)
|
||||
{
|
||||
First = default;
|
||||
isEmpty = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -91,13 +153,15 @@ namespace StgSharp
|
||||
count--;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// remove the last member of the list
|
||||
/// </summary>
|
||||
public void RemoveTail()
|
||||
{
|
||||
//check out if the list has only one member
|
||||
if (count._value == 1)
|
||||
{
|
||||
First = default;
|
||||
isEmpty = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -124,28 +188,13 @@ namespace StgSharp
|
||||
|
||||
return enumerator;
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
_hook._previous = null;
|
||||
_hook._next = null;
|
||||
count.Reset();
|
||||
}
|
||||
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return new LinkedListEnumrator<T>(this);
|
||||
}
|
||||
|
||||
|
||||
/**/
|
||||
internal struct LinkedListEnumrator<T> : IEnumerator
|
||||
{
|
||||
private LinkedList<T> _target;
|
||||
LinkedListNode<T> enumerator;
|
||||
private uint index=0;
|
||||
private T _value;
|
||||
|
||||
LinkedListNode<T> enumerator;
|
||||
private uint index = 0;
|
||||
public LinkedListEnumrator(LinkedList<T> target)
|
||||
{
|
||||
_target = target;
|
||||
@@ -154,7 +203,7 @@ namespace StgSharp
|
||||
|
||||
object IEnumerator.Current
|
||||
{
|
||||
get
|
||||
get
|
||||
{
|
||||
if (index == 0 || enumerator == _target._hook)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,6 @@ namespace StgSharp
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public LinkedListNode(T t)
|
||||
{
|
||||
_value = t;
|
||||
@@ -43,8 +42,8 @@ namespace StgSharp
|
||||
{
|
||||
_previous.Next = _next;
|
||||
_next.Previous = _previous;
|
||||
_next = default(LinkedListNode<T>);
|
||||
_previous = default(LinkedListNode<T>);
|
||||
_next = null;
|
||||
_previous = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace StgSharp.Math
|
||||
vector4Map.Add(firstVector4ptr+i);
|
||||
}
|
||||
|
||||
mapID = Calc.RandomSeed();
|
||||
mapID = Scaler.RandomSeed();
|
||||
}
|
||||
|
||||
internal long RegistManagedVector4Ptr()
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
{
|
||||
public static float GetAngle(Vec2d vec1, Vec2d vec2)
|
||||
{
|
||||
return Calc.ACos(1
|
||||
return Scaler.ACos(1
|
||||
//vec1.multiple(vec2)
|
||||
/ (vec1.GetLength() * vec2.GetLength())
|
||||
);
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
public static float GetAngle(vec3d vec1, vec3d vec2)
|
||||
{
|
||||
return Calc.ACos(
|
||||
return Scaler.ACos(
|
||||
vec1 * vec2
|
||||
/ (vec1.GetLength() * vec2.GetLength())
|
||||
);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
{
|
||||
public static float GetLength(this vec3d vec)
|
||||
{
|
||||
return Calc.Sqrt(
|
||||
return Scaler.Sqrt(
|
||||
vec.X * vec.X +
|
||||
vec.Y * vec.Y +
|
||||
vec.Z * vec.Z
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
public static float GetLength(this Vec2d vec)
|
||||
{
|
||||
return Calc.Sqrt(
|
||||
return Scaler.Sqrt(
|
||||
vec.X * vec.X +
|
||||
vec.Y * vec.Y
|
||||
);
|
||||
|
||||
@@ -1,52 +1,55 @@
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace StgSharp.Math
|
||||
{
|
||||
public static unsafe partial class Calc
|
||||
public static unsafe partial class Scaler
|
||||
{
|
||||
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static unsafe float ACos(float x)
|
||||
{
|
||||
return MathF.Acos(x);
|
||||
|
||||
int sign = 1;
|
||||
float y;
|
||||
/*
|
||||
int sign = 1;
|
||||
float y;
|
||||
|
||||
if (x < 0)
|
||||
{
|
||||
sign = -1;
|
||||
y = -x;
|
||||
}
|
||||
else
|
||||
{
|
||||
y = x;
|
||||
}
|
||||
if (x < 0)
|
||||
{
|
||||
sign = -1;
|
||||
y = -x;
|
||||
}
|
||||
else
|
||||
{
|
||||
y = x;
|
||||
}
|
||||
|
||||
if (x > 1)
|
||||
{
|
||||
throw new ArgumentException();
|
||||
}
|
||||
if (x > 1)
|
||||
{
|
||||
throw new ArgumentException();
|
||||
}
|
||||
|
||||
float r, s, u, v = 0.0f;
|
||||
bool transform = (y >= 0.5f);
|
||||
float r, s, u, v = 0.0f;
|
||||
bool transform = (y >= 0.5f);
|
||||
|
||||
if (transform)
|
||||
{
|
||||
r = 0.5f * (1.0f - y);
|
||||
s = Calc.Sqrt(r);
|
||||
y = s;
|
||||
}
|
||||
else
|
||||
{
|
||||
r = y * y;
|
||||
}
|
||||
u = r * (0.184161606965100694821398249421F +
|
||||
(-0.0565298683201845211985026327361F +
|
||||
(-0.0133819288943925804214011424456F -
|
||||
0.00396137437848476485201154797087F * r) * r) * r) /
|
||||
(1.10496961524520294485512696706F -
|
||||
0.836411276854206731913362287293F * r);
|
||||
/**/
|
||||
if (transform)
|
||||
{
|
||||
r = 0.5f * (1.0f - y);
|
||||
s = Scaler.Sqrt(r);
|
||||
y = s;
|
||||
}
|
||||
else
|
||||
{
|
||||
r = y * y;
|
||||
}
|
||||
u = r * (0.184161606965100694821398249421F +
|
||||
(-0.0565298683201845211985026327361F +
|
||||
(-0.0133819288943925804214011424456F -
|
||||
0.00396137437848476485201154797087F * r) * r) * r) /
|
||||
(1.10496961524520294485512696706F -
|
||||
0.836411276854206731913362287293F * r);
|
||||
/*
|
||||
|
||||
if (transform)
|
||||
{
|
||||
@@ -65,11 +68,12 @@ namespace StgSharp.Math
|
||||
else
|
||||
{
|
||||
v = y + y * u;
|
||||
}/**/
|
||||
}
|
||||
|
||||
v = sign * v;
|
||||
|
||||
return piby2 - v;
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ using System;
|
||||
|
||||
namespace StgSharp.Math
|
||||
{
|
||||
public static unsafe partial class Calc
|
||||
public static unsafe partial class Scaler
|
||||
{
|
||||
|
||||
private const float
|
||||
@@ -26,7 +26,8 @@ namespace StgSharp.Math
|
||||
/// <exception cref="ArgumentException"></exception>
|
||||
public static float ASin(float x)
|
||||
{
|
||||
|
||||
return MathF.Asin(x);
|
||||
/*
|
||||
int sign = 1;
|
||||
float y;
|
||||
|
||||
@@ -51,7 +52,7 @@ namespace StgSharp.Math
|
||||
if (transform)
|
||||
{
|
||||
r = 0.5f * (1.0f - y);
|
||||
s = Calc.Sqrt(r);
|
||||
s = Scaler.Sqrt(r);
|
||||
y = s;
|
||||
}
|
||||
else
|
||||
@@ -64,7 +65,7 @@ namespace StgSharp.Math
|
||||
0.00396137437848476485201154797087F * r) * r) * r) /
|
||||
(1.10496961524520294485512696706F -
|
||||
0.836411276854206731913362287293F * r);
|
||||
/**/
|
||||
/*
|
||||
|
||||
if (transform)
|
||||
{
|
||||
@@ -83,10 +84,10 @@ namespace StgSharp.Math
|
||||
else
|
||||
{
|
||||
v = y + y * u;
|
||||
}/**/
|
||||
}/*
|
||||
|
||||
return sign * v;
|
||||
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,16 @@
|
||||
namespace StgSharp.Math
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace StgSharp.Math
|
||||
{
|
||||
public static unsafe partial class Calc
|
||||
public static unsafe partial class Scaler
|
||||
{
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static unsafe float ATan(float x)
|
||||
{
|
||||
return MathF.Atan(x);
|
||||
/*
|
||||
float sign = 1, angle = 0;
|
||||
if (x < 0)
|
||||
{
|
||||
@@ -75,7 +82,7 @@
|
||||
v *= sign;
|
||||
|
||||
return v;
|
||||
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Globalization;
|
||||
|
||||
namespace StgSharp.Math
|
||||
{
|
||||
public static unsafe partial class Calc
|
||||
public static unsafe partial class Scaler
|
||||
{
|
||||
|
||||
public static unsafe float Abs(float x)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace StgSharp.Math
|
||||
{
|
||||
public static partial class Calc
|
||||
public static partial class Scaler
|
||||
{
|
||||
|
||||
public static float Cos(float x)
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace StgSharp.Math
|
||||
{
|
||||
public unsafe delegate float ScalarCalcHandler(float* x);
|
||||
|
||||
public static unsafe partial class Calc
|
||||
public static unsafe partial class Scaler
|
||||
{
|
||||
[DllImport("Kernel32.dll", EntryPoint = "VirtualAlloc")]
|
||||
private static extern IntPtr VirtualAlloc(IntPtr address, int size, uint allocType, uint protect);
|
||||
@@ -17,7 +17,7 @@ namespace StgSharp.Math
|
||||
const uint PAGE_EXECUTE_READWRITE = 0x40;
|
||||
const uint MEM_RELEASE = 0x8000;
|
||||
|
||||
static Calc()
|
||||
static Scaler()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace StgSharp.Math
|
||||
{
|
||||
public static unsafe partial class Calc
|
||||
public static unsafe partial class Scaler
|
||||
{
|
||||
|
||||
public const float E = 2.718281828f;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace StgSharp.Math
|
||||
{
|
||||
public static partial class Calc
|
||||
public static partial class Scaler
|
||||
{
|
||||
|
||||
private static readonly float[] logArray =
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace StgSharp.Math
|
||||
{
|
||||
public static unsafe partial class Calc
|
||||
public static unsafe partial class Scaler
|
||||
{
|
||||
/// <summary>
|
||||
/// calculate the value of x^y
|
||||
@@ -36,7 +36,7 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
z = Calc.Log(x) * y;
|
||||
z = Scaler.Log(x) * y;
|
||||
|
||||
bool sign = false;
|
||||
if (z < 0)
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
using StgSharp.Controlling;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
|
||||
namespace StgSharp.Math
|
||||
{
|
||||
public static unsafe partial class Calc
|
||||
public static unsafe partial class Scaler
|
||||
{
|
||||
|
||||
internal static float currentSeed
|
||||
@@ -15,32 +16,41 @@ namespace StgSharp.Math
|
||||
= Calc.Abs(System.DateTime.UtcNow.GetHashCode());
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static float Random()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// returns a random float number between 0 and 1.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
|
||||
public static unsafe float Random()
|
||||
{
|
||||
public static unsafe float LowProceisionRandom()
|
||||
{
|
||||
float seed = currentSeed;
|
||||
|
||||
float sample = Calc.Pow(Calc.SeedSqrt(seed),2);
|
||||
float sample = Scaler.Pow(Scaler.SeedSqrt(seed), 2);
|
||||
float sample2 = (sample - seed) / seed;
|
||||
sample2 = Calc.Abs(sample2);
|
||||
sample2 = Scaler.Abs(sample2);
|
||||
|
||||
if (sample==1)
|
||||
if (sample == 1)
|
||||
{
|
||||
sample = sample2;
|
||||
}
|
||||
|
||||
|
||||
currentSeed = sample;
|
||||
sample2 *= 1000000;
|
||||
|
||||
float result = sample2-(int)sample2;
|
||||
float result = sample2 - (int)sample2;
|
||||
if (result == 0)
|
||||
{
|
||||
currentSeed = sample2+0.1f;
|
||||
result = Calc.Random();
|
||||
currentSeed = sample2 + 0.1f;
|
||||
result = Scaler.LowProceisionRandom();
|
||||
}
|
||||
return result;
|
||||
|
||||
@@ -52,8 +62,8 @@ namespace StgSharp.Math
|
||||
/// <returns></returns>
|
||||
public static unsafe int RandomSeed()
|
||||
{
|
||||
float seedValue1 = Random();
|
||||
float seedValue2 = Random();
|
||||
float seedValue1 = LowProceisionRandom();
|
||||
float seedValue2 = LowProceisionRandom();
|
||||
uint seedValueBits = *(uint*)&seedValue1;
|
||||
|
||||
float seedValue = seedValueBits * seedValue2;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace StgSharp.Math
|
||||
{
|
||||
public static partial class Calc
|
||||
public static partial class Scaler
|
||||
{
|
||||
public const float Pi = 3.1415926f;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Runtime.CompilerServices;
|
||||
|
||||
namespace StgSharp.Math
|
||||
{
|
||||
public static partial class Calc
|
||||
public static partial class Scaler
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static float Sqrt(float x)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace StgSharp.Math
|
||||
{
|
||||
public static partial class Calc
|
||||
public static partial class Scaler
|
||||
{
|
||||
|
||||
public static float Tan(float x)
|
||||
|
||||
Binary file not shown.
@@ -4,13 +4,7 @@
|
||||
<name>StgSharp</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="M:StgSharp.Control.InitPool">
|
||||
<summary>
|
||||
Add a pool to timeline controller, and return the instance of the pool.
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Control.GetKeyStatus(StgSharp.Graphics.Form,StgSharp.Control.Key)">
|
||||
<member name="M:StgSharp.Operation.GetKeyStatus(StgSharp.Graphics.Form,StgSharp.Operation.Key)">
|
||||
<summary>
|
||||
Get the status of a certain key on the keyboard.
|
||||
</summary>
|
||||
@@ -30,6 +24,27 @@
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:StgSharp.Graphics.Form.Height">
|
||||
<summary>
|
||||
Height of this form, represent in <see cref="T:System.Int32"/>
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:StgSharp.Graphics.Form.Size">
|
||||
<summary>
|
||||
Width of this form, represent in <see cref="T:System.Int32"/>
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:StgSharp.Graphics.Form.GL">
|
||||
<summary>
|
||||
A set of methods providing support for all OpenGL
|
||||
APIs and other methods depend on OpenGL.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.Show(System.Object[])">
|
||||
<summary>
|
||||
Init this form and render it on screen, and respond with operation
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.InitForm(System.Int32,System.Int32,System.String,System.IntPtr,StgSharp.Graphics.Form)">
|
||||
<summary>
|
||||
Constructor of a Form, creats an instance of a form and
|
||||
@@ -38,9 +53,11 @@
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.MakeAsCurrentContext">
|
||||
<summary>
|
||||
|
||||
Init an OpenGl context if current form has not been binded to any context.
|
||||
and set the context binded to current form as current OpenGL context.
|
||||
</summary>
|
||||
<exception cref="T:System.Exception"></exception>
|
||||
<exception cref="T:System.Exception">Something goes wrong and
|
||||
StgSharp fails in creating a new OpenGL context. </exception>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.SetSize(System.Int32,System.Int32)">
|
||||
<summary>
|
||||
@@ -77,6 +94,11 @@
|
||||
Maximum size of current form. In form of a <see cref="T:StgSharp.Math.Vec2d"/> of (width,height)
|
||||
</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.BindToPlatform">
|
||||
<summary>
|
||||
Bind this form to StgSharp platform.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.Texture.LoadTexture(System.Int32,System.String,StgSharp.Graphics.ImageLoader)">
|
||||
<summary>
|
||||
|
||||
@@ -92,137 +114,21 @@
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.VertexBuffer.SetValue``1(System.Int32,``0,StgSharp.Graphics.BufferUsage)">
|
||||
<summary>
|
||||
|
||||
Set data to current vertex buffer object
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="bufferData"></param>
|
||||
<param name="readType"></param>
|
||||
<typeparam name="T">Type of bufferData</typeparam>
|
||||
<param name="index">Index to find certain VBO in this instance</param>
|
||||
<param name="bufferData">Data to write in</param>
|
||||
<param name="usage">How OpenGL use these data, defined by <see cref="T:StgSharp.Graphics.BufferUsage"/></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.GLfunc.ClearColor(System.Single,System.Single,System.Single,System.Single)">
|
||||
<member name="M:StgSharp.Graphics.Form.VertexBuffer.SetValueArray``1(System.Int32,``0[],StgSharp.Graphics.BufferUsage)">
|
||||
<summary>
|
||||
Call apiClearColor in OpenGL
|
||||
specifies the red, green, blue, and alpha values used by apiClear to clear the color buffers.
|
||||
Values specified by apiClearColor are clamped to the range [0,1]
|
||||
Set data to current vertex buffer object
|
||||
</summary>
|
||||
<param name="R">Specify the red values used when the color buffers are cleared.</param>
|
||||
<param name="G">Specify the red values used when the color buffers are cleared.</param>
|
||||
<param name="B">Specify the red values used when the color buffers are cleared.</param>
|
||||
<param name="A">Specify the red values used when the color buffers are cleared.</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.GLfunc.BindBuffer(StgSharp.Graphics.BufferType,System.UInt32)">
|
||||
<summary>
|
||||
Bind the indexed buffer object to certain type of buffer
|
||||
</summary>
|
||||
<param name="bufferType"></param>
|
||||
<param name="index"></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.GLfunc.Clear(StgSharp.Graphics.MaskBufferBit)">
|
||||
<summary>
|
||||
Clear buffers to preset values
|
||||
</summary>
|
||||
<param name="mask"></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.GLfunc.CompileShader(System.String,StgSharp.Graphics.ShaderType)">
|
||||
<summary>
|
||||
Conpile the provided shader code in string form.
|
||||
</summary>
|
||||
<param name="shaderCode">A string represent the shader's code</param>
|
||||
<param name="shaderType">An <see cref="T:StgSharp.Graphics.ShaderType"/> enum represent the type of the shader to
|
||||
conpile, including vertex shader and fragment shader.</param>
|
||||
<returns>An uint value as the only mark of conpiled shader</returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.GLfunc.CreateWindowHandle(System.Int32,System.Int32,System.String,System.IntPtr,StgSharp.Graphics.Form)">
|
||||
<summary>
|
||||
Creates a form and its associated
|
||||
</summary>
|
||||
<param name="width">Required width</param>
|
||||
<param name="height">Required width</param>
|
||||
<param name="tittle">Tittle of the window </param>
|
||||
<param name="monitor"></param>
|
||||
<param name="share"></param>
|
||||
<returns>The instance of created form</returns>
|
||||
<exception cref="T:System.Exception"></exception>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.GLfunc.SetFrameBufferSizeCallback(System.IntPtr,StgSharp.Graphics.FrameBufferSizeHandler)">
|
||||
<summary>
|
||||
sets the framebuffer resize callback of the specified <see cref="T:StgSharp.Graphics.Form"/>,
|
||||
which is called when the framebuffer of the specified <see cref="T:StgSharp.Graphics.Form"/> is resized.
|
||||
</summary>
|
||||
<param name="id">The only signiture stands for the <see cref="T:StgSharp.Graphics.Form"/> to be controlled</param>
|
||||
<param name="handler">Method hadler </param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.GLfunc.SetVertexAttribute(System.UInt32,System.Int32,System.Type,System.Boolean,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
Set how a shader parameter read data from a VBO.
|
||||
</summary>
|
||||
<param name="index">Serial number of the parameter</param>
|
||||
<param name="size">Amount of data each elements contains</param>
|
||||
<param name="t">Type of data read by shader</param>
|
||||
<param name="normalized"></param>
|
||||
<param name="stride">Pixels stride of each sets of data</param>
|
||||
<param name="pointer"></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.GLfunc.SetValue(StgSharp.Graphics.Form.Uniform{System.Single},System.Single)">
|
||||
<summary>
|
||||
Set data value to a float <see cref="T:StgSharp.Graphics.Form.Uniform`1"/>,
|
||||
all types of parameters are float.
|
||||
</summary>
|
||||
<param name="uniform">The <see cref="T:StgSharp.Graphics.Form.Uniform`1"/> target</param>
|
||||
<param name="v0">The value to be set</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.GLfunc.SetValue(StgSharp.Graphics.Form.Uniform{System.Int32},System.Int32)">
|
||||
<summary>
|
||||
Set data value to a int <see cref="T:StgSharp.Graphics.Form.Uniform`1"/>,
|
||||
all types of parameters are int.
|
||||
</summary>
|
||||
<param name="uniform">The <see cref="T:StgSharp.Graphics.Form.Uniform`1"/> target</param>
|
||||
<param name="i0">The value to be set</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.GLfunc.SetValue(StgSharp.Graphics.Form.Uniform{System.Single,System.Single},System.Single,System.Single)">
|
||||
<summary>
|
||||
Set data value to a float <see cref="T:StgSharp.Graphics.Form.Uniform`2"/>,
|
||||
all types of parameters are float.
|
||||
</summary>
|
||||
<param name="uniform">The <see cref="T:StgSharp.Graphics.Form.Uniform`2"/> target</param>
|
||||
<param name="v0">The first value to be set</param>
|
||||
<param name="v1">The second value to be set</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.GLfunc.SetValue(StgSharp.Graphics.Form.Uniform{System.Single,System.Single,System.Single},System.Single,System.Single,System.Single)">
|
||||
<summary>
|
||||
Set data value to a float <see cref="T:StgSharp.Graphics.Form.Uniform`3"/>,
|
||||
all types of parameters are float.
|
||||
</summary>
|
||||
<param name="uniform">The <see cref="T:StgSharp.Graphics.Form.Uniform`3"/> target</param>
|
||||
<param name="v0">The first value to be set</param>
|
||||
<param name="v1">The second value to be set</param>
|
||||
<param name="v2">The third value to be set</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.GLfunc.SetValue(StgSharp.Graphics.Form.Uniform{System.Single,System.Single,System.Single,System.Single},System.Single,System.Single,System.Single,System.Single)">
|
||||
<summary>
|
||||
Set data value to a float <see cref="T:StgSharp.Graphics.Form.Uniform`4"/>,
|
||||
all types of parameters are float.
|
||||
</summary>
|
||||
<param name="uniform">The <see cref="T:StgSharp.Graphics.Form.Uniform`4"/> target</param>
|
||||
<param name="v0">The first value to be set</param>
|
||||
<param name="v1">The second value to be set</param>
|
||||
<param name="v2">The third value to be set</param>
|
||||
<param name="v3">The forth value to be set</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.GLfunc.SetValue(StgSharp.Graphics.Form.Uniform{System.Single,System.Single,System.Single,System.Single},StgSharp.Math.Vec4d)">
|
||||
<summary>
|
||||
Set data value to a float <see cref="T:StgSharp.Graphics.Form.Uniform`4"/>,
|
||||
all types of parameters are float.
|
||||
</summary>
|
||||
<param name="uniform">The <see cref="T:StgSharp.Graphics.Form.Uniform`4"/> target</param>
|
||||
<param name="vec">A <see cref="T:StgSharp.Math.Vec4d"/> packing four parameters of the uniform </param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.GLfunc.SetValue(StgSharp.Graphics.Form.Uniform{StgSharp.Math.Vec4d},StgSharp.Math.Vec4d)">
|
||||
<summary>
|
||||
Set data value to a float <see cref="T:StgSharp.Graphics.Form.Uniform`1"/>,
|
||||
all types of parameters are <see cref="T:StgSharp.Math.Vec4d"/>.
|
||||
</summary>
|
||||
<param name="uniform">The <see cref="T:StgSharp.Graphics.Form.Uniform`1"/> target</param>
|
||||
<param name="vec">A <see cref="T:StgSharp.Math.Vec4d"/> value of the uniform </param>
|
||||
<typeparam name="T">Type of bufferData</typeparam>
|
||||
<param name="index">Index to find certain VBO in this instance</param>
|
||||
<param name="bufferArray">A array of data to write in</param>
|
||||
<param name="usage">How OpenGL use these data, defined by <see cref="T:StgSharp.Graphics.BufferUsage"/></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.CreateShader">
|
||||
<summary>
|
||||
@@ -235,7 +141,7 @@
|
||||
A <see cref="T:System.UInt32"/> value represent this shader.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.Shader.#ctor(StgSharp.Graphics.Form.GLfunc)">
|
||||
<member name="M:StgSharp.Graphics.Form.Shader.#ctor(StgSharp.Graphics.IglFunc)">
|
||||
<summary>
|
||||
Inti a shader with no program attached.
|
||||
</summary>
|
||||
@@ -270,6 +176,23 @@
|
||||
Let the current context use this shader.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:StgSharp.Graphics.FrameTimer">
|
||||
<summary>
|
||||
A timer counting frames after its construction.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:StgSharp.Graphics.FrameTimer.Time">
|
||||
<summary>
|
||||
Frames after this timer created.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.FrameTimer.op_Implicit(StgSharp.Graphics.FrameTimer)~System.UInt32">
|
||||
<summary>
|
||||
Convert a <see cref="T:StgSharp.Graphics.FrameTimer"/> into uint value.
|
||||
this will get total frames since the timer was created.
|
||||
</summary>
|
||||
<param name="timer"><see cref="T:StgSharp.Graphics.FrameTimer"/> to be converted</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.glManager.LoadGLapi(StgSharp.Graphics.Form,StgSharp.Graphics.GLfuncLoader)">
|
||||
<summary>
|
||||
Load all aupportable OpenGL APIs and bind them to given <see cref="T:StgSharp.Graphics.Form"/> context.
|
||||
@@ -284,10 +207,242 @@
|
||||
<param name="name">Name of the OpenGL api</param>
|
||||
<returns>The funtion pointer of the api in form of <see cref="T:System.IntPtr"/></returns>
|
||||
</member>
|
||||
<member name="F:StgSharp.Controlling.TimeLine.tickCounter">
|
||||
<member name="M:StgSharp.Graphics.GLonRender.StgSharp#Graphics#IglFunc#SetValue(StgSharp.Graphics.Uniform{System.Single},System.Single)">
|
||||
<summary>
|
||||
Tick counter count the frames passed since the program start.
|
||||
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`1"/>,
|
||||
all types of parameters are float.
|
||||
</summary>
|
||||
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`1"/> target</param>
|
||||
<param name="v0">The value to be set</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.GLonRender.StgSharp#Graphics#IglFunc#SetValue(StgSharp.Graphics.Uniform{System.Int32},System.Int32)">
|
||||
<summary>
|
||||
Set data value to a int <see cref="T:StgSharp.Graphics.Uniform`1"/>,
|
||||
all types of parameters are int.
|
||||
</summary>
|
||||
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`1"/> target</param>
|
||||
<param name="i0">The value to be set</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.GLonRender.StgSharp#Graphics#IglFunc#SetValue(StgSharp.Graphics.Uniform{System.Single,System.Single},System.Single,System.Single)">
|
||||
<summary>
|
||||
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`2"/>,
|
||||
all types of parameters are float.
|
||||
</summary>
|
||||
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`2"/> target</param>
|
||||
<param name="v0">The first value to be set</param>
|
||||
<param name="v1">The second value to be set</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.GLonRender.StgSharp#Graphics#IglFunc#SetValue(StgSharp.Graphics.Uniform{System.Single,System.Single,System.Single},System.Single,System.Single,System.Single)">
|
||||
<summary>
|
||||
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`3"/>,
|
||||
all types of parameters are float.
|
||||
</summary>
|
||||
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`3"/> target</param>
|
||||
<param name="v0">The first value to be set</param>
|
||||
<param name="v1">The second value to be set</param>
|
||||
<param name="v2">The third value to be set</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.GLonRender.StgSharp#Graphics#IglFunc#SetValue(StgSharp.Graphics.Uniform{System.Single,System.Single,System.Single,System.Single},System.Single,System.Single,System.Single,System.Single)">
|
||||
<summary>
|
||||
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`4"/>,
|
||||
all types of parameters are float.
|
||||
</summary>
|
||||
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`4"/> target</param>
|
||||
<param name="v0">The first value to be set</param>
|
||||
<param name="v1">The second value to be set</param>
|
||||
<param name="v2">The third value to be set</param>
|
||||
<param name="v3">The forth value to be set</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.GLonRender.SetValue(StgSharp.Graphics.Uniform{System.Single,System.Single,System.Single,System.Single},StgSharp.Math.Vec4d)">
|
||||
<summary>
|
||||
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`4"/>,
|
||||
all types of parameters are float.
|
||||
</summary>
|
||||
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`4"/> target</param>
|
||||
<param name="vec">A <see cref="T:StgSharp.Math.Vec4d"/> packing four parameters of the uniform </param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.GLonRender.SetValue(StgSharp.Graphics.Uniform{StgSharp.Math.Vec4d},StgSharp.Math.Vec4d)">
|
||||
<summary>
|
||||
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`1"/>,
|
||||
all types of parameters are <see cref="T:StgSharp.Math.Vec4d"/>.
|
||||
</summary>
|
||||
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`1"/> target</param>
|
||||
<param name="vec">A <see cref="T:StgSharp.Math.Vec4d"/> value of the uniform </param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.AttachShader(System.UInt32,System.UInt32)">
|
||||
<summary>
|
||||
Same fucntion as OpenGL api glAttachShader
|
||||
</summary>
|
||||
<param name="program">Shader program to be attachec</param>
|
||||
<param name="shader">A shader part to attach</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.BindBuffer(StgSharp.Graphics.BufferType,System.UInt32)">
|
||||
<summary>
|
||||
Bind the indexed buffer object to certain type of buffer
|
||||
</summary>
|
||||
<param name="bufferType"></param>
|
||||
<param name="index"></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.BindVertexArray(System.UInt32)">
|
||||
<summary>
|
||||
Same function as OpenGL api, glBindVertexArray
|
||||
</summary>
|
||||
<param name="index"></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.Clear(StgSharp.Graphics.MaskBufferBit)">
|
||||
<summary>
|
||||
Clear buffers to preset values
|
||||
</summary>
|
||||
<param name="mask"></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.ClearColor(System.Single,System.Single,System.Single,System.Single)">
|
||||
<summary>
|
||||
Call apiClearColor in OpenGL
|
||||
specifies the red, green, blue, and alpha values used by apiClear to clear the color buffers.
|
||||
Values specified by apiClearColor are clamped to the range [0,1]
|
||||
</summary>
|
||||
<param name="R">Specify the red values used when the color buffers are cleared.</param>
|
||||
<param name="G">Specify the red values used when the color buffers are cleared.</param>
|
||||
<param name="B">Specify the red values used when the color buffers are cleared.</param>
|
||||
<param name="A">Specify the red values used when the color buffers are cleared.</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.CompileShader(System.String,StgSharp.Graphics.ShaderType)">
|
||||
<summary>
|
||||
Conpile the provided shader code in string form.
|
||||
</summary>
|
||||
<param name="shaderCode">A string represent the shader's code</param>
|
||||
<param name="shaderType">An <see cref="T:StgSharp.Graphics.ShaderType"/> enum represent the type of the shader to
|
||||
conpile, including vertex shader and fragment shader.</param>
|
||||
<returns>An uint value as the only mark of conpiled shader</returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.CreateProgram">
|
||||
<summary>
|
||||
Same function as OpenGL api, glCreateProgram
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.CreateWindowHandle(System.Int32,System.Int32,System.String,System.IntPtr,StgSharp.Graphics.Form)">
|
||||
<summary>
|
||||
Creates a form and its associated
|
||||
</summary>
|
||||
<param name="width">Required width</param>
|
||||
<param name="height">Required width</param>
|
||||
<param name="tittle">Tittle of the window </param>
|
||||
<param name="monitor"></param>
|
||||
<param name="share"></param>
|
||||
<returns>The instance of created form</returns>
|
||||
<exception cref="T:System.Exception"></exception>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.DeleteBuffers(System.Int32,System.UInt32*)">
|
||||
<summary>
|
||||
Same function as OpenGL api, glDeleteBuffer.
|
||||
</summary>
|
||||
<param name="count">Amount of bufferd to be deleted</param>
|
||||
<param name="ptr">Pointer of buffer to be deleted</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.DeleteVertexArrays(System.Int32,System.UInt32*)">
|
||||
<summary>
|
||||
Same function as OpenGL api, glDeleteVertexArrays
|
||||
</summary>
|
||||
<param name="count">Amount of vao to be deleted</param>
|
||||
<param name="ptr">pointer of vao sign array</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.GenBuffers(System.Int32,System.UInt32*)">
|
||||
<summary>
|
||||
Same fucntion as the OpenGL api glGenBuffers
|
||||
</summary>
|
||||
<param name="count"></param>
|
||||
<param name="ptr"></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.GenVertexArrays(System.Int32,System.UInt32*)">
|
||||
<summary>
|
||||
Same fucntion as OpenGL api, glGenVertexArray
|
||||
</summary>
|
||||
<param name="count">Amount of vao to be generated</param>
|
||||
<param name="ptr">Pointer of vao sign array</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.GetUniformLocation(System.UInt32,System.Byte*)">
|
||||
<summary>
|
||||
Same fucntion as OpenGL api, glGetUniformLocation
|
||||
</summary>
|
||||
<param name="program">Shader program to find the uniform</param>
|
||||
<param name="ptr">Pointer to byte array of name <see cref="T:System.String"/> of the uniform </param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.SetFrameBufferSizeCallback(System.IntPtr,StgSharp.Graphics.FrameBufferSizeHandler)">
|
||||
<summary>
|
||||
sets the framebuffer resize callback of the specified <see cref="T:StgSharp.Graphics.Form"/>,
|
||||
which is called when the framebuffer of the specified <see cref="T:StgSharp.Graphics.Form"/> is resized.
|
||||
</summary>
|
||||
<param name="id">The only signiture stands for the <see cref="T:StgSharp.Graphics.Form"/> to be controlled</param>
|
||||
<param name="handler">Method hadler </param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.SetVertexAttribute(System.UInt32,System.Int32,System.Type,System.Boolean,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
Set how a shader parameter read data from a VBO.
|
||||
</summary>
|
||||
<param name="index">Serial number of the parameter</param>
|
||||
<param name="size">Amount of data each elements contains</param>
|
||||
<param name="t">Type of data read by shader</param>
|
||||
<param name="normalized"></param>
|
||||
<param name="stride">Pixels stride of each sets of data</param>
|
||||
<param name="pointer"></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.TextureImage2d(System.UInt32,System.Int32,System.UInt32,System.Int32,System.Int32,System.UInt32,System.UInt32,System.Void*)">
|
||||
<summary>
|
||||
Same function as OpenGL api glTexImage2d
|
||||
</summary>
|
||||
<param name="target">texture target to load image in</param>
|
||||
<param name="level">level of mipmap, 0 if default</param>
|
||||
<param name="internalformat">OpenGL's internal color channel format</param>
|
||||
<param name="width">width of image</param>
|
||||
<param name="height">height of image</param>
|
||||
<param name="format">color channels of this image</param>
|
||||
<param name="type">how this image express each pixel</param>
|
||||
<param name="pixels">pointer to data array of pixels</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.TextureParameter(System.UInt32,System.UInt32,System.Int32)">
|
||||
<summary>
|
||||
Same fucntion as OpenGL api glTexParameteri
|
||||
</summary>
|
||||
<param name="target">texture target to set parameters</param>
|
||||
<param name="pname">name of parameter</param>
|
||||
<param name="param">value of parameter</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.UseProgram(System.UInt32)">
|
||||
<summary>
|
||||
Same fucntion as OpenGL api glUseShader.
|
||||
</summary>
|
||||
<param name="program">Sign of program to be used</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.GenTextures(System.Int32,System.UInt32*)">
|
||||
<summary>
|
||||
Same fucnction as OpenGL api glGenTextures.
|
||||
</summary>
|
||||
<param name="count">amount of textures to generate</param>
|
||||
<param name="ptr">pointer to texture signs' array</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.BindTexture(System.UInt32,System.UInt32)">
|
||||
<summary>
|
||||
Same function as OpenGL api, glBindTexture.
|
||||
</summary>
|
||||
<param name="type">Type of texture to bind</param>
|
||||
<param name="texture">Sign of texture</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.ActiveTexture(System.UInt32)">
|
||||
<summary>
|
||||
Same function as OpenGL api glActiveTexture
|
||||
</summary>
|
||||
<param name="type">type of texture to activate</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.Viewport(System.Int32,System.Int32,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
Same function as the OpenGL api, glViewPort
|
||||
</summary>
|
||||
<param name="x"></param>
|
||||
<param name="y"></param>
|
||||
<param name="width"></param>
|
||||
<param name="height"></param>
|
||||
</member>
|
||||
<member name="P:StgSharp.IEntity.CollisionSensor">
|
||||
<summary>
|
||||
@@ -309,6 +464,16 @@
|
||||
Y position of an enemy entity
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:StgSharp.Geometries.Arc">
|
||||
<summary>
|
||||
Part of a circle. All points on a arc has the same distance to their center.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:StgSharp.Geometries.Circle">
|
||||
<summary>
|
||||
A collection of all point on the same plain and has the same distance to a point
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:StgSharp.Geometries.PartialPlainCoordinate.origin">
|
||||
<summary>
|
||||
The origin of this coordinate.
|
||||
@@ -338,6 +503,23 @@
|
||||
<param name="tick">The game tick represent time passed by</param>
|
||||
<returns>A 3d vector representing movement</returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Geometries.Line.MoveBeginPoint(System.UInt32)">
|
||||
<summary>
|
||||
Move begin side of a line.
|
||||
It is recommended to override this function rather than
|
||||
loading an <see cref="T:StgSharp.Geometries.GetLocationHandler"/> with same function.
|
||||
</summary>
|
||||
<param name="tick">Time passed since current line was created.</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Geometries.Line.MoveEndPoint(System.UInt32)">
|
||||
<summary>
|
||||
Move end side of a line.
|
||||
It is recommended to override this function rather than
|
||||
loading an <see cref="T:StgSharp.Geometries.GetLocationHandler"/> with same function.
|
||||
</summary>
|
||||
<param name="tick">Time passed since current line was created.</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Geometries.Parallelogram.MoveVertex2(System.UInt32)">
|
||||
<summary>
|
||||
Move the third vertix. this is a useless method for Parallelograms.
|
||||
@@ -359,6 +541,23 @@
|
||||
平面几何体。包含三角形,对称四边形,自由多边形等。最多可由16个点参数定义。
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:StgSharp.Geometries.PlainGeometry.BornTime">
|
||||
<summary>
|
||||
Tick time this geometry eas crested
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Geometries.PlainGeometry.GetAllSides">
|
||||
<summary>
|
||||
Get all sides of this <see cref="T:StgSharp.Geometries.PlainGeometry"/>.
|
||||
</summary>
|
||||
<returns>A array contains all straight <see cref="T:StgSharp.Geometries.Line"/>s of current geometry item.</returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Geometries.PlainGeometry.GetPlain">
|
||||
<summary>
|
||||
Get a flat <see cref="T:StgSharp.Geometries.Plain"/> cincide with current geometry.
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Geometries.Point.Update(System.UInt32)">
|
||||
<summary>
|
||||
Update the coordinate of the point. If this is a moving point,
|
||||
@@ -379,19 +578,65 @@
|
||||
A square
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:StgSharp.LinkedList`1.IsEmpty">
|
||||
<summary>
|
||||
Whether this linked list has no members or not.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:StgSharp.LinkedList`1.First">
|
||||
<summary>
|
||||
The first memeber of this linkec list.
|
||||
Set value to this property will reset the first node.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:StgSharp.LinkedList`1.Tail">
|
||||
<summary>
|
||||
The last memeber of this linkec list.
|
||||
Set value to this property will reset the first node.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.LinkedList`1.Add(`0)">
|
||||
<summary>
|
||||
Add an item to the tail of linked list.
|
||||
</summary>
|
||||
<param name="t">The item ready to add to the list</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.LinkedList`1.Clear">
|
||||
<summary>
|
||||
Remove all members from this list
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.LinkedList`1.InsertAfter(`0,`0)">
|
||||
<summary>
|
||||
Insert a member to current linkedlist,
|
||||
the new member will be after a certain existed member.
|
||||
</summary>
|
||||
<param name="target">New member will be inserted after this member</param>
|
||||
<param name="newMember">The new member to be inserted</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.LinkedList`1.Remove(`0)">
|
||||
<summary>
|
||||
Remove a member from this linkedlist.
|
||||
</summary>
|
||||
<param name="value">Member to be removed from this list</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.LinkedList`1.RemoveFirst">
|
||||
<summary>
|
||||
remove the first member of the list
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.LinkedList`1.RemoveTail">
|
||||
<summary>
|
||||
remove the last member of the list
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:StgSharp.Math.Vec2d">
|
||||
<summary>
|
||||
A two dimension vector defined by two elements.
|
||||
Vec2Ds in StgSharp are defaultly usaed as colum vector.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.Calc.ASin(System.Single)">
|
||||
<member name="M:StgSharp.Math.Scaler.ASin(System.Single)">
|
||||
<summary>
|
||||
Reurns the value of ArcSin(x)
|
||||
</summary>
|
||||
@@ -399,14 +644,14 @@
|
||||
<returns></returns>
|
||||
<exception cref="T:System.ArgumentException"></exception>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.Calc.Exp(System.Single)">
|
||||
<member name="M:StgSharp.Math.Scaler.Exp(System.Single)">
|
||||
<summary>
|
||||
Get the value of E ^ x;
|
||||
</summary>
|
||||
<param name="x"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.Calc.Log(System.Single)">
|
||||
<member name="M:StgSharp.Math.Scaler.Log(System.Single)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
@@ -415,7 +660,7 @@
|
||||
Returns the value of ln(x).
|
||||
</returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.Calc.Pow(System.Single,System.Single)">
|
||||
<member name="M:StgSharp.Math.Scaler.Pow(System.Single,System.Single)">
|
||||
<summary>
|
||||
calculate the value of x^y
|
||||
</summary>
|
||||
@@ -423,13 +668,19 @@
|
||||
<param name="y"></param>
|
||||
<returns>Returns the value of x^y</returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.Calc.Random">
|
||||
<member name="M:StgSharp.Math.Scaler.Random">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.Scaler.LowProceisionRandom">
|
||||
<summary>
|
||||
returns a random float number between 0 and 1.
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.Calc.RandomSeed">
|
||||
<member name="M:StgSharp.Math.Scaler.RandomSeed">
|
||||
<summary>
|
||||
Generates a random seed in int value.
|
||||
</summary>
|
||||
|
||||
@@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("StgSharp")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+ab85c1a9fe556e53e39ce33690efdd1b4ad28484")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("StgSharp")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharp")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
@@ -1 +1 @@
|
||||
e8b19b35bca753348ef94df4faf984102d2e81946d465d23132400b7d6c8fb6d
|
||||
b38880cab427ff4384d0fea3dec02c59d1d5ebab3deb9283cedea7e2be0c13d3
|
||||
|
||||
@@ -1 +1 @@
|
||||
6de3e4f960d5702a20b1070ed5f43546b6f7cbd8ad4d4a9980f3ff7469954a65
|
||||
04fd394b76052c1382ce478d9e85878535f06255ce0da04c1bfa05a5caccc08c
|
||||
|
||||
Binary file not shown.
@@ -1 +1 @@
|
||||
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/ae804553ce830ceaa07a752049a8a8fee9981ad8/*"}}
|
||||
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/ab85c1a9fe556e53e39ce33690efdd1b4ad28484/*"}}
|
||||
@@ -4,13 +4,7 @@
|
||||
<name>StgSharp</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="M:StgSharp.Control.InitPool">
|
||||
<summary>
|
||||
Add a pool to timeline controller, and return the instance of the pool.
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Control.GetKeyStatus(StgSharp.Graphics.Form,StgSharp.Control.Key)">
|
||||
<member name="M:StgSharp.Operation.GetKeyStatus(StgSharp.Graphics.Form,StgSharp.Operation.Key)">
|
||||
<summary>
|
||||
Get the status of a certain key on the keyboard.
|
||||
</summary>
|
||||
@@ -30,6 +24,27 @@
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:StgSharp.Graphics.Form.Height">
|
||||
<summary>
|
||||
Height of this form, represent in <see cref="T:System.Int32"/>
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:StgSharp.Graphics.Form.Size">
|
||||
<summary>
|
||||
Width of this form, represent in <see cref="T:System.Int32"/>
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:StgSharp.Graphics.Form.GL">
|
||||
<summary>
|
||||
A set of methods providing support for all OpenGL
|
||||
APIs and other methods depend on OpenGL.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.Show(System.Object[])">
|
||||
<summary>
|
||||
Init this form and render it on screen, and respond with operation
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.InitForm(System.Int32,System.Int32,System.String,System.IntPtr,StgSharp.Graphics.Form)">
|
||||
<summary>
|
||||
Constructor of a Form, creats an instance of a form and
|
||||
@@ -38,9 +53,11 @@
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.MakeAsCurrentContext">
|
||||
<summary>
|
||||
|
||||
Init an OpenGl context if current form has not been binded to any context.
|
||||
and set the context binded to current form as current OpenGL context.
|
||||
</summary>
|
||||
<exception cref="T:System.Exception"></exception>
|
||||
<exception cref="T:System.Exception">Something goes wrong and
|
||||
StgSharp fails in creating a new OpenGL context. </exception>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.SetSize(System.Int32,System.Int32)">
|
||||
<summary>
|
||||
@@ -77,6 +94,11 @@
|
||||
Maximum size of current form. In form of a <see cref="T:StgSharp.Math.Vec2d"/> of (width,height)
|
||||
</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.BindToPlatform">
|
||||
<summary>
|
||||
Bind this form to StgSharp platform.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.Texture.LoadTexture(System.Int32,System.String,StgSharp.Graphics.ImageLoader)">
|
||||
<summary>
|
||||
|
||||
@@ -92,137 +114,21 @@
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.VertexBuffer.SetValue``1(System.Int32,``0,StgSharp.Graphics.BufferUsage)">
|
||||
<summary>
|
||||
|
||||
Set data to current vertex buffer object
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="bufferData"></param>
|
||||
<param name="readType"></param>
|
||||
<typeparam name="T">Type of bufferData</typeparam>
|
||||
<param name="index">Index to find certain VBO in this instance</param>
|
||||
<param name="bufferData">Data to write in</param>
|
||||
<param name="usage">How OpenGL use these data, defined by <see cref="T:StgSharp.Graphics.BufferUsage"/></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.GLfunc.ClearColor(System.Single,System.Single,System.Single,System.Single)">
|
||||
<member name="M:StgSharp.Graphics.Form.VertexBuffer.SetValueArray``1(System.Int32,``0[],StgSharp.Graphics.BufferUsage)">
|
||||
<summary>
|
||||
Call apiClearColor in OpenGL
|
||||
specifies the red, green, blue, and alpha values used by apiClear to clear the color buffers.
|
||||
Values specified by apiClearColor are clamped to the range [0,1]
|
||||
Set data to current vertex buffer object
|
||||
</summary>
|
||||
<param name="R">Specify the red values used when the color buffers are cleared.</param>
|
||||
<param name="G">Specify the red values used when the color buffers are cleared.</param>
|
||||
<param name="B">Specify the red values used when the color buffers are cleared.</param>
|
||||
<param name="A">Specify the red values used when the color buffers are cleared.</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.GLfunc.BindBuffer(StgSharp.Graphics.BufferType,System.UInt32)">
|
||||
<summary>
|
||||
Bind the indexed buffer object to certain type of buffer
|
||||
</summary>
|
||||
<param name="bufferType"></param>
|
||||
<param name="index"></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.GLfunc.Clear(StgSharp.Graphics.MaskBufferBit)">
|
||||
<summary>
|
||||
Clear buffers to preset values
|
||||
</summary>
|
||||
<param name="mask"></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.GLfunc.CompileShader(System.String,StgSharp.Graphics.ShaderType)">
|
||||
<summary>
|
||||
Conpile the provided shader code in string form.
|
||||
</summary>
|
||||
<param name="shaderCode">A string represent the shader's code</param>
|
||||
<param name="shaderType">An <see cref="T:StgSharp.Graphics.ShaderType"/> enum represent the type of the shader to
|
||||
conpile, including vertex shader and fragment shader.</param>
|
||||
<returns>An uint value as the only mark of conpiled shader</returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.GLfunc.CreateWindowHandle(System.Int32,System.Int32,System.String,System.IntPtr,StgSharp.Graphics.Form)">
|
||||
<summary>
|
||||
Creates a form and its associated
|
||||
</summary>
|
||||
<param name="width">Required width</param>
|
||||
<param name="height">Required width</param>
|
||||
<param name="tittle">Tittle of the window </param>
|
||||
<param name="monitor"></param>
|
||||
<param name="share"></param>
|
||||
<returns>The instance of created form</returns>
|
||||
<exception cref="T:System.Exception"></exception>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.GLfunc.SetFrameBufferSizeCallback(System.IntPtr,StgSharp.Graphics.FrameBufferSizeHandler)">
|
||||
<summary>
|
||||
sets the framebuffer resize callback of the specified <see cref="T:StgSharp.Graphics.Form"/>,
|
||||
which is called when the framebuffer of the specified <see cref="T:StgSharp.Graphics.Form"/> is resized.
|
||||
</summary>
|
||||
<param name="id">The only signiture stands for the <see cref="T:StgSharp.Graphics.Form"/> to be controlled</param>
|
||||
<param name="handler">Method hadler </param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.GLfunc.SetVertexAttribute(System.UInt32,System.Int32,System.Type,System.Boolean,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
Set how a shader parameter read data from a VBO.
|
||||
</summary>
|
||||
<param name="index">Serial number of the parameter</param>
|
||||
<param name="size">Amount of data each elements contains</param>
|
||||
<param name="t">Type of data read by shader</param>
|
||||
<param name="normalized"></param>
|
||||
<param name="stride">Pixels stride of each sets of data</param>
|
||||
<param name="pointer"></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.GLfunc.SetValue(StgSharp.Graphics.Form.Uniform{System.Single},System.Single)">
|
||||
<summary>
|
||||
Set data value to a float <see cref="T:StgSharp.Graphics.Form.Uniform`1"/>,
|
||||
all types of parameters are float.
|
||||
</summary>
|
||||
<param name="uniform">The <see cref="T:StgSharp.Graphics.Form.Uniform`1"/> target</param>
|
||||
<param name="v0">The value to be set</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.GLfunc.SetValue(StgSharp.Graphics.Form.Uniform{System.Int32},System.Int32)">
|
||||
<summary>
|
||||
Set data value to a int <see cref="T:StgSharp.Graphics.Form.Uniform`1"/>,
|
||||
all types of parameters are int.
|
||||
</summary>
|
||||
<param name="uniform">The <see cref="T:StgSharp.Graphics.Form.Uniform`1"/> target</param>
|
||||
<param name="i0">The value to be set</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.GLfunc.SetValue(StgSharp.Graphics.Form.Uniform{System.Single,System.Single},System.Single,System.Single)">
|
||||
<summary>
|
||||
Set data value to a float <see cref="T:StgSharp.Graphics.Form.Uniform`2"/>,
|
||||
all types of parameters are float.
|
||||
</summary>
|
||||
<param name="uniform">The <see cref="T:StgSharp.Graphics.Form.Uniform`2"/> target</param>
|
||||
<param name="v0">The first value to be set</param>
|
||||
<param name="v1">The second value to be set</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.GLfunc.SetValue(StgSharp.Graphics.Form.Uniform{System.Single,System.Single,System.Single},System.Single,System.Single,System.Single)">
|
||||
<summary>
|
||||
Set data value to a float <see cref="T:StgSharp.Graphics.Form.Uniform`3"/>,
|
||||
all types of parameters are float.
|
||||
</summary>
|
||||
<param name="uniform">The <see cref="T:StgSharp.Graphics.Form.Uniform`3"/> target</param>
|
||||
<param name="v0">The first value to be set</param>
|
||||
<param name="v1">The second value to be set</param>
|
||||
<param name="v2">The third value to be set</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.GLfunc.SetValue(StgSharp.Graphics.Form.Uniform{System.Single,System.Single,System.Single,System.Single},System.Single,System.Single,System.Single,System.Single)">
|
||||
<summary>
|
||||
Set data value to a float <see cref="T:StgSharp.Graphics.Form.Uniform`4"/>,
|
||||
all types of parameters are float.
|
||||
</summary>
|
||||
<param name="uniform">The <see cref="T:StgSharp.Graphics.Form.Uniform`4"/> target</param>
|
||||
<param name="v0">The first value to be set</param>
|
||||
<param name="v1">The second value to be set</param>
|
||||
<param name="v2">The third value to be set</param>
|
||||
<param name="v3">The forth value to be set</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.GLfunc.SetValue(StgSharp.Graphics.Form.Uniform{System.Single,System.Single,System.Single,System.Single},StgSharp.Math.Vec4d)">
|
||||
<summary>
|
||||
Set data value to a float <see cref="T:StgSharp.Graphics.Form.Uniform`4"/>,
|
||||
all types of parameters are float.
|
||||
</summary>
|
||||
<param name="uniform">The <see cref="T:StgSharp.Graphics.Form.Uniform`4"/> target</param>
|
||||
<param name="vec">A <see cref="T:StgSharp.Math.Vec4d"/> packing four parameters of the uniform </param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.GLfunc.SetValue(StgSharp.Graphics.Form.Uniform{StgSharp.Math.Vec4d},StgSharp.Math.Vec4d)">
|
||||
<summary>
|
||||
Set data value to a float <see cref="T:StgSharp.Graphics.Form.Uniform`1"/>,
|
||||
all types of parameters are <see cref="T:StgSharp.Math.Vec4d"/>.
|
||||
</summary>
|
||||
<param name="uniform">The <see cref="T:StgSharp.Graphics.Form.Uniform`1"/> target</param>
|
||||
<param name="vec">A <see cref="T:StgSharp.Math.Vec4d"/> value of the uniform </param>
|
||||
<typeparam name="T">Type of bufferData</typeparam>
|
||||
<param name="index">Index to find certain VBO in this instance</param>
|
||||
<param name="bufferArray">A array of data to write in</param>
|
||||
<param name="usage">How OpenGL use these data, defined by <see cref="T:StgSharp.Graphics.BufferUsage"/></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.CreateShader">
|
||||
<summary>
|
||||
@@ -235,7 +141,7 @@
|
||||
A <see cref="T:System.UInt32"/> value represent this shader.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.Shader.#ctor(StgSharp.Graphics.Form.GLfunc)">
|
||||
<member name="M:StgSharp.Graphics.Form.Shader.#ctor(StgSharp.Graphics.IglFunc)">
|
||||
<summary>
|
||||
Inti a shader with no program attached.
|
||||
</summary>
|
||||
@@ -270,6 +176,23 @@
|
||||
Let the current context use this shader.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:StgSharp.Graphics.FrameTimer">
|
||||
<summary>
|
||||
A timer counting frames after its construction.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:StgSharp.Graphics.FrameTimer.Time">
|
||||
<summary>
|
||||
Frames after this timer created.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.FrameTimer.op_Implicit(StgSharp.Graphics.FrameTimer)~System.UInt32">
|
||||
<summary>
|
||||
Convert a <see cref="T:StgSharp.Graphics.FrameTimer"/> into uint value.
|
||||
this will get total frames since the timer was created.
|
||||
</summary>
|
||||
<param name="timer"><see cref="T:StgSharp.Graphics.FrameTimer"/> to be converted</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.glManager.LoadGLapi(StgSharp.Graphics.Form,StgSharp.Graphics.GLfuncLoader)">
|
||||
<summary>
|
||||
Load all aupportable OpenGL APIs and bind them to given <see cref="T:StgSharp.Graphics.Form"/> context.
|
||||
@@ -284,10 +207,242 @@
|
||||
<param name="name">Name of the OpenGL api</param>
|
||||
<returns>The funtion pointer of the api in form of <see cref="T:System.IntPtr"/></returns>
|
||||
</member>
|
||||
<member name="F:StgSharp.Controlling.TimeLine.tickCounter">
|
||||
<member name="M:StgSharp.Graphics.GLonRender.StgSharp#Graphics#IglFunc#SetValue(StgSharp.Graphics.Uniform{System.Single},System.Single)">
|
||||
<summary>
|
||||
Tick counter count the frames passed since the program start.
|
||||
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`1"/>,
|
||||
all types of parameters are float.
|
||||
</summary>
|
||||
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`1"/> target</param>
|
||||
<param name="v0">The value to be set</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.GLonRender.StgSharp#Graphics#IglFunc#SetValue(StgSharp.Graphics.Uniform{System.Int32},System.Int32)">
|
||||
<summary>
|
||||
Set data value to a int <see cref="T:StgSharp.Graphics.Uniform`1"/>,
|
||||
all types of parameters are int.
|
||||
</summary>
|
||||
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`1"/> target</param>
|
||||
<param name="i0">The value to be set</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.GLonRender.StgSharp#Graphics#IglFunc#SetValue(StgSharp.Graphics.Uniform{System.Single,System.Single},System.Single,System.Single)">
|
||||
<summary>
|
||||
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`2"/>,
|
||||
all types of parameters are float.
|
||||
</summary>
|
||||
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`2"/> target</param>
|
||||
<param name="v0">The first value to be set</param>
|
||||
<param name="v1">The second value to be set</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.GLonRender.StgSharp#Graphics#IglFunc#SetValue(StgSharp.Graphics.Uniform{System.Single,System.Single,System.Single},System.Single,System.Single,System.Single)">
|
||||
<summary>
|
||||
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`3"/>,
|
||||
all types of parameters are float.
|
||||
</summary>
|
||||
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`3"/> target</param>
|
||||
<param name="v0">The first value to be set</param>
|
||||
<param name="v1">The second value to be set</param>
|
||||
<param name="v2">The third value to be set</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.GLonRender.StgSharp#Graphics#IglFunc#SetValue(StgSharp.Graphics.Uniform{System.Single,System.Single,System.Single,System.Single},System.Single,System.Single,System.Single,System.Single)">
|
||||
<summary>
|
||||
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`4"/>,
|
||||
all types of parameters are float.
|
||||
</summary>
|
||||
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`4"/> target</param>
|
||||
<param name="v0">The first value to be set</param>
|
||||
<param name="v1">The second value to be set</param>
|
||||
<param name="v2">The third value to be set</param>
|
||||
<param name="v3">The forth value to be set</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.GLonRender.SetValue(StgSharp.Graphics.Uniform{System.Single,System.Single,System.Single,System.Single},StgSharp.Math.Vec4d)">
|
||||
<summary>
|
||||
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`4"/>,
|
||||
all types of parameters are float.
|
||||
</summary>
|
||||
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`4"/> target</param>
|
||||
<param name="vec">A <see cref="T:StgSharp.Math.Vec4d"/> packing four parameters of the uniform </param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.GLonRender.SetValue(StgSharp.Graphics.Uniform{StgSharp.Math.Vec4d},StgSharp.Math.Vec4d)">
|
||||
<summary>
|
||||
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`1"/>,
|
||||
all types of parameters are <see cref="T:StgSharp.Math.Vec4d"/>.
|
||||
</summary>
|
||||
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`1"/> target</param>
|
||||
<param name="vec">A <see cref="T:StgSharp.Math.Vec4d"/> value of the uniform </param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.AttachShader(System.UInt32,System.UInt32)">
|
||||
<summary>
|
||||
Same fucntion as OpenGL api glAttachShader
|
||||
</summary>
|
||||
<param name="program">Shader program to be attachec</param>
|
||||
<param name="shader">A shader part to attach</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.BindBuffer(StgSharp.Graphics.BufferType,System.UInt32)">
|
||||
<summary>
|
||||
Bind the indexed buffer object to certain type of buffer
|
||||
</summary>
|
||||
<param name="bufferType"></param>
|
||||
<param name="index"></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.BindVertexArray(System.UInt32)">
|
||||
<summary>
|
||||
Same function as OpenGL api, glBindVertexArray
|
||||
</summary>
|
||||
<param name="index"></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.Clear(StgSharp.Graphics.MaskBufferBit)">
|
||||
<summary>
|
||||
Clear buffers to preset values
|
||||
</summary>
|
||||
<param name="mask"></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.ClearColor(System.Single,System.Single,System.Single,System.Single)">
|
||||
<summary>
|
||||
Call apiClearColor in OpenGL
|
||||
specifies the red, green, blue, and alpha values used by apiClear to clear the color buffers.
|
||||
Values specified by apiClearColor are clamped to the range [0,1]
|
||||
</summary>
|
||||
<param name="R">Specify the red values used when the color buffers are cleared.</param>
|
||||
<param name="G">Specify the red values used when the color buffers are cleared.</param>
|
||||
<param name="B">Specify the red values used when the color buffers are cleared.</param>
|
||||
<param name="A">Specify the red values used when the color buffers are cleared.</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.CompileShader(System.String,StgSharp.Graphics.ShaderType)">
|
||||
<summary>
|
||||
Conpile the provided shader code in string form.
|
||||
</summary>
|
||||
<param name="shaderCode">A string represent the shader's code</param>
|
||||
<param name="shaderType">An <see cref="T:StgSharp.Graphics.ShaderType"/> enum represent the type of the shader to
|
||||
conpile, including vertex shader and fragment shader.</param>
|
||||
<returns>An uint value as the only mark of conpiled shader</returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.CreateProgram">
|
||||
<summary>
|
||||
Same function as OpenGL api, glCreateProgram
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.CreateWindowHandle(System.Int32,System.Int32,System.String,System.IntPtr,StgSharp.Graphics.Form)">
|
||||
<summary>
|
||||
Creates a form and its associated
|
||||
</summary>
|
||||
<param name="width">Required width</param>
|
||||
<param name="height">Required width</param>
|
||||
<param name="tittle">Tittle of the window </param>
|
||||
<param name="monitor"></param>
|
||||
<param name="share"></param>
|
||||
<returns>The instance of created form</returns>
|
||||
<exception cref="T:System.Exception"></exception>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.DeleteBuffers(System.Int32,System.UInt32*)">
|
||||
<summary>
|
||||
Same function as OpenGL api, glDeleteBuffer.
|
||||
</summary>
|
||||
<param name="count">Amount of bufferd to be deleted</param>
|
||||
<param name="ptr">Pointer of buffer to be deleted</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.DeleteVertexArrays(System.Int32,System.UInt32*)">
|
||||
<summary>
|
||||
Same function as OpenGL api, glDeleteVertexArrays
|
||||
</summary>
|
||||
<param name="count">Amount of vao to be deleted</param>
|
||||
<param name="ptr">pointer of vao sign array</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.GenBuffers(System.Int32,System.UInt32*)">
|
||||
<summary>
|
||||
Same fucntion as the OpenGL api glGenBuffers
|
||||
</summary>
|
||||
<param name="count"></param>
|
||||
<param name="ptr"></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.GenVertexArrays(System.Int32,System.UInt32*)">
|
||||
<summary>
|
||||
Same fucntion as OpenGL api, glGenVertexArray
|
||||
</summary>
|
||||
<param name="count">Amount of vao to be generated</param>
|
||||
<param name="ptr">Pointer of vao sign array</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.GetUniformLocation(System.UInt32,System.Byte*)">
|
||||
<summary>
|
||||
Same fucntion as OpenGL api, glGetUniformLocation
|
||||
</summary>
|
||||
<param name="program">Shader program to find the uniform</param>
|
||||
<param name="ptr">Pointer to byte array of name <see cref="T:System.String"/> of the uniform </param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.SetFrameBufferSizeCallback(System.IntPtr,StgSharp.Graphics.FrameBufferSizeHandler)">
|
||||
<summary>
|
||||
sets the framebuffer resize callback of the specified <see cref="T:StgSharp.Graphics.Form"/>,
|
||||
which is called when the framebuffer of the specified <see cref="T:StgSharp.Graphics.Form"/> is resized.
|
||||
</summary>
|
||||
<param name="id">The only signiture stands for the <see cref="T:StgSharp.Graphics.Form"/> to be controlled</param>
|
||||
<param name="handler">Method hadler </param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.SetVertexAttribute(System.UInt32,System.Int32,System.Type,System.Boolean,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
Set how a shader parameter read data from a VBO.
|
||||
</summary>
|
||||
<param name="index">Serial number of the parameter</param>
|
||||
<param name="size">Amount of data each elements contains</param>
|
||||
<param name="t">Type of data read by shader</param>
|
||||
<param name="normalized"></param>
|
||||
<param name="stride">Pixels stride of each sets of data</param>
|
||||
<param name="pointer"></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.TextureImage2d(System.UInt32,System.Int32,System.UInt32,System.Int32,System.Int32,System.UInt32,System.UInt32,System.Void*)">
|
||||
<summary>
|
||||
Same function as OpenGL api glTexImage2d
|
||||
</summary>
|
||||
<param name="target">texture target to load image in</param>
|
||||
<param name="level">level of mipmap, 0 if default</param>
|
||||
<param name="internalformat">OpenGL's internal color channel format</param>
|
||||
<param name="width">width of image</param>
|
||||
<param name="height">height of image</param>
|
||||
<param name="format">color channels of this image</param>
|
||||
<param name="type">how this image express each pixel</param>
|
||||
<param name="pixels">pointer to data array of pixels</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.TextureParameter(System.UInt32,System.UInt32,System.Int32)">
|
||||
<summary>
|
||||
Same fucntion as OpenGL api glTexParameteri
|
||||
</summary>
|
||||
<param name="target">texture target to set parameters</param>
|
||||
<param name="pname">name of parameter</param>
|
||||
<param name="param">value of parameter</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.UseProgram(System.UInt32)">
|
||||
<summary>
|
||||
Same fucntion as OpenGL api glUseShader.
|
||||
</summary>
|
||||
<param name="program">Sign of program to be used</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.GenTextures(System.Int32,System.UInt32*)">
|
||||
<summary>
|
||||
Same fucnction as OpenGL api glGenTextures.
|
||||
</summary>
|
||||
<param name="count">amount of textures to generate</param>
|
||||
<param name="ptr">pointer to texture signs' array</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.BindTexture(System.UInt32,System.UInt32)">
|
||||
<summary>
|
||||
Same function as OpenGL api, glBindTexture.
|
||||
</summary>
|
||||
<param name="type">Type of texture to bind</param>
|
||||
<param name="texture">Sign of texture</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.ActiveTexture(System.UInt32)">
|
||||
<summary>
|
||||
Same function as OpenGL api glActiveTexture
|
||||
</summary>
|
||||
<param name="type">type of texture to activate</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.Viewport(System.Int32,System.Int32,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
Same function as the OpenGL api, glViewPort
|
||||
</summary>
|
||||
<param name="x"></param>
|
||||
<param name="y"></param>
|
||||
<param name="width"></param>
|
||||
<param name="height"></param>
|
||||
</member>
|
||||
<member name="P:StgSharp.IEntity.CollisionSensor">
|
||||
<summary>
|
||||
@@ -309,6 +464,16 @@
|
||||
Y position of an enemy entity
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:StgSharp.Geometries.Arc">
|
||||
<summary>
|
||||
Part of a circle. All points on a arc has the same distance to their center.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:StgSharp.Geometries.Circle">
|
||||
<summary>
|
||||
A collection of all point on the same plain and has the same distance to a point
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:StgSharp.Geometries.PartialPlainCoordinate.origin">
|
||||
<summary>
|
||||
The origin of this coordinate.
|
||||
@@ -338,6 +503,23 @@
|
||||
<param name="tick">The game tick represent time passed by</param>
|
||||
<returns>A 3d vector representing movement</returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Geometries.Line.MoveBeginPoint(System.UInt32)">
|
||||
<summary>
|
||||
Move begin side of a line.
|
||||
It is recommended to override this function rather than
|
||||
loading an <see cref="T:StgSharp.Geometries.GetLocationHandler"/> with same function.
|
||||
</summary>
|
||||
<param name="tick">Time passed since current line was created.</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Geometries.Line.MoveEndPoint(System.UInt32)">
|
||||
<summary>
|
||||
Move end side of a line.
|
||||
It is recommended to override this function rather than
|
||||
loading an <see cref="T:StgSharp.Geometries.GetLocationHandler"/> with same function.
|
||||
</summary>
|
||||
<param name="tick">Time passed since current line was created.</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Geometries.Parallelogram.MoveVertex2(System.UInt32)">
|
||||
<summary>
|
||||
Move the third vertix. this is a useless method for Parallelograms.
|
||||
@@ -359,6 +541,23 @@
|
||||
平面几何体。包含三角形,对称四边形,自由多边形等。最多可由16个点参数定义。
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:StgSharp.Geometries.PlainGeometry.BornTime">
|
||||
<summary>
|
||||
Tick time this geometry eas crested
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Geometries.PlainGeometry.GetAllSides">
|
||||
<summary>
|
||||
Get all sides of this <see cref="T:StgSharp.Geometries.PlainGeometry"/>.
|
||||
</summary>
|
||||
<returns>A array contains all straight <see cref="T:StgSharp.Geometries.Line"/>s of current geometry item.</returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Geometries.PlainGeometry.GetPlain">
|
||||
<summary>
|
||||
Get a flat <see cref="T:StgSharp.Geometries.Plain"/> cincide with current geometry.
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Geometries.Point.Update(System.UInt32)">
|
||||
<summary>
|
||||
Update the coordinate of the point. If this is a moving point,
|
||||
@@ -379,19 +578,65 @@
|
||||
A square
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:StgSharp.LinkedList`1.IsEmpty">
|
||||
<summary>
|
||||
Whether this linked list has no members or not.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:StgSharp.LinkedList`1.First">
|
||||
<summary>
|
||||
The first memeber of this linkec list.
|
||||
Set value to this property will reset the first node.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:StgSharp.LinkedList`1.Tail">
|
||||
<summary>
|
||||
The last memeber of this linkec list.
|
||||
Set value to this property will reset the first node.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.LinkedList`1.Add(`0)">
|
||||
<summary>
|
||||
Add an item to the tail of linked list.
|
||||
</summary>
|
||||
<param name="t">The item ready to add to the list</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.LinkedList`1.Clear">
|
||||
<summary>
|
||||
Remove all members from this list
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.LinkedList`1.InsertAfter(`0,`0)">
|
||||
<summary>
|
||||
Insert a member to current linkedlist,
|
||||
the new member will be after a certain existed member.
|
||||
</summary>
|
||||
<param name="target">New member will be inserted after this member</param>
|
||||
<param name="newMember">The new member to be inserted</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.LinkedList`1.Remove(`0)">
|
||||
<summary>
|
||||
Remove a member from this linkedlist.
|
||||
</summary>
|
||||
<param name="value">Member to be removed from this list</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.LinkedList`1.RemoveFirst">
|
||||
<summary>
|
||||
remove the first member of the list
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.LinkedList`1.RemoveTail">
|
||||
<summary>
|
||||
remove the last member of the list
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:StgSharp.Math.Vec2d">
|
||||
<summary>
|
||||
A two dimension vector defined by two elements.
|
||||
Vec2Ds in StgSharp are defaultly usaed as colum vector.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.Calc.ASin(System.Single)">
|
||||
<member name="M:StgSharp.Math.Scaler.ASin(System.Single)">
|
||||
<summary>
|
||||
Reurns the value of ArcSin(x)
|
||||
</summary>
|
||||
@@ -399,14 +644,14 @@
|
||||
<returns></returns>
|
||||
<exception cref="T:System.ArgumentException"></exception>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.Calc.Exp(System.Single)">
|
||||
<member name="M:StgSharp.Math.Scaler.Exp(System.Single)">
|
||||
<summary>
|
||||
Get the value of E ^ x;
|
||||
</summary>
|
||||
<param name="x"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.Calc.Log(System.Single)">
|
||||
<member name="M:StgSharp.Math.Scaler.Log(System.Single)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
@@ -415,7 +660,7 @@
|
||||
Returns the value of ln(x).
|
||||
</returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.Calc.Pow(System.Single,System.Single)">
|
||||
<member name="M:StgSharp.Math.Scaler.Pow(System.Single,System.Single)">
|
||||
<summary>
|
||||
calculate the value of x^y
|
||||
</summary>
|
||||
@@ -423,13 +668,19 @@
|
||||
<param name="y"></param>
|
||||
<returns>Returns the value of x^y</returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.Calc.Random">
|
||||
<member name="M:StgSharp.Math.Scaler.Random">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.Scaler.LowProceisionRandom">
|
||||
<summary>
|
||||
returns a random float number between 0 and 1.
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.Calc.RandomSeed">
|
||||
<member name="M:StgSharp.Math.Scaler.RandomSeed">
|
||||
<summary>
|
||||
Generates a random seed in int value.
|
||||
</summary>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user