1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#pragma once
#ifndef __Obstacles__
#define __Obstacles__

#define EIGEN_DONT_ALIGN_STATICALLY
#include <Eigen/Dense>

#include <vector>
#include <memory>

class Points;
class Box;
class Shape;

#ifdef EOLC_ONLINE
class MatrixStack;
class Program;
#endif // EOLC_ONLINE

class Obstacles
{
public:
	EIGEN_MAKE_ALIGNED_OPERATOR_NEW

	Obstacles();
	virtual ~Obstacles() {};

	int num_boxes;
	double cdthreshold;
	std::shared_ptr<Points> points;
	std::vector<std::shared_ptr<Box> > boxes;
	std::vector<std::shared_ptr<Shape> > shapes;

	void load(const std::string &RESOURCE_DIR);
	void step(double h);

#ifdef EOLC_ONLINE
	void draw(std::shared_ptr<MatrixStack> MV, const std::shared_ptr<Program> p) const;
	void drawSimple(std::shared_ptr<MatrixStack> MV, const std::shared_ptr<Program> p) const;
	void init();
#endif // EOLC_ONLINE



private:

};

#endif