36 #include "pteros/core/system.h"
42 struct MyAstAnnotation {
43 bool is_coord_dependent;
44 std::vector<int> precomputed;
48 typedef peg::AstBase<MyAstAnnotation> MyAst;
49 typedef std::function<void(std::vector<int>&)> result_func_t;
76 void apply_ast(std::size_t fr, std::vector<int>& result);
80 std::shared_ptr<MyAst> tree;
87 void eval_node(
const std::shared_ptr<MyAst> &node, std::vector<int>& result);
88 std::function<float(
int)> get_numeric(
const std::shared_ptr<MyAst>& node);
89 Eigen::Vector3f get_vector(
const std::shared_ptr<MyAst> &node);
91 std::vector<int>* starting_subset;
92 std::vector<int>* current_subset;
94 void precompute(std::shared_ptr<MyAst> &node);
95 void optimize_numeric(std::shared_ptr<MyAst> &node);