Added missing summeries #1
This commit is contained in:
parent
03d99ea28e
commit
8665b5b709
104 changed files with 1165 additions and 821 deletions
|
|
@ -1,17 +1,22 @@
|
|||
using System;
|
||||
#region usings
|
||||
|
||||
using OpenTK.Graphics.OpenGL4;
|
||||
using SM.OGL.Mesh;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace SM.Base.Objects
|
||||
{
|
||||
public class InstancedMesh : Mesh, ILineMesh
|
||||
/// <summary>
|
||||
/// This class allows for fast mesh creation.
|
||||
/// </summary>
|
||||
public class InstancedMesh : Mesh
|
||||
{
|
||||
public InstancedMesh(PrimitiveType type, string[] enabledAttibute) : base(type)
|
||||
{
|
||||
Attributes["vertex"] = Vertex = new VBO();
|
||||
|
||||
foreach (string attribute in enabledAttibute)
|
||||
{
|
||||
switch (attribute)
|
||||
{
|
||||
case "uv":
|
||||
|
|
@ -24,9 +29,6 @@ namespace SM.Base.Objects
|
|||
Attributes["color"] = Color = new VBO(pointerSize: 4);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public float LineWidth { get; set; } = 1;
|
||||
}
|
||||
}
|
||||
|
|
@ -7,16 +7,13 @@ using SM.OGL.Mesh;
|
|||
|
||||
namespace SM.Base.Objects
|
||||
{
|
||||
/// <inheritdoc />
|
||||
/// <inheritdoc cref="GenericMesh" />
|
||||
public class Mesh : GenericMesh, ILineMesh
|
||||
{
|
||||
|
||||
public float LineWidth { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// While initializing, it will add the <see cref="Color" /> to the data index.
|
||||
/// </summary>
|
||||
public Mesh(PrimitiveType type) : base()
|
||||
public Mesh(PrimitiveType type)
|
||||
{
|
||||
PrimitiveType = type;
|
||||
Attributes.Add(3, "color", Color);
|
||||
|
|
@ -27,5 +24,7 @@ namespace SM.Base.Objects
|
|||
/// </summary>
|
||||
public virtual VBO Color { get; protected set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public float LineWidth { get; set; } = 1;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,15 +1,19 @@
|
|||
using OpenTK.Graphics;
|
||||
#region usings
|
||||
|
||||
using OpenTK.Graphics;
|
||||
using OpenTK.Graphics.OpenGL4;
|
||||
using SM.OGL.Mesh;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace SM.Base.Objects.Static
|
||||
{
|
||||
/// <summary>
|
||||
/// An AxisHelper-Model
|
||||
/// <para>White: -X, -Y, -Z</para>
|
||||
/// <para>Red: +X </para>
|
||||
/// <para>Green: +Y </para>
|
||||
/// <para>Blue: +Z </para>
|
||||
/// <para>White: -X, -Y, -Z</para>
|
||||
/// <para>Red: +X </para>
|
||||
/// <para>Green: +Y </para>
|
||||
/// <para>Blue: +Z </para>
|
||||
/// </summary>
|
||||
public class AxisHelper : Mesh
|
||||
{
|
||||
|
|
@ -18,28 +22,30 @@ namespace SM.Base.Objects.Static
|
|||
/// </summary>
|
||||
public static AxisHelper Object = new AxisHelper();
|
||||
|
||||
private AxisHelper() : base(PrimitiveType.Lines) {}
|
||||
private AxisHelper() : base(PrimitiveType.Lines)
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override VBO Vertex { get; protected set; } = new VBO()
|
||||
public override VBO Vertex { get; protected set; } = new VBO
|
||||
{
|
||||
{0, 0, 0},
|
||||
{.5f, 0, 0},
|
||||
{0, 0, 0},
|
||||
{0, .5f, 0},
|
||||
{0, 0, -.5f},
|
||||
{0, 0, .5f},
|
||||
{0, 0, .5f}
|
||||
};
|
||||
|
||||
/// <inheritdoc />
|
||||
public override VBO Color { get; protected set; } = new VBO(pointerSize:4)
|
||||
public override VBO Color { get; protected set; } = new VBO(pointerSize: 4)
|
||||
{
|
||||
{Color4.White},
|
||||
{Color4.Red},
|
||||
{Color4.White},
|
||||
{Color4.Green},
|
||||
{Color4.White},
|
||||
{Color4.DarkBlue},
|
||||
Color4.White,
|
||||
Color4.Red,
|
||||
Color4.White,
|
||||
Color4.Green,
|
||||
Color4.White,
|
||||
Color4.DarkBlue
|
||||
};
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue