-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
canerenderdata.cpp
51 lines (40 loc) · 982 Bytes
/
canerenderdata.cpp
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
50
51
#include <time.h>
#include "glasscolor.h"
#include "cane.h"
#include "geometry.h"
#include "mesh.h"
#include "canerenderdata.h"
#include "globalgraphicssetting.h"
#include <tr1/unordered_map>
#include <tr1/unordered_set>
using std::tr1::unordered_map;
using std::tr1::unordered_set;
using std::pair;
using std::make_pair;
using std::vector;
CaneRenderData::CaneRenderData(Cane const *_cane) : cane(deep_copy(_cane))
{
}
CaneRenderData::~CaneRenderData()
{
deep_delete(cane);
cane = NULL;
}
Geometry *CaneRenderData::getGeometry()
{
Geometry *geom = new Geometry();
generateMesh(cane, geom, GlobalGraphicsSetting::HIGH);
return geom;
}
GlassColorRenderData::GlassColorRenderData(GlassColor const *_glassColor) : glassColor(deep_copy(_glassColor))
{
}
GlassColorRenderData::~GlassColorRenderData()
{
}
Geometry *GlassColorRenderData::getGeometry()
{
Geometry *geom = new Geometry();
generateMesh(glassColor, geom, GlobalGraphicsSetting::HIGH);
return geom;
}