25#ifndef TRIANGLE_DISPLAY_LIST_H
26#define TRIANGLE_DISPLAY_LIST_H
28#include "../../common_ogl/openGL_includes.h"
51 TRIANGLE_LIST(
unsigned int aNrReservedTriangles,
bool aReserveNormals );
56 void Reserve_More(
unsigned int aNrReservedTriangles,
bool aReserveNormals );
115 double aBiuTo3Du,
bool aInvertFaceDirection,
119 double aBiuTo3Du,
bool aInvertFaceDirection,
123 float zTop,
bool aInvertFaceDirection,
152 GLuint aTextureIndexForSegEnds,
float aZBot,
float aZTop );
187 void DrawAll(
bool aDrawMiddle =
true )
const;
215 bool aIsNormalUp, GLuint aTextureId )
const;
218 bool aIsNormalUp )
const;
Store the OpenGL display lists to related with a layer.
float m_zPositionTransformation
GLuint generate_middle_triangles(const TRIANGLE_LIST *aTriangleContainer) const
bool m_haveTransformation
bool m_draw_it_transparent
void ClearScalePosition()
GLuint m_layer_middle_contourns_quads
void beginTransformation() const
void DrawMiddle() const
Call the display lists for the middle elements.
GLuint generate_top_or_bot_seg_ends(const TRIANGLE_LIST *aTriangleContainer, bool aIsNormalUp, GLuint aTextureId) const
GLuint m_layer_bot_segment_ends
void DrawTop() const
Call the display lists for the top elements.
GLuint m_layer_bot_triangles
void DrawBot() const
Call the display lists for the bottom elements.
void ApplyScalePosition(float aZposition, float aZscale)
GLuint m_layer_top_triangles
GLuint generate_top_or_bot_triangles(const TRIANGLE_LIST *aTriangleContainer, bool aIsNormalUp) const
void setBlendfunction() const
void DrawBotAndMiddle() const
Call the display lists for the bottom elements and middle contours.
void SetItIsTransparent(bool aSetTransparent)
void DrawCulled(bool aDrawMiddle, const OPENGL_RENDER_LIST *aSubtractList=nullptr, const OPENGL_RENDER_LIST *bSubtractList=nullptr, const OPENGL_RENDER_LIST *cSubtractList=nullptr, const OPENGL_RENDER_LIST *dSubtractList=nullptr) const
Draw all layers if they are visible by the camera if camera position is above the layer.
void endTransformation() const
~OPENGL_RENDER_LIST()
Destroy this class while free the display lists from GPU memory.
float m_zScaleTransformation
GLuint m_layer_top_segment_ends
void DrawTopAndMiddle() const
Call the display lists for the top elements and middle contours.
void DrawAll(bool aDrawMiddle=true) const
Call to draw all the display lists.
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
Represent a set of closed polygons.
Store arrays of triangles to be used to create display lists.
TRIANGLE_LIST * m_layer_bot_segment_ends
TRIANGLE_LIST * m_layer_top_segment_ends
TRIANGLE_LIST * m_layer_bot_triangles
TRIANGLE_LIST * m_layer_top_triangles
std::mutex m_middle_layer_lock
void AddToMiddleContourns(const SHAPE_LINE_CHAIN &outlinePath, float zBot, float zTop, double aBiuTo3Du, bool aInvertFaceDirection, const BVH_CONTAINER_2D *aThroughHoles=nullptr)
bool IsLayersSizeValid()
Check if the vertex arrays of the layers are as expected.
TRIANGLE_LIST * m_layer_middle_contourns_quads
Container to manage a vector of triangles.
void AddTriangle(const SFVEC3F &aV1, const SFVEC3F &aV2, const SFVEC3F &aV3)
const float * GetVertexPointer() const
Get the array of vertices.
SFVEC3F_VECTOR m_normals
normals array
unsigned int GetNormalsSize() const
void AddQuad(const SFVEC3F &aV1, const SFVEC3F &aV2, const SFVEC3F &aV3, const SFVEC3F &aV4)
void AddNormal(const SFVEC3F &aN1, const SFVEC3F &aN2, const SFVEC3F &aN3)
unsigned int GetVertexSize() const
SFVEC3F_VECTOR m_vertexs
vertex array
const float * GetNormalsPointer() const
Get the array of normals.
void Reserve_More(unsigned int aNrReservedTriangles, bool aReserveNormals)
Reserve more triangles.
std::vector< SFVEC3F > SFVEC3F_VECTOR