forked from trestletech/rgl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathABCLineSet.hpp
49 lines (38 loc) · 1.04 KB
/
ABCLineSet.hpp
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
#ifndef ABCLINESET_HPP
#define ABCLINESET_HPP
#include "scene.h"
#include "geom.hpp"
#include "Shape.hpp"
#include "PrimitiveSet.hpp"
#include <map>
namespace rgl {
class ABCLineSet : public LineSet {
private: /* Use parametrization (x,y,z) + s*(a,b,c) */
int nLines;
ARRAY<Vertex> base; /* (x,y,z) */
ARRAY<Vertex> direction; /* (a,b,c) */
public:
ABCLineSet(Material& in_material, int in_nbase, double* in_base, int in_ndir, double* in_dir);
/**
* tell type.
**/
virtual void getTypeName(char* buffer, int buflen) { strncpy(buffer, "abclines", buflen); };
/**
* overload to update segments first.
*/
virtual AABox& getBoundingBox(Subscene* subscene);
/**
* overload to update segments first.
*/
virtual void renderBegin(RenderContext* renderContext);
/**
* update mesh
*/
void updateSegments(const AABox& sceneBBox);
/**
* update then get attributes
*/
void getAttribute(AABox& bbox, AttribID attrib, int first, int count, double* result);
};
} // namespace rgl
#endif // PLANESET_HPP