07.10.2020

+ Parent, Name and Flags to objects.

~ Improved Matrix calculations
This commit is contained in:
Michel Fedde 2020-10-08 12:25:20 +02:00
parent f865496414
commit 2c00dbd31a
21 changed files with 383 additions and 42 deletions

View file

@ -1,4 +1,5 @@
using SM.Base.Contexts;
using System.Collections.Generic;
using SM.Base.Contexts;
using SM.Base.Objects.Static;
using SM.OGL.Mesh;
@ -16,7 +17,16 @@ namespace SM.Base.Scene
/// <summary>
/// The mesh it should use.
/// </summary>
protected GenericMesh _mesh = Defaults.DefaultMesh;
protected GenericMesh _mesh = SMRenderer.DefaultMesh;
/// <inheritdoc />
public object Parent { get; set; }
/// <inheritdoc />
public string Name { get; set; } = "Unnamed draw object";
/// <inheritdoc />
public ICollection<string> Flags { get; set; }
/// <inheritdoc />
public virtual void Update(UpdateContext context)
@ -33,6 +43,18 @@ namespace SM.Base.Scene
DrawContext(ref context);
}
/// <inheritdoc />
public virtual void OnAdded(object sender)
{
}
/// <inheritdoc />
public virtual void OnRemoved(object sender)
{
}
/// <summary>
/// Draws the context, that was given to them.
/// </summary>