IEntity.cs 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. #region File Description
  2. //-----------------------------------------------------------------------------
  3. // An entity is the basic renderable entity, eg something you can draw.
  4. // Entities don't have transformations of their own; instead, you put them inside
  5. // nodes which handle matrices and transformations for them.
  6. //
  7. // Author: Ronen Ness.
  8. // Since: 2017.
  9. //-----------------------------------------------------------------------------
  10. #endregion
  11. using Microsoft.Xna.Framework;
  12. using Microsoft.Xna.Framework.Graphics;
  13. using System.Collections.Generic;
  14. namespace MonoGameSceneGraph
  15. {
  16. /// <summary>
  17. /// A basic renderable entity.
  18. /// </summary>
  19. public interface IEntity
  20. {
  21. /// <summary>
  22. /// Draw this entity.
  23. /// </summary>
  24. /// <param name="parent">Parent node that's currently drawing this entity.</param>
  25. /// <param name="localTransformations">Local transformations from the direct parent node.</param>
  26. /// <param name="worldTransformations">World transformations to apply on this entity (this is what you should use to draw this entity).</param>
  27. void Draw(Node parent, Matrix localTransformations, Matrix worldTransformations);
  28. }
  29. }