16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 20:19:18 +02:00

Replace interpolate with std::lerp and glm::mix

This commit is contained in:
docentYT
2026-05-02 01:31:38 +02:00
parent 362338ee5e
commit 3628eb0fc3
21 changed files with 108 additions and 116 deletions

View File

@@ -434,7 +434,7 @@ shape_node::merge( shape_node &Shape ) {
}
// add geometry from provided node
m_data.area.center =
interpolate(
glm::mix(
m_data.area.center, Shape.m_data.area.center,
static_cast<double>( Shape.m_data.vertices.size() ) / ( Shape.m_data.vertices.size() + m_data.vertices.size() ) );
m_data.vertices.insert(
@@ -659,7 +659,7 @@ lines_node::merge( lines_node &Lines ) {
}
// add geometry from provided node
m_data.area.center =
interpolate(
glm::mix(
m_data.area.center, Lines.m_data.area.center,
static_cast<double>( Lines.m_data.vertices.size() ) / ( Lines.m_data.vertices.size() + m_data.vertices.size() ) );
m_data.vertices.insert(