Updated to use komputesummator class

This commit is contained in:
Alejandro Saucedo 2020-09-20 15:20:03 +01:00
parent b5bdb2e7d1
commit 6ff55d4f3f
16 changed files with 95 additions and 121 deletions

View file

@ -0,0 +1,37 @@
#pragma once
#include <Godot.hpp>
#include <Node2D.hpp>
#include <memory>
#include "kompute/Kompute.hpp"
namespace godot {
class KomputeSummator : public Node2D {
private:
GODOT_CLASS(KomputeSummator, Node2D);
public:
KomputeSummator();
void add(float value);
void reset();
float get_total() const;
void _process(float delta);
void _init();
static void _register_methods();
protected:
//static void _bind_methods();
private:
kp::Manager mManager;
std::weak_ptr<kp::Sequence> mSequence;
std::shared_ptr<kp::Tensor> mPrimaryTensor;
std::shared_ptr<kp::Tensor> mSecondaryTensor;
};
}