.. _program_listing_file_src_flamegpu_visualiser_LineVis.cpp: Program Listing for File LineVis.cpp ==================================== |exhale_lsh| :ref:`Return to documentation for file ` (``src/flamegpu/visualiser/LineVis.cpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp // @todo - ifdef visualisation #include "flamegpu/visualiser/LineVis.h" namespace flamegpu { namespace visualiser { LineVis::LineVis(std::shared_ptr _l, float r, float g, float b, float a) : currentColor{r, g, b, a} , l(std::move(_l)) { } void LineVis::setColor(float r, float g, float b, float a) { currentColor[0] = r; currentColor[1] = g; currentColor[2] = b; currentColor[3] = a; } void LineVis::addVertex(float x, float y, float z) { // New vertex info l->vertices.push_back(x); l->vertices.push_back(y); l->vertices.push_back(z); // New color info l->colors.push_back(currentColor[0]); l->colors.push_back(currentColor[1]); l->colors.push_back(currentColor[2]); l->colors.push_back(currentColor[3]); } } // namespace visualiser } // namespace flamegpu