using Annulus;
using Azimuth;
using Blacklight.Core;
using Blacklight.Core.Drawables;
using Prism;
namespace Glass.Blacklight
{
///
/// Adds drawables to a Cel in the space a material draws in.
///
public static class CelExtensions
{
///
/// Adds a drawable placed in the control's space by , cut off by the draw
/// state's clip window.
///
public static EntityHandle AddEntity(this Cel cel, in DrawableType drawable,
in DrawState drawState, in AffineMatrix entityToControl) where DrawableType : IDrawable
{
return cel.AddEntity(drawable, drawState.ModelToWorld * entityToControl,
drawState.ClipFor(entityToControl));
}
///
/// Adds a drawable placed in the control's space by , cut off by the draw
/// state's clip window and drawn in .
///
public static EntityHandle AddEntity(this Cel cel, in DrawableType drawable,
in DrawState drawState, in AffineMatrix entityToControl, in TintColor tint)
where DrawableType : IDrawable
{
return cel.AddEntity(drawable, drawState.ModelToWorld * entityToControl,
drawState.ClipFor(entityToControl), tint);
}
}
}