Apollo  6.0
Open source self driving car software
Public Member Functions | Protected Member Functions | List of all members
Grid Class Reference

#include <grid.h>

Inheritance diagram for Grid:
Inheritance graph
Collaboration diagram for Grid:
Collaboration graph

Public Member Functions

 Grid (int cellCountBySide=1)
 
 ~Grid ()
 
GLenum GetPrimitiveType (void) const
 
void SetupExtraUniforms (void)
 
int red (void) const
 
int green (void) const
 
int blue (void) const
 
const QColor & grid_color (void) const
 
void set_grid_color (const QColor &color)
 
void SetCellCount (int cellCount)
 
int CellCount (void) const
 
- Public Member Functions inherited from RenderableObject
 RenderableObject (int vertex_count=1, int vertex_element_count=3, const std::shared_ptr< QOpenGLShaderProgram > &shaderProgram=NullRenderableObj)
 
virtual ~RenderableObject (void)
 
bool is_renderable (void) const
 
void set_is_renderable (bool b)
 
int vertex_count (void) const
 
void set_vertex_count (int vertexCount)
 
int vertex_element_count (void) const
 
void set_vertex_element_count (int vertexElementCount)
 
int VertexBufferSize (void) const
 
void set_shader_program (const std::shared_ptr< QOpenGLShaderProgram > &shaderProgram)
 
bool haveShaderProgram (void)
 
bool Init (std::shared_ptr< QOpenGLShaderProgram > &shaderProgram=NullRenderableObj)
 
void Destroy (void)
 
void Render (const QMatrix4x4 *mvp=nullptr)
 

Protected Member Functions

virtual bool FillVertexBuffer (GLfloat *pBuffer)
 
- Protected Member Functions inherited from RenderableObject
virtual void Draw (void)
 
virtual void SetupAllAttrPointer (void)
 

Additional Inherited Members

- Static Public Member Functions inherited from RenderableObject
static std::shared_ptr< QOpenGLShaderProgram > CreateShaderProgram (const QString &vertexShaderFileName, const QString &fragShaderFileName)
 
- Static Public Attributes inherited from RenderableObject
static std::shared_ptr< QOpenGLShaderProgram > NullRenderableObj
 
- Protected Attributes inherited from RenderableObject
bool is_init_
 
bool is_renderable_
 
int vertex_count_
 
int vertex_element_count_
 
std::shared_ptr< QOpenGLShaderProgram > shader_program_
 
QOpenGLVertexArrayObject vao_
 
QOpenGLBuffer vbo_
 

Constructor & Destructor Documentation

◆ Grid()

Grid::Grid ( int  cellCountBySide = 1)
explicit

◆ ~Grid()

Grid::~Grid ( )
inline

Member Function Documentation

◆ blue()

int Grid::blue ( void  ) const
inline

◆ CellCount()

int Grid::CellCount ( void  ) const
inline

◆ FillVertexBuffer()

virtual bool Grid::FillVertexBuffer ( GLfloat *  pBuffer)
protectedvirtual

Implements RenderableObject.

◆ GetPrimitiveType()

GLenum Grid::GetPrimitiveType ( void  ) const
inlinevirtual

Implements RenderableObject.

◆ green()

int Grid::green ( void  ) const
inline

◆ grid_color()

const QColor& Grid::grid_color ( void  ) const
inline

◆ red()

int Grid::red ( void  ) const
inline

◆ set_grid_color()

void Grid::set_grid_color ( const QColor &  color)
inline

◆ SetCellCount()

void Grid::SetCellCount ( int  cellCount)
inline

◆ SetupExtraUniforms()

void Grid::SetupExtraUniforms ( void  )
inlinevirtual

Reimplemented from RenderableObject.


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