Code cleanup.

This commit is contained in:
2023-04-20 00:20:28 +08:00
parent 8670482c04
commit 93d9fdd4b8
3 changed files with 18 additions and 38 deletions

View File

@@ -41,7 +41,7 @@ namespace Cryville.Crtr {
var p = Position;
foreach (var i in sgos) {
i.Reset();
i.AppendPoint(p, s.QuatDir);
i.AppendPoint(p, Rotation);
}
}
}
@@ -50,7 +50,7 @@ namespace Cryville.Crtr {
cpt = s.ScreenPoint;
ptime = s.Time;
Position = pwp + cpt + spos;
Rotation = Quaternion.Euler(s.Direction);
Rotation = s.QuatDir;
}
Vector3 cpt; // Current point
@@ -82,11 +82,11 @@ namespace Cryville.Crtr {
ptime = s.Time;
Position = pwp + cpt + spos;
Rotation = Quaternion.Euler(s.Direction);
Rotation = s.QuatDir;
if (!RootTransform || s.CloneType == 3) return;
foreach (var i in sgos)
i.AppendPoint(Position, s.QuatDir);
i.AppendPoint(Position, Rotation);
}
else UpdatePosition(s);
}
@@ -98,7 +98,7 @@ namespace Cryville.Crtr {
ptime = s.Time;
length = 0;
Position = pwp + cpt + spos;
Rotation = Quaternion.Euler(s.Direction);
Rotation = s.QuatDir;
}
// TODO Fix anchor rotation
@@ -112,7 +112,7 @@ namespace Cryville.Crtr {
EndUpdatePosition(s);
var p = Position;
foreach (var i in sgos) {
i.AppendPoint(p, s.QuatDir);
i.AppendPoint(p, Rotation);
i.Seal();
}
}
@@ -134,7 +134,7 @@ namespace Cryville.Crtr {
pwp = wp;
ppt += dpt;
Position = pwp + cpt + spos;
Rotation = Quaternion.Euler(s.Direction);
Rotation = s.QuatDir;
}
}
}