Skip to content
Snippets Groups Projects
Select Git revision
  • 0fa0c6d4a6b3c178146a04cad2ce2bc4e7f43e55
  • main default protected
  • correction_video
  • going_further
  • ImprovedMouseInteraction
  • final2023
  • template
  • ModifGUI
8 results

GridIterator.java

Blame
  • Forked from LABOUREL Arnaud / Game of life Template
    Source project has a limited visibility.
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    FixedArray.hpp 1.01 KiB
    #pragma once
    
    #include <kernel/back/component/Physical.hpp>
    #include <kernel/back/engine/PhysicEngine.hpp>
    #include <vector>
    #include <functional>
    
    #include "Fixed.hpp"
    
    namespace megu::kernel {
        class FixedArray : public Physical<PhysicEngine>, public TangibleStatic {
            public:
                std::optional<std::reference_wrapper<const TangibleStatic>> at(const Position &) const;
    
                void push(const Fixed &);
                void erase(const Fixed &);
                void erase(const Position &);
            
                void setCollideLambda(CollideLambda);
                void setUpdateLambda(UpdateLambda);
    
                void update_physic(double) const override;
                void on_collide(Kernel &, const PhysicEngine &, Physical &, double) override;
                void apply(Kernel & k, PhysicEngine &) override;
                void unapply(Kernel & k, PhysicEngine &) override;
    
            private:
                std::map<Position, Fixed> _tangibles;
                CollideLambda _collide;
                UpdateLambda _update;
        };
    }