Maria GDK 5.0.0.738
Documentation of native code in develop branch
Loading...
Searching...
No Matches
STK::LineRenderer Class Reference

#include <StkLineRenderer.h>

Public Member Functions

 LineRenderer (std::shared_ptr< ShaderProgramManager > prg_mgr, bool use_geom_shaders=false)
 
void setPoints (const std::vector< STK::Vector3f > &points)
 
void setPoint (int i, const STK::Vector3f &p)
 
void addPoint (const STK::Vector3f &p)
 
int getNumPoints () const
 
const std::vector< STK::Vector3f > & getPoints () const
 
const STK::Vector3fgetPoint (int i) const
 
void setUseGeometryShaders (bool use_geom_shaders)
 
bool useGeometryShaders () const
 
void setColor (const STK::Vector4f &c)
 
const STK::Vector4f getColor () const
 
void setThickness (float thickness)
 
float getThickness () const
 
void setMiterLimit (float miter_limit)
 1.0: always miter, -1.0: never miter, 0.75: default
 
float getMiterLimit () const
 
void setDashes (const std::vector< unsigned char > &pattern)
 
void redraw (const STK::Matrix4x4f &mv, const STK::Matrix4x4f &pj, const STK::Viewport &vp)
 

Protected Member Functions

void clearBuffers ()
 
bool initBuffers (const std::vector< STK::Vector3f > &points)
 
bool initShader ()
 
void clearStippleTexture ()
 
void initStippleTexture ()
 
void initBuffersAdj ()
 
bool initShaderAdj ()
 
void redrawAdj (const STK::Matrix4x4f &mv, const STK::Matrix4x4f &pj, const STK::Viewport &vp)
 

Protected Attributes

std::shared_ptr< STK::ShaderProgramManagershader_mgr_
 
std::shared_ptr< STK::ShaderProgramline_shader_
 
int vtx_attrib_id_
 
int next_attrib_id_
 
int prev_attrib_id_
 
GLuint idx_vbo_
 
GLuint vtx_vbo_
 
GLuint next_vbo_
 
GLuint prev_vbo_
 
bool buffers_dirty_
 
STK::Vector4f color_
 
float thickness_
 
float miter_limit_
 
std::vector< STK::Vector3fpoints_
 
int num_idx_
 
float stipple_factor_
 
std::vector< unsigned char > dashes_
 
bool stipple_dirty_
 
GLuint stip_tex_
 
bool use_geom_shaders_
 

Detailed Description

LineRenderer - Short description. Detailed description.

Member Function Documentation

◆ setDashes()

void STK::LineRenderer::setDashes ( const std::vector< unsigned char > &  pattern)
inline

Set stippling as a pattern of alternating dashes and spaces.

◆ setUseGeometryShaders()

void STK::LineRenderer::setUseGeometryShaders ( bool  use_geom_shaders)
inline

Use geometry shaders, if available. This is the most advanced version, and probably the most efficient.


The documentation for this class was generated from the following files: