Core/Node: Refactor interface

- Removed overloads taking multiple scalars
- Removed CoordSys parameter (functions exists in two sets, local and global)
This commit is contained in:
SirLynix
2024-02-18 22:16:54 +01:00
committed by Jérôme Leclercq
parent 194dba5002
commit 63c526cecc
23 changed files with 444 additions and 462 deletions

View File

@@ -138,7 +138,7 @@ int main(int argc, char* argv[])
ballGfx.AttachRenderable(std::move(sphereModel));
auto& ballNode = ballEntity.emplace<Nz::NodeComponent>();
ballNode.SetPosition(positionRandom(rd), positionRandom(rd), positionRandom(rd));
ballNode.SetPosition({ positionRandom(rd), positionRandom(rd), positionRandom(rd) });
ballNode.SetScale(radius);
Nz::RigidBody3D::DynamicSettings settings;
@@ -173,8 +173,8 @@ int main(int argc, char* argv[])
boxEntity.emplace<Nz::GraphicsComponent>(std::move(sphereModel));
auto& ballNode = boxEntity.emplace<Nz::NodeComponent>();
ballNode.SetPosition(xRandom(rd), yRandom(rd), zRandom(rd));
ballNode.SetScale(width, height, depth);
ballNode.SetPosition({ xRandom(rd), yRandom(rd), zRandom(rd) });
ballNode.SetScale({ width, height, depth });
std::shared_ptr<Nz::BoxCollider3D> boxCollider = std::make_shared<Nz::BoxCollider3D>(Nz::Vector3f(width, height, depth));
@@ -246,7 +246,7 @@ int main(int argc, char* argv[])
shipEntity.emplace<Nz::GraphicsComponent>(model);
auto& shipNode = shipEntity.emplace<Nz::NodeComponent>();
shipNode.SetPosition(xRandom(rd), yRandom(rd), zRandom(rd));
shipNode.SetPosition({ xRandom(rd), yRandom(rd), zRandom(rd) });
Nz::RigidBody3D::DynamicSettings settings;
settings.geom = shipCollider;