src/DynSLAM/Evaluation/ErrorVisualizationCallback.cpp
/// \brief Adds a colored circle to the given vertex and color (CPU) buffers.
\brief Adds a colored circle to the given vertex and color (CPU) buffers.
\ brief Adds a colored circle to the given vertex and color ( CPU ) buffers .
void AddCircle(
    float *vertex_data,
    uchar *color_data,
    int &idx_v,
    int &idx_c,
    const Eigen::Vector2f &pos,
    const Eigen::Vector3b &color,
    float radius,
    float aspect_ratio,
    int n_vertices = 25
) {
  const double slice_size = 2 * M_PI / n_vertices;
  for(int i = 0; i < n_vertices;++i) {
    float x_off = static_cast<float>(radius * cos(-i * slice_size));
    float y_off = static_cast<float>(radius * sin(-i * slice_size)) * aspect_ratio;
    vertex_data[idx_v++] = pos(0) + x_off;
    vertex_data[idx_v++] = pos(1) + y_off;
    color_data[idx_c++] = color(0);
    color_data[idx_c++] = color(1);
    color_data[idx_c++] = color(2);
  }
}
void AddCircle ( float * vertex_data , uchar * color_data , int & idx_v , int & idx_c , const Eigen :: Vector2f & pos , const Eigen :: Vector3b & color , float radius , float aspect_ratio , int n_vertices = 25 ) { const double slice_size = 2 * M_PI / n_vertices ; for ( int i = 0 ; i < n_vertices ; ++ i ) { float x_off = static_cast < float > ( radius * cos ( - i * slice_size ) ) ; float y_off = static_cast < float > ( radius * sin ( - i * slice_size ) ) * aspect_ratio ; vertex_data [ idx_v ++ ] = pos ( 0 ) + x_off ; vertex_data [ idx_v ++ ] = pos ( 1 ) + y_off ; color_data [ idx_c ++ ] = color ( 0 ) ; color_data [ idx_c ++ ] = color ( 1 ) ; color_data [ idx_c ++ ] = color ( 2 ) ; } }
\brief Adds a colored circle to the given vertex and color (CPU) buffers.
\ brief Adds a colored circle to the given vertex and color ( CPU ) buffers .