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
52
53
54
55
|
#ifndef JSFILE_H
#define JSFILE_H
#include <fstream>
#include <glm/glm.hpp>
#include "common.h"
#include "triple.h"
#include "locate.h"
#include "prcfile.h"
namespace gl {
extern glm::mat4 projViewMat;
}
namespace camp {
class jsfile {
jsofstream out;
public:
jsfile() {}
~jsfile();
void open(string name);
void copy(string name);
void addColor(const prc::RGBAColour& c);
void addIndices(const uint32_t *I);
void addPatch(const triple* controls, size_t n, const triple& Min,
const triple& Max, const prc::RGBAColour *colors);
void addCurve(const triple& z0, const triple& c0,
const triple& c1, const triple& z1,
const triple& Min, const triple& Max);
void addCurve(const triple& z0, const triple& z1,
const triple& Min, const triple& Max);
void addPixel(const triple& z0, double width,
const triple& Min, const triple& Max);
void addMaterial(size_t index);
void addTriangles(size_t nP, const triple* P, size_t nN, const triple* N,
size_t nC, const prc::RGBAColour* C, size_t nI,
const uint32_t (*PI)[3], const uint32_t (*NI)[3],
const uint32_t (*CI)[3],
const triple& Min, const triple& Max);
};
} //namespace camp
#endif
|