25#ifndef TRIANGLE_DISPLAY_LIST_H 
   26#define TRIANGLE_DISPLAY_LIST_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;
 
 
float m_zPositionTransformation
 
GLuint generate_middle_triangles(const TRIANGLE_LIST *aTriangleContainer) const
 
bool m_haveTransformation
 
bool m_draw_it_transparent
 
void ClearScalePosition()
 
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
 
GLuint m_layer_middle_contours_quads
 
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
 
OPENGL_RENDER_LIST(const TRIANGLE_DISPLAY_LIST &aLayerTriangles, GLuint aTextureIndexForSegEnds, float aZBot, float aZTop)
Create the display lists for a layer.
 
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
 
void AddToMiddleContours(const SHAPE_LINE_CHAIN &outlinePath, float zBot, float zTop, double aBiuTo3Du, bool aInvertFaceDirection, const BVH_CONTAINER_2D *aThroughHoles=nullptr)
 
TRIANGLE_LIST * m_layer_middle_contours_quads
 
TRIANGLE_LIST * m_layer_top_segment_ends
 
TRIANGLE_LIST * m_layer_bot_triangles
 
TRIANGLE_DISPLAY_LIST(unsigned int aNrReservedTriangles)
Initialize arrays with reserved triangles.
 
TRIANGLE_LIST * m_layer_top_triangles
 
std::mutex m_middle_layer_lock
 
bool IsLayersSizeValid()
Check if the vertex arrays of the layers are as expected.
 
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.
 
TRIANGLE_LIST(unsigned int aNrReservedTriangles, bool aReserveNormals)
 
void Reserve_More(unsigned int aNrReservedTriangles, bool aReserveNormals)
Reserve more triangles.
 
std::vector< SFVEC3F > SFVEC3F_VECTOR
 
includes in a proper way the openGL related includes