41 lines
1.1 KiB
C#
41 lines
1.1 KiB
C#
using Hi.Disp;
|
|
using Hi.Disp.Flag;
|
|
using Hi.Geom;
|
|
using Hi.Coloring;
|
|
|
|
namespace Sample.Disp
|
|
{
|
|
/// <remarks>
|
|
/// ### Source Code
|
|
/// [!code-csharp[SampleCode](~/../Hi.Sample.Wpf/Disp/DemoDiscreteRgb.cs)]
|
|
/// </remarks>
|
|
public class DemoDiscreteRgb : IDisplayee
|
|
{
|
|
/// <inheritdoc/>
|
|
public void Display(Bind bind)
|
|
{
|
|
bind.RGB = ColorUtil.GetDiscreteRGB_Env();
|
|
new Box3d(0, 0, 0, 1, 1, 1).ToDraw_Face().Display(bind);
|
|
|
|
bind.RGB = ColorUtil.GetDiscreteRGB_Env();
|
|
new Box3d(1, 0, 0, 2, 1, 1).ToDraw_Face().Display(bind);
|
|
|
|
bind.RGB = ColorUtil.GetDiscreteRGB_Env();
|
|
new Box3d(2, 0, 0, 3, 1, 1).ToDraw_Face().Display(bind);
|
|
}
|
|
/// <inheritdoc/>
|
|
public void ExpandToBox3d(Box3d dst)
|
|
{
|
|
dst.Expand(new Vec3d(0, 0, 0));
|
|
dst.Expand(new Vec3d(3, 1, 1));
|
|
}
|
|
|
|
static void Main()
|
|
{
|
|
DemoUtil.RunApplication("Demo Discrete I",
|
|
new DispList(new CoordinateDrawing(), new DemoDiscreteRgb()));
|
|
}
|
|
|
|
}
|
|
}
|