cgv
|
Classes | |
struct | Point |
Public Member Functions | |
render_style * | create_render_style () const |
bool | init (context &ctx) |
bool | enable (context &ctx) |
sets most uniforms | |
bool | enable (context &ctx, const mat4 &reduction_model_view_matrix) |
bool | enable_buffer_manager (clod_point_buffer_manager &manager) |
void | disable_buffer_manager () |
bool | disable (context &ctx) |
void | clear (cgv::render::context &ctx) |
void | draw (context &ctx, size_t start=0, size_t count=0) |
reduces and renders the input by calling reduce_points and draw_points | |
bool | render (context &ctx, size_t start, size_t count) |
void | set_points (cgv::render::context &ctx, const Point *pnts, const size_t num_points) |
this method can be used if the data format of pnts matches with the internal format given by the Point struct | |
void | set_points (cgv::render::context &ctx, const vec3 *positions, const rgb8 *colors, const uint8_t *lods, const size_t num_points, const unsigned stride=0) |
to use the clod point renderer lods are required, to generate them use the classes inside libs/pointcloud/octree.h | |
void | set_frustum_extend (const float &fe) |
void | set_max_drawn_points (cgv::render::context &ctx, const unsigned max_points) |
void | set_pivot_point (const vec4 &pivot) |
void | set_render_style (const render_style &rs) |
void | manage_singelton (context &ctx, const std::string &renderer_name, int &ref_count, int ref_count_change) |
void | set_prog (shader_program &one_shot_prog) |
set a custom shader program that is used for one enable disable cycle | |
void | reduce_buffer_init (context &ctx, bool reset_parameters=true) |
initializes reduce, | |
void | reduce_buffer (context &ctx, const GLuint buffer, const GLuint point_id_buffer, size_t start, size_t count) |
reduces a provided opengl buffer | |
void | reduce_buffer_finish (context &ctx) |
synchronizes and disables the shader prog. | |
void | reduce_points (context &ctx, size_t start, size_t count) |
run point reduction step on the input data, you need to call enable first | |
void | reduce_chunks (context &ctx, const uint32_t *chunk_starts, const uint32_t *chunk_point_counts, const uint32_t *reduction_sources, uint32_t num_reduction_sources) |
do a point reduction over preselected segments of the input buffer | |
void | draw_points (context &ctx) |
render reduced points, you need to call reduce_points first to fill the render_buffer | |
unsigned int | num_reduced_points () |
gives the number of points written to the reduction buffer | |
Protected Member Functions | |
const render_style * | get_style_ptr () const |
template<typename T > | |
const T & | get_style () const |
Definition at line 95 of file clod_point_renderer.h.
cgv::render::clod_point_renderer::clod_point_renderer | ( | ) |
Definition at line 165 of file clod_point_renderer.cxx.
void cgv::render::clod_point_renderer::clear | ( | cgv::render::context & | ctx | ) |
Definition at line 297 of file clod_point_renderer.cxx.
render_style * cgv::render::clod_point_renderer::create_render_style | ( | ) | const |
Definition at line 170 of file clod_point_renderer.cxx.
bool cgv::render::clod_point_renderer::disable | ( | context & | ctx | ) |
Definition at line 285 of file clod_point_renderer.cxx.
void cgv::render::clod_point_renderer::disable_buffer_manager | ( | ) |
Definition at line 304 of file clod_point_renderer.cxx.
void cgv::render::clod_point_renderer::draw | ( | context & | ctx, |
size_t | start = 0 , |
||
size_t | count = 0 |
||
) |
reduces and renders the input by calling reduce_points and draw_points
Definition at line 309 of file clod_point_renderer.cxx.
References draw_points(), and reduce_points().
void cgv::render::clod_point_renderer::draw_points | ( | context & | ctx | ) |
render reduced points, you need to call reduce_points first to fill the render_buffer
Definition at line 138 of file clod_point_renderer.cxx.
References cgv::render::shader_program::disable(), and cgv::render::shader_program::enable().
Referenced by draw().
bool cgv::render::clod_point_renderer::enable | ( | context & | ctx | ) |
sets most uniforms
Definition at line 279 of file clod_point_renderer.cxx.
References enable(), and cgv::render::context::get_modelview_matrix().
Referenced by enable().
bool cgv::render::clod_point_renderer::enable | ( | context & | ctx, |
const mat4 & | reduction_model_view_matrix | ||
) |
Definition at line 209 of file clod_point_renderer.cxx.
bool cgv::render::clod_point_renderer::enable_buffer_manager | ( | clod_point_buffer_manager & | manager | ) |
Definition at line 362 of file clod_point_renderer.cxx.
|
inlineprotected |
Definition at line 191 of file clod_point_renderer.h.
|
protected |
Definition at line 155 of file clod_point_renderer.cxx.
bool cgv::render::clod_point_renderer::init | ( | context & | ctx | ) |
Definition at line 175 of file clod_point_renderer.cxx.
void cgv::render::clod_point_renderer::manage_singelton | ( | context & | ctx, |
const std::string & | renderer_name, | ||
int & | ref_count, | ||
int | ref_count_change | ||
) |
Definition at line 395 of file clod_point_renderer.cxx.
unsigned int cgv::render::clod_point_renderer::num_reduced_points | ( | ) |
gives the number of points written to the reduction buffer
Definition at line 441 of file clod_point_renderer.cxx.
void cgv::render::clod_point_renderer::reduce_buffer | ( | context & | ctx, |
const GLuint | buffer, | ||
const GLuint | point_id_buffer, | ||
size_t | start, | ||
size_t | count | ||
) |
reduces a provided opengl buffer
Definition at line 60 of file clod_point_renderer.cxx.
References cgv::render::shader_program::set_uniform().
void cgv::render::clod_point_renderer::reduce_buffer_finish | ( | context & | ctx | ) |
synchronizes and disables the shader prog.
Definition at line 78 of file clod_point_renderer.cxx.
References cgv::render::shader_program::disable().
void cgv::render::clod_point_renderer::reduce_buffer_init | ( | context & | ctx, |
bool | reset_parameters = true |
||
) |
initializes reduce,
enables the reduction compute shader and sets invariant uniforms
reset_parameters | : resets draw parameter buffer |
Definition at line 46 of file clod_point_renderer.cxx.
References cgv::render::shader_program::enable(), cgv::render::shader_program::set_uniform(), and cgv::render::clod_point_buffer_manager::size().
void cgv::render::clod_point_renderer::reduce_chunks | ( | context & | ctx, |
const uint32_t * | chunk_starts, | ||
const uint32_t * | chunk_point_counts, | ||
const uint32_t * | reduction_sources, | ||
uint32_t | num_reduction_sources | ||
) |
do a point reduction over preselected segments of the input buffer
chunk_starts | index of the first point in a chunk |
chunk_point_counts | number of points in each chunk |
reduction_sources | ids of chunks considered for reduction |
Definition at line 113 of file clod_point_renderer.cxx.
References cgv::render::shader_program::disable(), cgv::render::shader_program::enable(), cgv::render::shader_program::set_uniform(), and cgv::render::clod_point_buffer_manager::size().
void cgv::render::clod_point_renderer::reduce_points | ( | context & | ctx, |
size_t | start, | ||
size_t | count | ||
) |
run point reduction step on the input data, you need to call enable first
Definition at line 84 of file clod_point_renderer.cxx.
References cgv::render::shader_program::disable(), cgv::render::shader_program::enable(), cgv::render::shader_program::set_uniform(), and cgv::render::clod_point_buffer_manager::size().
Referenced by draw().
bool cgv::render::clod_point_renderer::render | ( | context & | ctx, |
size_t | start, | ||
size_t | count | ||
) |
Definition at line 315 of file clod_point_renderer.cxx.
void cgv::render::clod_point_renderer::set_frustum_extend | ( | const float & | fe | ) |
Definition at line 380 of file clod_point_renderer.cxx.
void cgv::render::clod_point_renderer::set_max_drawn_points | ( | cgv::render::context & | ctx, |
const unsigned | max_points | ||
) |
Definition at line 373 of file clod_point_renderer.cxx.
void cgv::render::clod_point_renderer::set_pivot_point | ( | const vec4 & | pivot | ) |
Definition at line 385 of file clod_point_renderer.cxx.
void cgv::render::clod_point_renderer::set_points | ( | cgv::render::context & | ctx, |
const Point * | pnts, | ||
const size_t | num_points | ||
) |
this method can be used if the data format of pnts matches with the internal format given by the Point struct
Definition at line 324 of file clod_point_renderer.cxx.
Referenced by set_points().
void cgv::render::clod_point_renderer::set_points | ( | cgv::render::context & | ctx, |
const vec3 * | positions, | ||
const rgb8 * | colors, | ||
const uint8_t * | lods, | ||
const size_t | num_points, | ||
const unsigned | stride = 0 |
||
) |
to use the clod point renderer lods are required, to generate them use the classes inside libs/pointcloud/octree.h
positions | : pointer to first points position |
color | : pointer to first points color |
lods | : pointer to firsts points level of detail |
num_points | : number of points to draw |
stride | : stride in bytes, zero if positions, color and lods are not stored interleaved |
Definition at line 334 of file clod_point_renderer.cxx.
References set_points().
void cgv::render::clod_point_renderer::set_prog | ( | shader_program & | one_shot_prog | ) |
set a custom shader program that is used for one enable disable cycle
Definition at line 420 of file clod_point_renderer.cxx.
void cgv::render::clod_point_renderer::set_render_style | ( | const render_style & | rs | ) |
Definition at line 390 of file clod_point_renderer.cxx.