blob: c72ff692767219cfec3c378d48fe94e5f8c62c49 (
plain) (
blame)
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
|
/*
* ElementRenderer.h
*
* Created on: Apr 2, 2011
* Author: jakob
*/
#ifndef ELEMENTRENDERER_H_
#define ELEMENTRENDERER_H_
#include "Renderer.h"
#include "ElementVisitor.h"
#include "Element.h"
namespace vhc {
class ElementRenderer: public ElementVisitor, public Renderer<Element> {
private:
static const int SLICES = 100;
static const int STACKS_PER_LENGTH = 20;
void drawStraight(const StraightElement* straight) const;
public:
ElementRenderer();
virtual ~ElementRenderer();
virtual void render(const Element& element) const;
virtual void visit(const StraightElement* straight) const ;
virtual void visit(const Quadrupole* quadrupole) const;
virtual void visit(const Dipole* dipole) const;
};
}
#endif /* ELEMENTRENDERER_H_ */
|