add docfx samples.
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
using Hi.Disp;
|
||||
using Hi.Geom;
|
||||
using System;
|
||||
|
||||
namespace Sample.Disp
|
||||
{
|
||||
/// <remarks>
|
||||
/// ### Source Code
|
||||
/// [!code-csharp[SampleCode](~/../Hi.Sample.Wpf/Disp/DemoPickable.cs)]
|
||||
/// </remarks>
|
||||
public class DemoPickable : IDisplayee
|
||||
{
|
||||
private readonly Drawing draw;
|
||||
private readonly ShowEventPickable pickable;
|
||||
|
||||
public DemoPickable()
|
||||
{
|
||||
pickable = new ShowEventPickable();
|
||||
double pid = pickable.PickingID;
|
||||
double[] vs = new double[] {
|
||||
//pickID, x,y,z
|
||||
pid, 0,0.1,0.1,
|
||||
pid, 0.1,0,0,
|
||||
pid, 0.1,0,0.1
|
||||
};
|
||||
draw = new Drawing(vs, Stamp.PV, GL.GL_TRIANGLES);
|
||||
}
|
||||
/// <inheritdoc/>
|
||||
public void Display(Bind bind)
|
||||
{
|
||||
draw.Display(bind);
|
||||
}
|
||||
/// <inheritdoc/>
|
||||
public void ExpandToBox3d(Box3d dst)
|
||||
{
|
||||
draw.ExpandToBox3d(dst);
|
||||
}
|
||||
|
||||
[STAThread]
|
||||
public static void Main()
|
||||
{
|
||||
DemoUtil.RunApplication("DemoPickable", new DemoPickable());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user