refactor(Hi.Sample): Mat4d is spelled mat4d_t -- the workspace-wide word-boundary rename that follows HiGeom naming the matrix struct after the C++ typedef; compound identifiers (GetMat4dMap, Mat4dKey, ProgramZeroToGeomMat4d, ...) and the "Mat4d" JSON key keep their spelling, no behaviour changes
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -6,7 +6,7 @@ namespace Sample.Disp
|
||||
/// <summary>
|
||||
/// Demonstrates a simple solar system animation using <see cref="IDisplayee"/> interface.
|
||||
/// Shows how to create a hierarchical transform structure with sun, earth and moon using
|
||||
/// <see cref="Mat4d"/> matrices and model matrix stack transformations.
|
||||
/// <see cref="mat4d_t"/> matrices and model matrix stack transformations.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// ### Source Code
|
||||
@@ -30,12 +30,12 @@ namespace Sample.Disp
|
||||
{
|
||||
sun.Display(bind);
|
||||
bind.ModelMatStack.Push();
|
||||
bind.ModelMatStack.Mul(new Mat4d(new AxisAngle4d(new vec3d_t(0, 0, 1), angle_earth += 0.03)));
|
||||
bind.ModelMatStack.Mul(new Mat4d(new vec3d_t(12, 0, 0)));
|
||||
bind.ModelMatStack.Mul(new mat4d_t(new AxisAngle4d(new vec3d_t(0, 0, 1), angle_earth += 0.03)));
|
||||
bind.ModelMatStack.Mul(new mat4d_t(new vec3d_t(12, 0, 0)));
|
||||
earth.Display(bind);
|
||||
bind.ModelMatStack.Push();
|
||||
bind.ModelMatStack.Mul(new Mat4d(new AxisAngle4d(new vec3d_t(0, 0, 1), angle_moon += 0.02)));
|
||||
bind.ModelMatStack.Mul(new Mat4d(new vec3d_t(4, 0, 0)));
|
||||
bind.ModelMatStack.Mul(new mat4d_t(new AxisAngle4d(new vec3d_t(0, 0, 1), angle_moon += 0.02)));
|
||||
bind.ModelMatStack.Mul(new mat4d_t(new vec3d_t(4, 0, 0)));
|
||||
moon.Display(bind);
|
||||
bind.ModelMatStack.Pop();
|
||||
bind.ModelMatStack.Pop();
|
||||
|
||||
+2
-2
@@ -44,9 +44,9 @@ public static class DemoTopo1
|
||||
brnB.Step = MathUtil.ToRad(-60);
|
||||
|
||||
//Get and show the transform matrices relative to O.
|
||||
Dictionary<Anchor, Mat4d> matMap = asmb.GetMat4dMap(O);
|
||||
Dictionary<Anchor, mat4d_t> matMap = asmb.GetMat4dMap(O);
|
||||
Console.WriteLine("Transform Matrix relative to O:");
|
||||
foreach (KeyValuePair<Anchor, Mat4d> keyValue in matMap)
|
||||
foreach (KeyValuePair<Anchor, mat4d_t> keyValue in matMap)
|
||||
Console.WriteLine($"{keyValue.Key.Name} : {keyValue.Value}");
|
||||
#endregion
|
||||
|
||||
|
||||
Reference in New Issue
Block a user