migrate doc to wwwroot.

This commit is contained in:
2025-04-14 17:05:35 +08:00
parent 9246bd6c41
commit f2ab7fe546
10 changed files with 97 additions and 6 deletions
+24
View File
@@ -6,12 +6,21 @@ using Hi.Coloring;
namespace Sample.Disp
{
/// <summary>
/// Demonstrates various drawing techniques using the HiAPI graphics system.
/// Provides examples of primitive drawing, attribute specification, and rendering options.
/// Includes methods for drawing lines, points, triangles, and other geometric primitives.
/// </summary>
/// <remarks>
/// ### Source Code
/// [!code-csharp[SampleCode](~/../Hi.Sample.Wpf/Disp/DemoDrawing.cs)]
/// </remarks>
public static class DemoDrawing
{
/// <summary>
/// Demonstrates simple line drawing using raw vertex coordinates.
/// Creates a basic line strip from three vertices and displays it using DemoUtil.
/// </summary>
public static void FreeDrawing()
{
#region DocSite.FreeDrawing
@@ -24,6 +33,11 @@ namespace Sample.Disp
#endregion
}
/// <summary>
/// Demonstrates various types of line drawing techniques.
/// Shows how to create points, line strips, line strips with normals, and colored line strips.
/// Illustrates different ways to specify vertex attributes like position, color, and normal.
/// </summary>
public static void DrawLines()
{
List<Vec3d> ps;
@@ -95,6 +109,11 @@ namespace Sample.Disp
, drawLineStripWithNormal, drawLineStripWithColor));
}
/// <summary>
/// Demonstrates drawing triangles using OpenGL primitives.
/// Shows how to create colored triangles (CV) and colored triangles with normals (CNV).
/// Illustrates packing of vertex attributes (color, normal, position) into arrays for rendering.
/// </summary>
public static void DrawTrianglesByPrimitives()
{
int n = 10;// triangle num
@@ -151,6 +170,11 @@ namespace Sample.Disp
new DispList(new RgbTreat(1, 0, 0), drawTrisCV, drawTrisCNV));
}
/// <summary>
/// Demonstrates drawing 3D triangles using the Tri3d helper class.
/// Creates a series of triangles and renders them as both face (filled) and line (wireframe) drawings.
/// Shows how to apply different colors to faces and lines of the same geometry.
/// </summary>
public static void DrawTri3d()
{
int n = 10;