mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-14 18:27:58 -06:00
FDM supports gizmo: caching triangle normals in order to increase performance
This commit is contained in:
parent
e2ccc6ec0c
commit
e312f3be43
3 changed files with 16 additions and 14 deletions
|
@ -506,8 +506,10 @@ void GLGizmoFdmSupports::update_vertex_buffers(const ModelVolume* mv,
|
|||
if (status != type)
|
||||
continue;
|
||||
for (int i=0; i<3; ++i)
|
||||
iva.push_geometry(mesh->its.vertices[mesh->its.indices[facet_idx](i)].cast<double>(),
|
||||
MeshRaycaster::get_triangle_normal(mesh->its, facet_idx).cast<double>());
|
||||
iva.push_geometry(
|
||||
mesh->its.vertices[mesh->its.indices[facet_idx](i)].cast<double>(),
|
||||
m_c->raycaster()->raycasters()[mesh_id]->get_triangle_normal(facet_idx).cast<double>()
|
||||
);
|
||||
iva.push_triangle(3*triangle_cnt, 3*triangle_cnt+1, 3*triangle_cnt+2);
|
||||
++triangle_cnt;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue