-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPointCloudView.h
64 lines (49 loc) · 1.59 KB
/
PointCloudView.h
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
56
57
58
59
60
61
62
63
64
#ifndef __POINT_CLOUD_VIEW__
#define __POINT_CLOUD_VIEW__
#include <omega.h>
#include "Dataset.h"
#include "PointCloud.h"
#include "Program.h"
using namespace omega;
class PointCloud;
class PointBatch;
///////////////////////////////////////////////////////////////////////////////
class PointCloudView : public ReferenceType
{
public:
PointCloudView();
~PointCloudView();
void addPointCloud(PointCloud* pc);
void removePointCloud(PointCloud* pc);
void draw(const DrawContext& dc);
void enableColormapper(bool enabled) { myColormapperEnabled = enabled; }
void setColormapper(Program* p);
Program* getMappingProgram() { return myMappingProgram; }
void setColormap(PixelData* colormap);
PixelData* getColormap() { return myColormap; }
void resize(int width, int height);
PixelData* getOutput() { return myOutput; }
void updateChannelBounds(bool useChannelTexture);
void setChannelBounds(float cmin, float cmax);
float getChannelMin() { return myChannelMin; }
float getChannelMax() { return myChannelMax; }
private:
PointCloud::List myPointClouds;
Ref<PixelData> myOutput;
bool myColormapperEnabled;
Ref<PixelData> myColormap;
GpuRef<Texture> myColormapTexture;
// Image render
GpuRef<RenderTarget> myChannelRT;
GpuRef<RenderTarget> myOutputRT;
GpuRef<Texture> myChannelTexture;
GpuRef<GpuArray> myQuad;
GpuRef<GpuDrawCall> myChannelTextureDraw;
Ref<Program> myMappingProgram;
int myWidth;
int myHeight;
float myChannelMin;
float myChannelMax;
bool myUpdateChannelBounds;
};
#endif