/Graphics/Basics/Geometry.cs
C# | 42 lines | 20 code | 2 blank | 20 comment | 0 complexity | c9e390be305d0bf77c9dc6152a06e9c4 MD5 | raw file
Possible License(s): Apache-2.0
- using Delta.ContentSystem.Rendering;
- using Delta.Engine.Dynamic;
-
- namespace Delta.Graphics.Basics
- {
- /// <summary>
- /// Geometry mesh implementation class, each graphic framework has its own
- /// implementation (own drawing logic, optimizations, vertex buffers, etc.).
- /// <para />
- /// You can use this class to extend geometry mesh functionality for all
- /// platforms. If you just change OpenTKGeometry, your game will not be able
- /// to use that changes on any other graphic platform.
- /// </summary>
- public abstract class Geometry : BaseGeometry
- {
- #region Create (Static)
- /// <summary>
- /// Create geometry from geometry mesh data, used to generate meshes
- /// instead of loading them from content, but can be used for that too.
- /// </summary>
- /// <param name="createFromGeometryData">The create from geometry data.</param>
- /// <returns>Geometry that was created from GeometryData</returns>
- public static Geometry Create(GeometryData createFromGeometryData)
- {
- // Load Mesh normally with the string constructor that loads MeshData
- return Factory.Create<Geometry>(createFromGeometryData);
- }
- #endregion
-
- #region Constructors
- /// <summary>
- /// Create geometry from already created GeometryData (from content or for
- /// creating dynamic meshes, like for Lines, UI rendering or Effects).
- /// </summary>
- /// <param name="setMeshData">Geometry mesh data</param>
- protected Geometry(GeometryData setMeshData)
- : base(setMeshData)
- {
- }
- #endregion
- }
- }