Sampler.h 447 Bytes
Newer Older
Nianchen Deng's avatar
Nianchen Deng committed
1
#pragma once
Nianchen Deng's avatar
sync    
Nianchen Deng committed
2
#include "../utils/common.h"
Nianchen Deng's avatar
Nianchen Deng committed
3

Nianchen Deng's avatar
sync    
Nianchen Deng committed
4
class Sampler {
Nianchen Deng's avatar
Nianchen Deng committed
5
public:
Nianchen Deng's avatar
Nianchen Deng committed
6
    Sampler(glm::vec2 depthRange, unsigned int samples, bool outputRadius)
Nianchen Deng's avatar
sync    
Nianchen Deng committed
7
        : _dispRange(1.0f / depthRange, samples), _outputRadius(outputRadius) {}
Nianchen Deng's avatar
Nianchen Deng committed
8

Nianchen Deng's avatar
sync    
Nianchen Deng committed
9
10
    void sampleOnRays(sptr<CudaArray<float>> o_coords, sptr<CudaArray<float>> o_depths,
                      sptr<CudaArray<glm::vec3>> rays, glm::vec3 rayCenter);
Nianchen Deng's avatar
Nianchen Deng committed
11
12

private:
Nianchen Deng's avatar
sync    
Nianchen Deng committed
13
14
    Range _dispRange;
    bool _outputRadius;
Nianchen Deng's avatar
Nianchen Deng committed
15
};