Minor fix when generating surface_triangles
All checks were successful
Build and Publish WASM version of demo / Build-And-Deploy (push) Successful in 21s
All checks were successful
Build and Publish WASM version of demo / Build-And-Deploy (push) Successful in 21s
This commit is contained in:
parent
24c3ade5ee
commit
71ab2f7b35
1 changed files with 2 additions and 8 deletions
|
@ -55,17 +55,11 @@ surface_to_triangles(const std::array<SurfaceUnitOptT, ASize> &surface,
|
||||||
triangles->at(toffset) = SurfaceTriangle(
|
triangles->at(toffset) = SurfaceTriangle(
|
||||||
Vector3{0.5F, surface_unit.ne, -0.5F},
|
Vector3{0.5F, surface_unit.ne, -0.5F},
|
||||||
Vector3{-0.5F, surface_unit.nw, -0.5F},
|
Vector3{-0.5F, surface_unit.nw, -0.5F},
|
||||||
Vector3{-0.5F, surface_unit.sw, 0.5F},
|
Vector3{-0.5F, surface_unit.sw, 0.5F}, Vector3{posx, 0.0F, posz});
|
||||||
Vector3{posx,
|
|
||||||
(surface_unit.ne + surface_unit.nw + surface_unit.sw) / 3.0F,
|
|
||||||
posz});
|
|
||||||
triangles->at(toffset + 1) = SurfaceTriangle(
|
triangles->at(toffset + 1) = SurfaceTriangle(
|
||||||
Vector3{0.5F, surface_unit.ne, -0.5F},
|
Vector3{0.5F, surface_unit.ne, -0.5F},
|
||||||
Vector3{-0.5F, surface_unit.sw, 0.5F},
|
Vector3{-0.5F, surface_unit.sw, 0.5F},
|
||||||
Vector3{0.5F, surface_unit.se, 0.5F},
|
Vector3{0.5F, surface_unit.se, 0.5F}, Vector3{posx, 0.0F, posz});
|
||||||
Vector3{posx,
|
|
||||||
(surface_unit.ne + surface_unit.sw + surface_unit.se) / 3.0F,
|
|
||||||
posz});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return triangles;
|
return triangles;
|
||||||
|
|
Loading…
Reference in a new issue