LibreOffice Module vcl (master)  1
LineRenderUtils.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  */
10 
11 #ifndef INCLUDED_VCL_INC_OPENGL_LINERENDERUTILS_H
12 #define INCLUDED_VCL_INC_OPENGL_LINERENDERUTILS_H
13 
14 #include <opengl/RenderList.hxx>
15 
16 namespace vcl
17 {
19 {
20 private:
21  std::vector<Vertex>& mrVertices;
22  std::vector<GLuint>& mrIndices;
23  GLubyte mR, mG, mB, mA;
24  GLfloat const mfLineWidth;
25  GLfloat const mfLineWidthAndAA;
26  size_t const mnInitialIndexSize;
28 
29 public:
30  LineBuilder(std::vector<Vertex>& rVertices, std::vector<GLuint>& rIndices,
31  Color nColor, GLfloat fTransparency,
32  GLfloat fLineWidth, bool bUseAA);
33 
34  void appendLineSegment(const glm::vec2& rPoint1, const glm::vec2& rNormal1, GLfloat aExtrusion1,
35  const glm::vec2& rPoint2, const glm::vec2& rNormal2, GLfloat aExtrusion2);
36 
37  void appendLine(const glm::vec2& rPoint1, const glm::vec2& rPoint2);
38 
39  void appendAndConnectLinePoint(const glm::vec2& rPoint, const glm::vec2& aNormal, GLfloat aExtrusion);
40 
41  void appendMiterJoint(glm::vec2 const& point, const glm::vec2& prevLineVector,
42  glm::vec2 const& nextLineVector);
43  void appendBevelJoint(glm::vec2 const& point, const glm::vec2& prevLineVector,
44  const glm::vec2& nextLineVector);
45  void appendRoundJoint(glm::vec2 const& point, const glm::vec2& prevLineVector,
46  const glm::vec2& nextLineVector);
47  void appendRoundLineCapVertices(const glm::vec2& rPoint1, const glm::vec2& rPoint2);
48  void appendSquareLineCapVertices(const glm::vec2& rPoint1, const glm::vec2& rPoint2);
49 };
50 
51 } // end vcl
52 
53 #endif // INCLUDED_VCL_INC_OPENGL_LINERENDERUTILS_H
54 
55 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void appendBevelJoint(glm::vec2 const &point, const glm::vec2 &prevLineVector, const glm::vec2 &nextLineVector)
LineBuilder(std::vector< Vertex > &rVertices, std::vector< GLuint > &rIndices, Color nColor, GLfloat fTransparency, GLfloat fLineWidth, bool bUseAA)
void appendRoundJoint(glm::vec2 const &point, const glm::vec2 &prevLineVector, const glm::vec2 &nextLineVector)
std::vector< GLuint > & mrIndices
void appendMiterJoint(glm::vec2 const &point, const glm::vec2 &prevLineVector, glm::vec2 const &nextLineVector)
void appendRoundLineCapVertices(const glm::vec2 &rPoint1, const glm::vec2 &rPoint2)
void appendLineSegment(const glm::vec2 &rPoint1, const glm::vec2 &rNormal1, GLfloat aExtrusion1, const glm::vec2 &rPoint2, const glm::vec2 &rNormal2, GLfloat aExtrusion2)
void appendLine(const glm::vec2 &rPoint1, const glm::vec2 &rPoint2)
std::vector< Vertex > & mrVertices
void appendAndConnectLinePoint(const glm::vec2 &rPoint, const glm::vec2 &aNormal, GLfloat aExtrusion)
GLfloat const mfLineWidthAndAA
size_t const mnInitialIndexSize
void appendSquareLineCapVertices(const glm::vec2 &rPoint1, const glm::vec2 &rPoint2)
GLfloat const mfLineWidth