All tools now converted to use new net objects

This commit is contained in:
Yousef Khadadeh 2025-12-15 15:36:42 +03:00
parent 45ba26446a
commit 7d1671229b
62 changed files with 492 additions and 481 deletions

View file

@ -1,11 +1,12 @@
#include "EllipseCanvasComponent.hpp"
#include "CanvasComponent.hpp"
#include "Helpers/ConvertVec.hpp"
#include "Helpers/SCollision.hpp"
#include <include/core/SkPathBuilder.h>
#include "../DrawCollision.hpp"
CanvasComponent::CompType EllipseCanvasComponent::get_type() const {
return CompType::ELLIPSE;
CanvasComponentType EllipseCanvasComponent::get_type() const {
return CanvasComponentType::ELLIPSE;
}
void EllipseCanvasComponent::save(cereal::PortableBinaryOutputArchive& a) const {
@ -51,6 +52,11 @@ void EllipseCanvasComponent::initialize_draw_data(DrawingProgram& drawP) {
create_collider();
}
void EllipseCanvasComponent::set_data_from(const CanvasComponent& other) {
auto& otherEllipse = static_cast<const EllipseCanvasComponent&>(other);
d = otherEllipse.d;
}
bool EllipseCanvasComponent::collides_within_coords(const SCollision::ColliderCollection<float>& checkAgainst) const {
return collisionTree.is_collide(checkAgainst);
}