Fix 3d line drawing
This commit is contained in:
parent
98ff134d3a
commit
631a720e56
1 changed files with 1 additions and 1 deletions
|
|
@ -362,7 +362,7 @@ namespace psemek::gfx
|
|||
float const r = width / 2.f;
|
||||
|
||||
auto const d = geom::normalized(p1 - p0);
|
||||
geom::vector<float, 3> const o { -d[1], d[0], 0.f };
|
||||
geom::vector<float, 3> const o = geom::normalized(geom::vector{ -d[1], d[0], 0.f });
|
||||
|
||||
impl().vertices.push_back({{p0[0] + r * o[0], p0[1] + r * o[1], p0[2]}, c});
|
||||
impl().vertices.push_back({{p0[0] - r * o[0], p0[1] - r * o[1], p0[2]}, c});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue