refactor(Hi.Sample)!: Box3d, Tri3d, DVec3d and Box2d are named box3d_t, tri3d_t, dvec3d_t and box2d_t -- the C++ typedef names, following HiGeom; the Hi.Native vec3d/tri3d/box3d mirrors are the Hi.Geom values now and vec3f is Hi.Geom.vec3f_t (a word-boundary identifier rename; compound names, string literals and the wire kind names are untouched)

BREAKING CHANGE: source that names these types must use the _t names; the Hi.Native mirrors are gone.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
2026-09-24 13:54:35 +08:00
co-authored by Claude Fable 5.1
parent 7d79db5685
commit 1b834cff0d
14 changed files with 33 additions and 33 deletions
+5 -5
View File
@@ -126,7 +126,7 @@ namespace Sample.Disp
{
//the rgb values set as casual.
vec3d_t rgb = ColorUtil.GetDiscreteRgb(i);
Tri3d tri = new Tri3d(new vec3d_t(i, 0, 0), new vec3d_t(i + 1, 0, 0), new vec3d_t(i + 0.5, 0, 1));
tri3d_t tri = new tri3d_t(new vec3d_t(i, 0, 0), new vec3d_t(i + 1, 0, 0), new vec3d_t(i + 0.5, 0, 1));
for (int j = 0; j < 3; j++)
{
vs[k++] = rgb.x;
@@ -147,7 +147,7 @@ namespace Sample.Disp
{
//the rgb values set as casual.
vec3d_t rgb = ColorUtil.GetDiscreteRgb(i);
Tri3d tri = new Tri3d(new vec3d_t(i, 0, 3), new vec3d_t(i + 1, 0, 3), new vec3d_t(i + 0.5, 0, 4));
tri3d_t tri = new tri3d_t(new vec3d_t(i, 0, 3), new vec3d_t(i + 1, 0, 3), new vec3d_t(i + 0.5, 0, 4));
vec3d_t nn = tri.GetNormal();
for (int j = 0; j < 3; j++)
{
@@ -171,16 +171,16 @@ namespace Sample.Disp
}
/// <summary>
/// Demonstrates drawing 3D triangles using the Tri3d helper class.
/// Demonstrates drawing 3D triangles using the tri3d_t 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;
List<Tri3d> tris = new List<Tri3d>(n);
List<tri3d_t> tris = new List<tri3d_t>(n);
for (int i = 0; i < n; i++)
tris.Add(new Tri3d(new vec3d_t(i, 0, 0), new vec3d_t(i + 1, 0, 0), new vec3d_t(i + 0.5, 0, 1)));
tris.Add(new tri3d_t(new vec3d_t(i, 0, 0), new vec3d_t(i + 1, 0, 0), new vec3d_t(i + 0.5, 0, 1)));
Drawing faceDraw = tris.GetFaceDrawing();
Drawing linesDraw = tris.ToLineDrawing();