daily uodate on 20240411 by nitload youmu, camera complete
This commit is contained in:
@@ -65,7 +65,7 @@ namespace StgSharp
|
||||
/// <summary>
|
||||
/// A 2D vector presenting the position of an enemy entity, position can also be visited by X, Y
|
||||
/// </summary>
|
||||
public Vec2d Location { get; }
|
||||
public vec2d Location { get; }
|
||||
|
||||
public string Texture { get; set; }
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace StgSharp
|
||||
*用于发射其他的实体,主要是子弹 和 掉落物
|
||||
*/
|
||||
|
||||
internal Vec2d _center; //发射器的参考位置,运动轨迹的方程应当基于这个参考点构建
|
||||
internal vec2d _center; //发射器的参考位置,运动轨迹的方程应当基于这个参考点构建
|
||||
internal Counter<int> _internalParameter; //发射器的内部计时器
|
||||
internal uint[] launchtick; //发射子弹的内部计时
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace StgSharp.Geometries
|
||||
public vec3d axis_V => axis.colum1;
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public vec3d GetRealLocate(Vec2d raletiveLocation)
|
||||
public vec3d GetRealLocate(vec2d raletiveLocation)
|
||||
{
|
||||
return origin + axis.VerticalVecMultiply(raletiveLocation);
|
||||
}
|
||||
|
||||
@@ -50,10 +50,10 @@ namespace StgSharp.Geometries
|
||||
}
|
||||
|
||||
public Polygon4(PartialPlainCoordinate coordinate,
|
||||
Vec2d topLeft,
|
||||
Vec2d topRight,
|
||||
Vec2d bottomRight,
|
||||
Vec2d bottomLeft,
|
||||
vec2d topLeft,
|
||||
vec2d topRight,
|
||||
vec2d bottomRight,
|
||||
vec2d bottomLeft,
|
||||
bool Orth
|
||||
)
|
||||
{
|
||||
@@ -76,8 +76,8 @@ namespace StgSharp.Geometries
|
||||
|
||||
textureFrame.mat.colum1 = maxCoord;
|
||||
textureFrame.mat.colum3 = minCoord;
|
||||
textureFrame.Colum0 = new Vec2d(minCoord.X, maxCoord.Y);
|
||||
textureFrame.Colum2 = new Vec2d(maxCoord.X, minCoord.Y);
|
||||
textureFrame.Colum0 = new vec2d(minCoord.X, maxCoord.Y);
|
||||
textureFrame.Colum2 = new vec2d(maxCoord.X, minCoord.Y);
|
||||
}
|
||||
|
||||
public Polygon4(
|
||||
@@ -93,10 +93,10 @@ namespace StgSharp.Geometries
|
||||
vertexMat.mat.colum3 = new Vector4(v3x, v3y, v3z, 0);
|
||||
}
|
||||
|
||||
public GetLocationHandler MovVertex0Operaion => moveVertex0Operation;
|
||||
public GetLocationHandler MovVertex1Operaion => moveVertex1Operation;
|
||||
public GetLocationHandler MovVertex2Operaion => moveVertex2Operation;
|
||||
public GetLocationHandler MovVertex3Operaion => moveVertex3Operation;
|
||||
public GetLocationHandler MovVertex0Operation => moveVertex0Operation;
|
||||
public GetLocationHandler MovVertex1Operation => moveVertex1Operation;
|
||||
public GetLocationHandler MovVertex2Operation => moveVertex2Operation;
|
||||
public GetLocationHandler MovVertex3Operation => moveVertex3Operation;
|
||||
|
||||
public Point Vertex0
|
||||
{
|
||||
|
||||
@@ -49,8 +49,8 @@ namespace StgSharp.Geometries
|
||||
v3x, v2y, v3z
|
||||
)
|
||||
{
|
||||
Vec2d side0 = vertexMat.Colum0 - vertexMat.Colum1;
|
||||
Vec2d side1 = vertexMat.Colum2 - vertexMat.Colum1;
|
||||
vec2d side0 = vertexMat.Colum0 - vertexMat.Colum1;
|
||||
vec2d side1 = vertexMat.Colum2 - vertexMat.Colum1;
|
||||
if (side0.Cross(side1) == 0)
|
||||
{
|
||||
|
||||
|
||||
@@ -76,8 +76,8 @@ namespace StgSharp.Graphics
|
||||
{
|
||||
Interlocked.Exchange(ref _frameSpeed, _frameCount);
|
||||
Interlocked.Exchange(ref _frameCount, 0);
|
||||
Console.Clear();
|
||||
Console.WriteLine(_frameSpeed);
|
||||
//Console.Clear();
|
||||
//Console.WriteLine(_frameSpeed);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -102,9 +102,9 @@ namespace StgSharp.Graphics
|
||||
/// <summary>
|
||||
/// Width of this form, represent in <see cref="int"/>
|
||||
/// </summary>
|
||||
public Vec2d Size
|
||||
public vec2d Size
|
||||
{
|
||||
get => new Vec2d(width, height);
|
||||
get => new vec2d(width, height);
|
||||
set
|
||||
{
|
||||
width = (int)value.X;
|
||||
@@ -204,10 +204,10 @@ namespace StgSharp.Graphics
|
||||
/// Resize the current form
|
||||
/// </summary>
|
||||
/// <param name="size">
|
||||
/// A <see cref="Vec2d"/> (width,height) representing the new size of current form
|
||||
/// A <see cref="vec2d"/> (width,height) representing the new size of current form
|
||||
/// </param>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void SetSize(Vec2d size)
|
||||
public void SetSize(vec2d size)
|
||||
{
|
||||
this.Size = size;
|
||||
InternalIO.glfwSetWindowSize(this.windowID, (int)size.X, (int)size.Y);
|
||||
@@ -231,13 +231,13 @@ namespace StgSharp.Graphics
|
||||
/// Set the size limit of current form
|
||||
/// </summary>
|
||||
/// <param name="minSize">
|
||||
/// Minimun size of current form. In form of a <see cref="Vec2d"/> of (width,height)
|
||||
/// Minimun size of current form. In form of a <see cref="vec2d"/> of (width,height)
|
||||
/// </param>
|
||||
/// <param name="maxSize">
|
||||
/// Maximum size of current form. In form of a <see cref="Vec2d"/> of (width,height)
|
||||
/// Maximum size of current form. In form of a <see cref="vec2d"/> of (width,height)
|
||||
/// </param>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void SetSizeLimit(Vec2d minSize, Vec2d maxSize)
|
||||
public void SetSizeLimit(vec2d minSize, vec2d maxSize)
|
||||
{
|
||||
InternalIO.glfwSetWindowSizeLimits(
|
||||
this.windowID,
|
||||
|
||||
@@ -39,7 +39,7 @@ using System.Text;
|
||||
namespace StgSharp.Graphics
|
||||
{
|
||||
/// <summary>
|
||||
/// A collecion of handle to Element Buffer Object in OpenGL.
|
||||
/// A collection of handle to Element Buffer Object in OpenGL.
|
||||
/// Each <see langword="uint"/> value indexed from instance of this class this
|
||||
/// is the only handle to one Element Buffer Object.
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StgSharp.Graphics
|
||||
{
|
||||
public enum FrameBufferTarget:uint
|
||||
{
|
||||
Read = GLconst.READ_FRAMEBUFFER,
|
||||
All = GLconst.FRAMEBUFFER,
|
||||
Draw = GLconst.DRAW_FRAMEBUFFER,
|
||||
}
|
||||
|
||||
public class FrameBuffer : BufferObjectBase
|
||||
{
|
||||
internal unsafe FrameBuffer(int count, IntPtr contextBinding)
|
||||
{
|
||||
binding = contextBinding;
|
||||
_bufferHandle = new glHandleSet(count);
|
||||
((GLcontext*)binding)->glGenFramebuffers((uint)count,_bufferHandle.handle);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Bind the frame buffer object with name frame buffer to the frame buffer target specified by target.
|
||||
/// <see langword="FrameBufferTarget.All"/> will be set as default target.
|
||||
/// </summary>
|
||||
/// <param name="index">Index of object to be binded in handle set</param>
|
||||
public unsafe override void Bind(int index)
|
||||
{
|
||||
((GLcontext*)binding)->glBindFramebuffer(GLconst.FRAMEBUFFER, _bufferHandle[index].Value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Bind the frame buffer object with name frame buffer to the frame buffer target specified by target.
|
||||
/// Target of this frame buffer should be set manually.
|
||||
/// </summary>
|
||||
/// <param name="target">The frame buffer target of the binding operation.</param>
|
||||
/// <param name="index">Index of object to be binded in handle set</param>
|
||||
public unsafe void Bind(FrameBufferTarget target, int index)
|
||||
{
|
||||
((GLcontext*)binding)->glBindFramebuffer((uint)target, _bufferHandle[index].Value);
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -68,6 +68,18 @@ namespace StgSharp.Graphics
|
||||
api->glBindTexture(type, texture.Value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Bind a frame buffer to a frame buffer target
|
||||
/// Same function as <see href="https://docs.gl/gl3/glBindFramebuffer">glBindFramebuffer</see>.
|
||||
/// </summary>
|
||||
/// <param name="target"> The frame buffer target of the binding operation.</param>
|
||||
/// <param name="handle"> The handle of the frame buffer object to bind.</param>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static void BindFrameBuffer(FrameBufferTarget target, glHandle handle)
|
||||
{
|
||||
api->glBindFramebuffer((uint)target,handle.Value);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static void BindVertexArray(glHandle handle)
|
||||
{
|
||||
|
||||
@@ -203,7 +203,7 @@ namespace StgSharp.Graphics
|
||||
public unsafe static void SetValue(Uniform<Matrix44> uniform, Matrix44 mat)
|
||||
{
|
||||
Matrix44 temp = mat;
|
||||
api->glUniformMatrix4fv(uniform.Handle.Value, 16, false, (float*)&mat);
|
||||
api->glUniformMatrix4fv(uniform.id.Value, 1, false, (float*)&mat);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
||||
@@ -43,30 +43,31 @@ namespace StgSharp.Graphic
|
||||
public sealed class Camera : IglConvertable
|
||||
{
|
||||
|
||||
Uniform<Matrix44>[] convertedUniform ;
|
||||
private Uniform<Matrix44> convertedUniform ;
|
||||
|
||||
glHandleSet uniformHandle;
|
||||
internal bool _isLookAtAvailable;
|
||||
internal Matrix44 cameraAtt;
|
||||
internal vec3d cameraCoord;
|
||||
internal vec3d _target, up, cameraCoord;
|
||||
internal Matrix44 _lookAt;
|
||||
internal Matrix44 _projection;
|
||||
|
||||
public Camera()
|
||||
{
|
||||
cameraAtt = Matrix44.Unit;
|
||||
cameraCoord = Vec3d.Unit;
|
||||
_target = Vec3d.Zero;
|
||||
up = Vec3d.Zero;
|
||||
cameraCoord = new vec3d(0,0,1);
|
||||
_isLookAtAvailable = false;
|
||||
_lookAt = Matrix44.Unit;
|
||||
convertedUniform = new Uniform<Matrix44>[2];
|
||||
_projection = new Matrix44();
|
||||
}
|
||||
|
||||
public Camera(vec3d position, vec3d target, vec3d up) : this()
|
||||
{
|
||||
SetLookAt(position, target, up);
|
||||
SetViewDirection(position, target, up);
|
||||
}
|
||||
|
||||
public Matrix44 LookAt
|
||||
public Matrix44 View
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -74,11 +75,9 @@ namespace StgSharp.Graphic
|
||||
{
|
||||
return _lookAt;
|
||||
}
|
||||
Matrix44 att = cameraAtt;
|
||||
att.Colum1 = Linear.Normalize(att.Colum1);
|
||||
Matrix44 coord = Matrix44.Unit;
|
||||
coord.Colum3.vec -= cameraCoord.vec;
|
||||
_lookAt = att.Transpose * coord;
|
||||
Matrix44 move = Matrix44.Unit;
|
||||
move.Colum3.vec -= cameraCoord.vec;
|
||||
_lookAt = cameraAtt.Transpose * move;
|
||||
_isLookAtAvailable = true;
|
||||
return _lookAt;
|
||||
}
|
||||
@@ -102,28 +101,36 @@ namespace StgSharp.Graphic
|
||||
cameraCoord.Y -= distance;
|
||||
}
|
||||
|
||||
public void Perspective(Radius fovy, Vec2d size, float zNear, float zFar)
|
||||
public void SetViewRange(Radius fovRadius, vec2d size, vec2d offset, (float front, float back) dephRange)
|
||||
{
|
||||
if (fovy == Radius.Zero)
|
||||
{
|
||||
fovy = new Radius(0.000001f);
|
||||
}
|
||||
if (zFar == zNear)
|
||||
{
|
||||
return;
|
||||
}
|
||||
float
|
||||
distance = _target.GetLength(),
|
||||
near = distance - dephRange.front,
|
||||
far = distance + dephRange.back,
|
||||
offsetX = offset.X,
|
||||
offsetY = offset.Y,
|
||||
width = Scaler.Abs(GeometryScaler.Tan(fovRadius / 2) * near *2),
|
||||
height = width * size.Y / size.X;
|
||||
|
||||
float rad = fovy._radius;
|
||||
float aspect = size.X / size.Y;
|
||||
float tanHalfFovy = Scaler.Tan(rad / 2.0f);
|
||||
tanHalfFovy = tanHalfFovy==float.PositiveInfinity? float.MaxValue : tanHalfFovy;
|
||||
tanHalfFovy = tanHalfFovy == float.NegativeInfinity ? float.MinValue : tanHalfFovy;
|
||||
_projection.Colum0.X = 2 * near / width;
|
||||
_projection.Colum1.Y = 2 * near / height;
|
||||
_projection.Colum2.X = 2 * offsetX / width;
|
||||
_projection.Colum2.Y = 2 * offsetY / height;
|
||||
_projection.Colum2.Z = (far + near) / (near - far);
|
||||
_projection.Colum2.W = -1;
|
||||
_projection.Colum3.Z = 2 * near * far / (near - far);
|
||||
|
||||
_projection.Colum0.X = 1.0f / (aspect * tanHalfFovy);
|
||||
_projection.Colum1.Y = 1.0f / tanHalfFovy;
|
||||
_projection.Colum2.Z = (-(zFar + zNear)) / (zFar - zNear);
|
||||
_projection.Colum3.W = -1.0f;
|
||||
_projection.Colum2.Y = (-(2.0f * zFar * zNear)) / (zFar - zNear);
|
||||
}
|
||||
|
||||
public void Test(params vec4d[] vec)
|
||||
{
|
||||
Console.WriteLine(View);
|
||||
Console.WriteLine(Projection);
|
||||
Console.WriteLine(Projection * View);
|
||||
foreach (var item in vec)
|
||||
{
|
||||
Console.Write($"{Projection * View * item};");
|
||||
}
|
||||
}
|
||||
|
||||
public void Pitch(Radius r)
|
||||
@@ -142,27 +149,42 @@ namespace StgSharp.Graphic
|
||||
cameraAtt.Colum2.vec = partialCoord.colum1.vec;
|
||||
}
|
||||
|
||||
public void SetLookAt(vec3d position, vec3d target, vec3d up)
|
||||
public void SetViewDirection(vec3d position, vec3d target, vec3d up)
|
||||
{
|
||||
vec3d direction = target - position;
|
||||
vec3d direction = position - target;
|
||||
if (position == cameraCoord && this.up == up && cameraAtt.Colum2.vec == direction.vec)
|
||||
{
|
||||
//no difference with precious value
|
||||
return;
|
||||
}
|
||||
if (direction.GetLength() == 0)
|
||||
{
|
||||
//deadlock
|
||||
throw new ArgumentException();
|
||||
}
|
||||
if (Vec3d.IsParallel(direction, up))
|
||||
{
|
||||
throw new ArgumentException();
|
||||
}
|
||||
_target = direction;
|
||||
cameraCoord = position;
|
||||
this.up = up;
|
||||
|
||||
_isLookAtAvailable = false;
|
||||
|
||||
Linear.Normalize(ref direction, ref up);
|
||||
vec3d right = Linear.Cross(up, direction);
|
||||
|
||||
cameraAtt.Colum0.vec = direction.vec;
|
||||
vec3d right = Linear.Normalize(Linear.Cross(up,direction));
|
||||
|
||||
cameraAtt.Colum0.vec = right.vec;
|
||||
cameraAtt.Colum1.vec = up.vec;
|
||||
cameraAtt.Colum2.vec = right.vec;
|
||||
cameraAtt.Colum2.vec = direction.vec;
|
||||
|
||||
}
|
||||
|
||||
public void DisplayGLtypeDefinition()
|
||||
{
|
||||
Console.WriteLine(
|
||||
$"struct camera\n" +
|
||||
"\t{{\n" +
|
||||
"\tmatrix4x4 Perspective;\n" +
|
||||
"\tmatrix4x4 View;\n" +
|
||||
"\t}}\n"
|
||||
);
|
||||
Console.WriteLine("uniform matrix4x4 cameraName;");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -176,48 +198,11 @@ namespace StgSharp.Graphic
|
||||
/// <exception cref="ArgumentException"></exception>
|
||||
public unsafe void GainAllUniforms(ShaderProgram source, params string[] uniformName)
|
||||
{
|
||||
GLcontext* gl = GL.api;
|
||||
uniformHandle = new glHandleSet(2);
|
||||
byte[] name1;
|
||||
byte[] name2;
|
||||
Console.WriteLine(uniformName.Length);
|
||||
switch (uniformName.Length)
|
||||
if (uniformName.Length!=1)
|
||||
{
|
||||
case 2:
|
||||
name1 = Encoding.UTF8.GetBytes(uniformName[0]);
|
||||
name2 = Encoding.UTF8.GetBytes(uniformName[1]);
|
||||
fixed (byte* namePtr = name1)
|
||||
{
|
||||
uniformHandle[(uint)0].Value = gl->glGetUniformLocation(
|
||||
source.handle.Value, namePtr);
|
||||
}
|
||||
fixed (byte* namePtr = name2)
|
||||
{
|
||||
uniformHandle[(uint)1].Value = gl->glGetUniformLocation(
|
||||
source.handle.Value, namePtr);
|
||||
}
|
||||
convertedUniform[0] = Uniform<Matrix44>.FromHandle(uniformHandle[(uint)0]);
|
||||
convertedUniform[1] = Uniform<Matrix44>.FromHandle(uniformHandle[(uint)1]);
|
||||
break;
|
||||
case 1:
|
||||
name1 = Encoding.UTF8.GetBytes($"{uniformName[0]}.Perspective");
|
||||
name2 = Encoding.UTF8.GetBytes($"{uniformName[0]}.View");
|
||||
fixed (byte* namePtr = name1)
|
||||
{
|
||||
uniformHandle[(uint)0].Value = gl->glGetUniformLocation(
|
||||
source.handle.Value, namePtr);
|
||||
}
|
||||
fixed (byte* namePtr = name2)
|
||||
{
|
||||
uniformHandle[(uint)1].Value = gl->glGetUniformLocation(
|
||||
source.handle.Value, namePtr);
|
||||
}
|
||||
convertedUniform[0] = Uniform<Matrix44>.FromHandle(uniformHandle[(uint)0]);
|
||||
convertedUniform[1] = Uniform<Matrix44>.FromHandle(uniformHandle[(uint)1]);
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentException();
|
||||
throw new ArgumentException();
|
||||
}
|
||||
convertedUniform = source.GetUniform<Matrix44>(uniformName[0]);
|
||||
}
|
||||
|
||||
ShaderStruct IglConvertable.GetConvertedGLtype()
|
||||
@@ -227,16 +212,11 @@ namespace StgSharp.Graphic
|
||||
|
||||
public unsafe void SetAllUniforms()
|
||||
{
|
||||
GL.SetValue(convertedUniform[0], _projection);
|
||||
GL.SetValue(convertedUniform[1], LookAt);
|
||||
GL.SetValue(convertedUniform, Projection * View);
|
||||
}
|
||||
|
||||
~Camera()
|
||||
{
|
||||
if (uniformHandle != null)
|
||||
{
|
||||
uniformHandle.Release();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -44,10 +44,10 @@ namespace StgSharp.Math
|
||||
[FieldOffset(0)] internal Mat4 mat;
|
||||
[FieldOffset(4 * 4 * sizeof(float))] internal Mat2 transpose;
|
||||
|
||||
[FieldOffset(0)] public Vec2d Colum0;
|
||||
[FieldOffset(16)] public Vec2d Colum1;
|
||||
[FieldOffset(32)] public Vec2d Colum2;
|
||||
[FieldOffset(48)] public Vec2d Colum3;
|
||||
[FieldOffset(0)] public vec2d Colum0;
|
||||
[FieldOffset(16)] public vec2d Colum1;
|
||||
[FieldOffset(32)] public vec2d Colum2;
|
||||
[FieldOffset(48)] public vec2d Colum3;
|
||||
|
||||
internal Matrix24(
|
||||
Vector4 c0,
|
||||
|
||||
@@ -114,7 +114,7 @@ namespace StgSharp.Math
|
||||
}
|
||||
}
|
||||
|
||||
public vec3d VerticalVecMultiply(Vec2d vec)
|
||||
public vec3d VerticalVecMultiply(vec2d vec)
|
||||
{
|
||||
return (colum0 * vec.X) + (colum1 * vec.Y);
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace StgSharp.Math
|
||||
|
||||
|
||||
[StructLayout(LayoutKind.Explicit, Size = (2 * 16 * sizeof(float)) + sizeof(bool), Pack = 16)]
|
||||
public unsafe struct Matrix44 : IEquatable<Matrix44>
|
||||
public unsafe struct Matrix44 : IEquatable<Matrix44>, IMat
|
||||
{
|
||||
|
||||
[FieldOffset(2 * 64 * sizeof(float))] internal bool isTransposed;
|
||||
@@ -152,6 +152,36 @@ namespace StgSharp.Math
|
||||
0, 0, 0, 1
|
||||
);
|
||||
|
||||
public static Matrix44 XNegativeUnit
|
||||
=> new Matrix44(
|
||||
-1, 0, 0, 0,
|
||||
0, 1, 0, 0,
|
||||
0, 0, 1, 0,
|
||||
0, 0, 0, 1
|
||||
);
|
||||
public static Matrix44 YNegativeUnit
|
||||
=> new Matrix44(
|
||||
1, 0, 0, 0,
|
||||
0, -1, 0, 0,
|
||||
0, 0, 1, 0,
|
||||
0, 0, 0, 1
|
||||
);
|
||||
|
||||
public static Matrix44 ZNegativeUnit
|
||||
=> new Matrix44(
|
||||
1, 0, 0, 0,
|
||||
0, 1, 0, 0,
|
||||
0, 0, -1, 0,
|
||||
0, 0, 0, 1
|
||||
);
|
||||
public static Matrix44 WNegativeUnit
|
||||
=> new Matrix44(
|
||||
1, 0, 0, 0,
|
||||
0, 1, 0, 0,
|
||||
0, 0, 1, 0,
|
||||
0, 0, 0, -1
|
||||
);
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public unsafe float Det()
|
||||
{
|
||||
@@ -295,7 +325,6 @@ namespace StgSharp.Math
|
||||
Vector4.Dot(left.transpose.colum3, right.mat.colum1),
|
||||
Vector4.Dot(left.transpose.colum3, right.mat.colum2),
|
||||
Vector4.Dot(left.transpose.colum3, right.mat.colum3)
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace StgSharp.Math
|
||||
public static unsafe partial class Linear
|
||||
{
|
||||
|
||||
public static float Cross(Vec2d vec1, Vec2d vec2)
|
||||
public static float Cross(vec2d vec1, vec2d vec2)
|
||||
{
|
||||
return (vec1.X * vec2.Y) - (vec1.Y * vec2.X);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace StgSharp.Math
|
||||
public static unsafe partial class Linear
|
||||
{
|
||||
|
||||
public static float GetAngle(Vec2d vec1, Vec2d vec2)
|
||||
public static float GetAngle(vec2d vec1, vec2d vec2)
|
||||
{
|
||||
return Scaler.ACos(1
|
||||
//vec1.multiple(vec2)
|
||||
|
||||
@@ -35,19 +35,12 @@ namespace StgSharp.Math
|
||||
|
||||
public static float GetLength(this vec3d vec)
|
||||
{
|
||||
return Scaler.Sqrt(
|
||||
(vec.X * vec.X) +
|
||||
(vec.Y * vec.Y) +
|
||||
(vec.Z * vec.Z)
|
||||
);
|
||||
return Scaler.Sqrt(vec.Dot(vec));
|
||||
}
|
||||
|
||||
public static float GetLength(this Vec2d vec)
|
||||
public static float GetLength(this vec2d vec)
|
||||
{
|
||||
return Scaler.Sqrt(
|
||||
(vec.X * vec.X) +
|
||||
(vec.Y * vec.Y)
|
||||
);
|
||||
return Scaler.Sqrt(vec.Dot(vec));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -43,18 +43,16 @@ namespace StgSharp.Math
|
||||
|
||||
public static unsafe void Normalize(ref vec3d source, ref vec3d target)
|
||||
{
|
||||
Vector4 s = source.vec;
|
||||
Vector4 t = target.vec;
|
||||
|
||||
s = Vector4.Normalize(s);
|
||||
|
||||
float dotProduct = Vector4.Dot(s, t);
|
||||
Vector4 projection = Vector4.Multiply(s, t);
|
||||
Vector3 s = source.v;
|
||||
Vector3 t = target.v;
|
||||
|
||||
s = Vector3.Normalize(s);
|
||||
Vector3 projection = Vector3.Dot(t, s) / Vector3.Dot(s, s) * s;
|
||||
t -= projection;
|
||||
t = Vector3.Normalize(t);
|
||||
|
||||
source.vec = s;
|
||||
target.vec = t;
|
||||
source.v = s;
|
||||
target.v = t;
|
||||
}
|
||||
|
||||
public static vec4d Normalize(vec4d vec)
|
||||
|
||||
@@ -36,25 +36,25 @@ namespace StgSharp.Math
|
||||
public static unsafe partial class VectorCalc
|
||||
{
|
||||
|
||||
public static Vec2d To2D(vec3d vec, CordinatePlain plain)
|
||||
public static vec2d To2D(vec3d vec, CordinatePlain plain)
|
||||
{
|
||||
switch (plain)
|
||||
{
|
||||
case CordinatePlain.XY:
|
||||
return new Vec2d(vec.X, vec.Y);
|
||||
return new vec2d(vec.X, vec.Y);
|
||||
break;
|
||||
case CordinatePlain.YZ:
|
||||
return new Vec2d(vec.Y, vec.Z);
|
||||
return new vec2d(vec.Y, vec.Z);
|
||||
break;
|
||||
case CordinatePlain.XZ:
|
||||
return new Vec2d(vec.X, vec.Z);
|
||||
return new vec2d(vec.X, vec.Z);
|
||||
break;
|
||||
default:
|
||||
return default(Vec2d);
|
||||
return default(vec2d);
|
||||
break;
|
||||
}
|
||||
}
|
||||
public static vec3d To3D(Vec2d vec)
|
||||
public static vec3d To3D(vec2d vec)
|
||||
{
|
||||
return new vec3d(vec.X, vec.Y, 0.0f);
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace StgSharp.Math
|
||||
/// Vec2Ds in StgSharp are defaultly usaed as colum vector.
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Explicit, Size = 16, Pack = 16)]
|
||||
public struct Vec2d
|
||||
public struct vec2d
|
||||
{
|
||||
|
||||
[FieldOffset(0)]
|
||||
@@ -55,56 +55,74 @@ namespace StgSharp.Math
|
||||
[FieldOffset(4)]
|
||||
public float Y;
|
||||
|
||||
internal Vec2d(Vector2 vec)
|
||||
internal vec2d(Vector2 vec)
|
||||
{
|
||||
v = vec;
|
||||
}
|
||||
|
||||
public Vec2d(float x, float y)
|
||||
public vec2d(float x, float y)
|
||||
{
|
||||
v = new Vector2(x, y);
|
||||
}
|
||||
|
||||
public static Vec2d Unit => new Vec2d(1, 1);
|
||||
|
||||
public static Vec2d Zero => new Vec2d(0, 0);
|
||||
|
||||
public float Cross(Vec2d right)
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public float Cross(vec2d right)
|
||||
{
|
||||
return (X * right.Y) - (Y * right.X);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static Vec2d operator -(Vec2d left, Vec2d right)
|
||||
public float Dot(vec2d vec)
|
||||
{
|
||||
return new Vec2d(left.v - right.v);
|
||||
return Vector2.Dot(v, vec.v);
|
||||
}
|
||||
|
||||
public static bool operator !=(Vec2d left, Vec2d right)
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static vec2d operator -(vec2d left, vec2d right)
|
||||
{
|
||||
return new vec2d(left.v - right.v);
|
||||
}
|
||||
|
||||
public static bool operator !=(vec2d left, vec2d right)
|
||||
{
|
||||
return !(left == right);
|
||||
}
|
||||
|
||||
public static Vec2d operator *(Vec2d vec, float value)
|
||||
public static vec2d operator *(vec2d vec, float value)
|
||||
{
|
||||
return new Vec2d(vec.v * value);
|
||||
return new vec2d(vec.v * value);
|
||||
}
|
||||
|
||||
public static Vec2d operator /(Vec2d vec, float value)
|
||||
public static vec2d operator /(vec2d vec, float value)
|
||||
{
|
||||
return new Vec2d(vec.v / value);
|
||||
return new vec2d(vec.v / value);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static Vec2d operator +(Vec2d left, Vec2d right)
|
||||
public static vec2d operator +(vec2d left, vec2d right)
|
||||
{
|
||||
return new Vec2d(left.v + right.v);
|
||||
return new vec2d(left.v + right.v);
|
||||
}
|
||||
|
||||
public static bool operator ==(Vec2d left, Vec2d right)
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static bool operator ==(vec2d left, vec2d right)
|
||||
{
|
||||
return left.v == right.v;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static implicit operator vec2d((float, float) tuple)
|
||||
{
|
||||
return new vec2d(tuple.Item1, tuple.Item2);
|
||||
}
|
||||
}
|
||||
|
||||
public static class Vec2d
|
||||
{
|
||||
|
||||
public static vec2d Unit => new vec2d(1, 1);
|
||||
|
||||
public static vec2d Zero => new vec2d(0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,10 +88,7 @@ namespace StgSharp.Math
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public float Dot(vec3d right)
|
||||
{
|
||||
Vector4 vector4 = this.vec * right.vec;
|
||||
return vector4.X
|
||||
+ vector4.Y
|
||||
+ vector4.Z;
|
||||
return Vector3.Dot(v,right.v);
|
||||
}
|
||||
|
||||
public bool Equals(vec3d other)
|
||||
@@ -200,8 +197,23 @@ namespace StgSharp.Math
|
||||
public static class Vec3d
|
||||
{
|
||||
|
||||
public static vec3d Unit => new vec3d(1, 1, 1);
|
||||
public static bool IsParallel(vec3d left, vec3d right)
|
||||
{
|
||||
return Cross(left,right) == Zero;
|
||||
}
|
||||
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static vec3d Cross(vec3d left, vec3d right)
|
||||
{
|
||||
return Linear.Cross(left, right);
|
||||
}
|
||||
|
||||
public static vec3d One => new vec3d(1, 1, 1);
|
||||
public static vec3d Zero => new vec3d(0, 0, 0);
|
||||
|
||||
public static vec3d UnitZ => new vec3d(0, 0, 1);
|
||||
public static vec3d UnitX => new vec3d(1, 0, 0);
|
||||
public static vec3d UnitY => new vec3d(0, 1, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ using StgSharp.Math;
|
||||
using System;
|
||||
using System.Data.Common;
|
||||
using System.Numerics;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace StgSharp.Math
|
||||
@@ -58,6 +59,11 @@ namespace StgSharp.Math
|
||||
[FieldOffset(8)] public float Z;
|
||||
[FieldOffset(12)] public float W;
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return vec.ToString();
|
||||
}
|
||||
|
||||
public vec4d(float x, float y, float z, float w)
|
||||
{
|
||||
vec = new Vector4(x, y, z, w);
|
||||
@@ -68,5 +74,17 @@ namespace StgSharp.Math
|
||||
return vec.reg;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static vec4d operator *(Matrix44 mat, vec4d vec)
|
||||
{
|
||||
mat.InternalTranspose();
|
||||
return new vec4d(
|
||||
Vector4.Dot( mat.transpose.colum0,vec.vec),
|
||||
Vector4.Dot( mat.transpose.colum1, vec.vec),
|
||||
Vector4.Dot( mat.transpose.colum2, vec.vec),
|
||||
Vector4.Dot( mat.transpose.colum3, vec.vec)
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -64,12 +64,12 @@
|
||||
Set all necessary metadata to current form instance
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.SetSize(StgSharp.Math.Vec2d)">
|
||||
<member name="M:StgSharp.Graphics.Form.SetSize(StgSharp.Math.vec2d)">
|
||||
<summary>
|
||||
Resize the current form
|
||||
</summary>
|
||||
<param name="size">
|
||||
A <see cref="T:StgSharp.Math.Vec2d"/> (width,height) representing the new size of current form
|
||||
A <see cref="T:StgSharp.Math.vec2d"/> (width,height) representing the new size of current form
|
||||
</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.SetSize(System.Int32,System.Int32)">
|
||||
@@ -79,15 +79,15 @@
|
||||
<param name="width">New width of the window</param>
|
||||
<param name="height">New height of the window</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.SetSizeLimit(StgSharp.Math.Vec2d,StgSharp.Math.Vec2d)">
|
||||
<member name="M:StgSharp.Graphics.Form.SetSizeLimit(StgSharp.Math.vec2d,StgSharp.Math.vec2d)">
|
||||
<summary>
|
||||
Set the size limit of current form
|
||||
</summary>
|
||||
<param name="minSize">
|
||||
Minimun size of current form. In form of a <see cref="T:StgSharp.Math.Vec2d"/> of (width,height)
|
||||
Minimun size of current form. In form of a <see cref="T:StgSharp.Math.vec2d"/> of (width,height)
|
||||
</param>
|
||||
<param name="maxSize">
|
||||
Maximum size of current form. In form of a <see cref="T:StgSharp.Math.Vec2d"/> of (width,height)
|
||||
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.SetSizeLimit(System.Int32,System.Int32,System.Int32,System.Int32)">
|
||||
@@ -412,7 +412,7 @@
|
||||
An IEEE-754 double precision floating-point value, clamped to the range [0,1].
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:StgSharp.Math.Vec2d">
|
||||
<member name="T:StgSharp.Math.vec2d">
|
||||
<summary>
|
||||
A two dimension vector defined by two elements.
|
||||
Vec2Ds in StgSharp are defaultly usaed as colum vector.
|
||||
|
||||
@@ -9,21 +9,13 @@
|
||||
".NETStandard,Version=v2.1/": {
|
||||
"StgSharp/1.0.0": {
|
||||
"dependencies": {
|
||||
"Microsoft.Bcl.HashCode": "1.1.1",
|
||||
"Microsoft.CSharp": "4.7.0"
|
||||
"Microsoft.CSharp": "4.7.0",
|
||||
"Microsoft.Windows.CsWin32": "0.3.49-beta"
|
||||
},
|
||||
"runtime": {
|
||||
"StgSharp.dll": {}
|
||||
}
|
||||
},
|
||||
"Microsoft.Bcl.HashCode/1.1.1": {
|
||||
"runtime": {
|
||||
"lib/netstandard2.1/Microsoft.Bcl.HashCode.dll": {
|
||||
"assemblyVersion": "1.0.0.0",
|
||||
"fileVersion": "4.700.20.56604"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.CSharp/4.7.0": {
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/Microsoft.CSharp.dll": {
|
||||
@@ -31,6 +23,59 @@
|
||||
"fileVersion": "4.700.19.56404"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.Windows.CsWin32/0.3.49-beta": {
|
||||
"dependencies": {
|
||||
"Microsoft.Windows.SDK.Win32Docs": "0.1.42-alpha",
|
||||
"Microsoft.Windows.SDK.Win32Metadata": "55.0.45-preview",
|
||||
"Microsoft.Windows.WDK.Win32Metadata": "0.9.9-experimental",
|
||||
"System.Memory": "4.5.5",
|
||||
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
|
||||
}
|
||||
},
|
||||
"Microsoft.Windows.SDK.Win32Docs/0.1.42-alpha": {},
|
||||
"Microsoft.Windows.SDK.Win32Metadata/55.0.45-preview": {},
|
||||
"Microsoft.Windows.WDK.Win32Metadata/0.9.9-experimental": {
|
||||
"dependencies": {
|
||||
"Microsoft.Windows.SDK.Win32Metadata": "55.0.45-preview"
|
||||
}
|
||||
},
|
||||
"System.Buffers/4.5.1": {
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/System.Buffers.dll": {
|
||||
"assemblyVersion": "4.0.3.0",
|
||||
"fileVersion": "4.6.28619.1"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Memory/4.5.5": {
|
||||
"dependencies": {
|
||||
"System.Buffers": "4.5.1",
|
||||
"System.Numerics.Vectors": "4.4.0",
|
||||
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/System.Memory.dll": {
|
||||
"assemblyVersion": "4.0.1.2",
|
||||
"fileVersion": "4.6.31308.1"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Numerics.Vectors/4.4.0": {
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/System.Numerics.Vectors.dll": {
|
||||
"assemblyVersion": "4.1.3.0",
|
||||
"fileVersion": "4.6.25519.3"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Runtime.CompilerServices.Unsafe/6.0.0": {
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/System.Runtime.CompilerServices.Unsafe.dll": {
|
||||
"assemblyVersion": "6.0.0.0",
|
||||
"fileVersion": "6.0.21.52210"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -40,19 +85,68 @@
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
},
|
||||
"Microsoft.Bcl.HashCode/1.1.1": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-MalY0Y/uM/LjXtHfX/26l2VtN4LDNZ2OE3aumNOHDLsT4fNYy2hiHXI4CXCqKpNUNm7iJ2brrc4J89UdaL56FA==",
|
||||
"path": "microsoft.bcl.hashcode/1.1.1",
|
||||
"hashPath": "microsoft.bcl.hashcode.1.1.1.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.CSharp/4.7.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-pTj+D3uJWyN3My70i2Hqo+OXixq3Os2D1nJ2x92FFo6sk8fYS1m1WLNTs0Dc1uPaViH0YvEEwvzddQ7y4rhXmA==",
|
||||
"path": "microsoft.csharp/4.7.0",
|
||||
"hashPath": "microsoft.csharp.4.7.0.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.Windows.CsWin32/0.3.49-beta": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-/iAXplVDKESFyLz/MShuVYVx62YFvFePpq3qrzREl8KScQqG6Z2kV7r9UJTjQS1g+hfy3V+e4m1x9lsu24YNSg==",
|
||||
"path": "microsoft.windows.cswin32/0.3.49-beta",
|
||||
"hashPath": "microsoft.windows.cswin32.0.3.49-beta.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.Windows.SDK.Win32Docs/0.1.42-alpha": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-Z/9po23gUA9aoukirh2ItMU2ZS9++Js9Gdds9fu5yuMojDrmArvY2y+tq9985tR3cxFxpZO1O35Wjfo0khj5HA==",
|
||||
"path": "microsoft.windows.sdk.win32docs/0.1.42-alpha",
|
||||
"hashPath": "microsoft.windows.sdk.win32docs.0.1.42-alpha.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.Windows.SDK.Win32Metadata/55.0.45-preview": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-2i1kVIk8rMuMCYtoeYeWbmCRLqNgb63Berac3Gv+J/pjp0oucopasKgLQNslryhsgBl4xex9ENhJX2MXEW5vdA==",
|
||||
"path": "microsoft.windows.sdk.win32metadata/55.0.45-preview",
|
||||
"hashPath": "microsoft.windows.sdk.win32metadata.55.0.45-preview.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.Windows.WDK.Win32Metadata/0.9.9-experimental": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-cncPlxLqR25mFOuvpxZPgXgJqRmXyV5eTULj/9w8AQvO/c1xJDEapohRsWkYaia7hCR/EwEzBHr7RU9u93T03w==",
|
||||
"path": "microsoft.windows.wdk.win32metadata/0.9.9-experimental",
|
||||
"hashPath": "microsoft.windows.wdk.win32metadata.0.9.9-experimental.nupkg.sha512"
|
||||
},
|
||||
"System.Buffers/4.5.1": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-Rw7ijyl1qqRS0YQD/WycNst8hUUMgrMH4FCn1nNm27M4VxchZ1js3fVjQaANHO5f3sN4isvP4a+Met9Y4YomAg==",
|
||||
"path": "system.buffers/4.5.1",
|
||||
"hashPath": "system.buffers.4.5.1.nupkg.sha512"
|
||||
},
|
||||
"System.Memory/4.5.5": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==",
|
||||
"path": "system.memory/4.5.5",
|
||||
"hashPath": "system.memory.4.5.5.nupkg.sha512"
|
||||
},
|
||||
"System.Numerics.Vectors/4.4.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-UiLzLW+Lw6HLed1Hcg+8jSRttrbuXv7DANVj0DkL9g6EnnzbL75EB7EWsw5uRbhxd/4YdG8li5XizGWepmG3PQ==",
|
||||
"path": "system.numerics.vectors/4.4.0",
|
||||
"hashPath": "system.numerics.vectors.4.4.0.nupkg.sha512"
|
||||
},
|
||||
"System.Runtime.CompilerServices.Unsafe/6.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==",
|
||||
"path": "system.runtime.compilerservices.unsafe/6.0.0",
|
||||
"hashPath": "system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512"
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -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+127fcdbfd32fd1caa4a55ced77c7e738f038a59c")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+e1e416bb41a7e16ddec5e7c16d64c72d6aa380e1")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("StgSharp")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharp")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
@@ -1 +1 @@
|
||||
5bdfaeb828f7a682fca2531a3fe7bdbf99d72f6a17b3554b2957f0377659471f
|
||||
2ada11ce10f85a06de358a4bce8f696ee557358f3cc0800e7c9895081adaf694
|
||||
|
||||
Binary file not shown.
@@ -1 +1 @@
|
||||
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/127fcdbfd32fd1caa4a55ced77c7e738f038a59c/*"}}
|
||||
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/e1e416bb41a7e16ddec5e7c16d64c72d6aa380e1/*"}}
|
||||
@@ -64,12 +64,12 @@
|
||||
Set all necessary metadata to current form instance
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.SetSize(StgSharp.Math.Vec2d)">
|
||||
<member name="M:StgSharp.Graphics.Form.SetSize(StgSharp.Math.vec2d)">
|
||||
<summary>
|
||||
Resize the current form
|
||||
</summary>
|
||||
<param name="size">
|
||||
A <see cref="T:StgSharp.Math.Vec2d"/> (width,height) representing the new size of current form
|
||||
A <see cref="T:StgSharp.Math.vec2d"/> (width,height) representing the new size of current form
|
||||
</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.SetSize(System.Int32,System.Int32)">
|
||||
@@ -79,15 +79,15 @@
|
||||
<param name="width">New width of the window</param>
|
||||
<param name="height">New height of the window</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.SetSizeLimit(StgSharp.Math.Vec2d,StgSharp.Math.Vec2d)">
|
||||
<member name="M:StgSharp.Graphics.Form.SetSizeLimit(StgSharp.Math.vec2d,StgSharp.Math.vec2d)">
|
||||
<summary>
|
||||
Set the size limit of current form
|
||||
</summary>
|
||||
<param name="minSize">
|
||||
Minimun size of current form. In form of a <see cref="T:StgSharp.Math.Vec2d"/> of (width,height)
|
||||
Minimun size of current form. In form of a <see cref="T:StgSharp.Math.vec2d"/> of (width,height)
|
||||
</param>
|
||||
<param name="maxSize">
|
||||
Maximum size of current form. In form of a <see cref="T:StgSharp.Math.Vec2d"/> of (width,height)
|
||||
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.SetSizeLimit(System.Int32,System.Int32,System.Int32,System.Int32)">
|
||||
@@ -412,7 +412,7 @@
|
||||
An IEEE-754 double precision floating-point value, clamped to the range [0,1].
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:StgSharp.Math.Vec2d">
|
||||
<member name="T:StgSharp.Math.vec2d">
|
||||
<summary>
|
||||
A two dimension vector defined by two elements.
|
||||
Vec2Ds in StgSharp are defaultly usaed as colum vector.
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("StgSharp")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("RealDebug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+e1e416bb41a7e16ddec5e7c16d64c72d6aa380e1")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("StgSharp")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharp")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
@@ -1 +1 @@
|
||||
be8c87457a5494f89505f86881a5a0a81b016a0af5e05652a33e90ae26d1de26
|
||||
a4d87f123623c0d54bffb0363e32d6d18ef4e35b2660ec27f7fa02dbef84070a
|
||||
|
||||
+2
@@ -1,4 +1,6 @@
|
||||
is_global = true
|
||||
build_property.CsWin32InputMetadataPaths = C:\Users\Nitlo\.nuget\packages\microsoft.windows.sdk.win32metadata\55.0.45-preview\Windows.Win32.winmd|C:\Users\Nitlo\.nuget\packages\microsoft.windows.wdk.win32metadata\0.9.9-experimental\Windows.Wdk.winmd
|
||||
build_property.CsWin32InputDocPaths = C:\Users\Nitlo\.nuget\packages\microsoft.windows.sdk.win32docs\0.1.42-alpha\apidocs.msgpack
|
||||
build_property.TargetFramework = netstandard2.1
|
||||
build_property.TargetPlatformMinVersion = 7.0
|
||||
build_property.UsingMicrosoftNETSdkWeb =
|
||||
|
||||
Binary file not shown.
Binary file not shown.
+1
-1
@@ -1 +1 @@
|
||||
14600979b7047444373c4005ac1629cd56f39a50173cc96850f6c359889fb1d1
|
||||
e4e38d06f2245eb242b8b57f041e9aa530a505c39a7af341bfce0c12f0b62443
|
||||
|
||||
Binary file not shown.
@@ -1 +1 @@
|
||||
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/8148c10acd65bd764d3e12418a1ebd37938d8501/*"}}
|
||||
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/e1e416bb41a7e16ddec5e7c16d64c72d6aa380e1/*"}}
|
||||
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user