Skip to content
Snippets Groups Projects

Implements #216 triangle renderer

Merged Nicolas Pope requested to merge feature/216/triangles into master
2 files
+ 12
43
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -10,12 +10,8 @@ namespace ftl {
namespace render {
/**
* Render the voxel hash structure by generating image points for surface
* voxels and expanding those into interpolated splats. This is a two pass
* algorithm with the option of completing the second pass on a separate GPU.
* It also possible to only complete the first pass and perform the second step
* on a separate machine or at a later time, the advantage being to save local
* processing resources and that the first pass result may compress better.
* Generate triangles between connected points and render those. Colour is done
* by weighted reprojection to the original source images.
*/
class Triangular : public ftl::render::Renderer {
public:
@@ -30,15 +26,6 @@ class Triangular : public ftl::render::Renderer {
private:
int device_;
/*ftl::cuda::TextureObject<int> depth1_;
ftl::cuda::TextureObject<int> depth3_;
ftl::cuda::TextureObject<uchar4> colour1_;
ftl::cuda::TextureObject<float4> colour_tmp_;
ftl::cuda::TextureObject<float> depth2_;
ftl::cuda::TextureObject<uchar4> colour2_;
ftl::cuda::TextureObject<float4> normal1_;*/
//SplatParams params_;
ftl::rgbd::Frame temp_;
ftl::rgbd::Frame accum_;
ftl::rgbd::FrameSet *scene_;
@@ -47,7 +34,7 @@ class Triangular : public ftl::render::Renderer {
float norm_filter_;
bool backcull_;
cv::Scalar background_;
bool splat_;
bool mesh_;
float3 light_dir_;
uchar4 light_diffuse_;
uchar4 light_ambient_;
@@ -55,10 +42,6 @@ class Triangular : public ftl::render::Renderer {
cudaStream_t stream_;
float3 light_pos_;
//template <typename T>
//void __blendChannel(ftl::rgbd::Frame &, ftl::codecs::Channel in, ftl::codecs::Channel out, cudaStream_t);
//void _blendChannel(ftl::rgbd::Frame &, ftl::codecs::Channel in, ftl::codecs::Channel out, cudaStream_t);
template <typename T>
void __reprojectChannel(ftl::rgbd::Frame &, ftl::codecs::Channel in, ftl::codecs::Channel out, cudaStream_t);
void _reprojectChannel(ftl::rgbd::Frame &, ftl::codecs::Channel in, ftl::codecs::Channel out, cudaStream_t);
Loading