TazGraph Project v0.1.0
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
LineRenderer Class Reference
Inheritance diagram for LineRenderer:
Inheritance graph
[legend]
Collaboration diagram for LineRenderer:
Collaboration graph
[legend]

Public Member Functions

void init ()
 
void begin ()
 
void end ()
 
void initBatch (Taz::RenderBatch &batch)
 
void drawLine (size_t v_index, const glm::vec3 srcPosition, const glm::vec3 destPosition, const TazColor &srcColor, const TazColor &destColor, const float width=5.0f)
 
void drawRectangle (size_t v_index, const glm::vec2 &rectSize, const glm::vec3 &position, const TazColor &color, const glm::vec3 &mRotation=glm::vec3(0), const float width=5.0f)
 
void drawBox (size_t v_index, const glm::vec3 &rectSize, const glm::vec3 &position, const TazColor &color, const glm::vec3 &mRotation=glm::vec3(0), const float width=5.0f)
 
void drawSphere (size_t v_index, const glm::vec3 &rectSize, const glm::vec3 &position, const TazColor &color, const glm::vec3 &mRotation, const float width)
 
void drawCircle (const glm::vec2 &center, const TazColor &color, float radius)
 
void endBatch (const Taz::RenderBatch &batch)
 
void dispose ()
 

Public Attributes

const char * VERT_SRC
 
const char * FRAG_SRC
 
int box_edgePairs [12][2]
 
std::vector< TazPosition > sphereVertices
 
std::vector< GLuint > sphereIndices
 
- Public Attributes inherited from Taz::Renderer
GLuint _vboInstances
 
size_t currentBatchIndex = 0
 

Member Function Documentation

◆ begin()

void LineRenderer::begin ( )
virtual

Reimplemented from Taz::Renderer.

◆ endBatch()

void LineRenderer::endBatch ( const Taz::RenderBatch batch)
virtual

Implements Taz::Renderer.

◆ init()

void LineRenderer::init ( )
virtual

Reimplemented from Taz::Renderer.

Member Data Documentation

◆ box_edgePairs

int LineRenderer::box_edgePairs[12][2]
Initial value:
= {
{0, 1}, {1, 2}, {2, 3}, {3, 0},
{4, 5}, {5, 6}, {6, 7}, {7, 4},
{0, 4}, {1, 5}, {2, 6}, {3, 7}
}

◆ FRAG_SRC

const char* LineRenderer::FRAG_SRC
Initial value:
= R"(#version 400
in vec4 fragmentColor;
out vec4 color; //rgb value
void main() {
color = vec4(fragmentColor.rgb, fragmentColor.a);
})"

◆ sphereIndices

std::vector<GLuint> LineRenderer::sphereIndices
Initial value:
= {
}

◆ sphereVertices

std::vector<TazPosition> LineRenderer::sphereVertices
Initial value:
= {
}

◆ VERT_SRC

const char* LineRenderer::VERT_SRC
Initial value:
= R"(#version 400
in vec3 vertexPosition; //vec3 is array of 3 floats
in vec4 vertexColor;
out vec4 fragmentColor;
uniform mat4 u_ViewProjection;
void main() {
gl_Position = u_ViewProjection * vec4(vertexPosition.xyz, 1.0);
fragmentColor = vertexColor;
})"

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