KiCad PCB EDA Suite
|
Container to manage a vector of triangles. More...
#include <layer_triangles.h>
Public Member Functions | |
TRIANGLE_LIST (unsigned int aNrReservedTriangles, bool aReserveNormals) | |
void | Reserve_More (unsigned int aNrReservedTriangles, bool aReserveNormals) |
Reserve more triangles. | |
void | AddTriangle (const SFVEC3F &aV1, const SFVEC3F &aV2, const SFVEC3F &aV3) |
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) |
void | AddNormal (const SFVEC3F &aN1, const SFVEC3F &aN2, const SFVEC3F &aN3, const SFVEC3F &aN4) |
const float * | GetVertexPointer () const |
Get the array of vertices. | |
const float * | GetNormalsPointer () const |
Get the array of normals. | |
unsigned int | GetVertexSize () const |
unsigned int | GetNormalsSize () const |
Private Attributes | |
SFVEC3F_VECTOR | m_vertexs |
vertex array | |
SFVEC3F_VECTOR | m_normals |
normals array | |
Container to manage a vector of triangles.
Definition at line 43 of file layer_triangles.h.
TRIANGLE_LIST::TRIANGLE_LIST | ( | unsigned int | aNrReservedTriangles, |
bool | aReserveNormals | ||
) |
aNrReservedTriangles | is number of triangles expected to be used. |
aReserveNormals | if you use normals, set it to bool to reserve space. |
Definition at line 31 of file layer_triangles.cpp.
Definition at line 75 of file layer_triangles.cpp.
References m_normals.
Referenced by TRIANGLE_DISPLAY_LIST::AddToMiddleContourns().
void TRIANGLE_LIST::AddNormal | ( | const SFVEC3F & | aN1, |
const SFVEC3F & | aN2, | ||
const SFVEC3F & | aN3, | ||
const SFVEC3F & | aN4 | ||
) |
Definition at line 82 of file layer_triangles.cpp.
References m_normals.
void TRIANGLE_LIST::AddQuad | ( | const SFVEC3F & | aV1, |
const SFVEC3F & | aV2, | ||
const SFVEC3F & | aV3, | ||
const SFVEC3F & | aV4 | ||
) |
Definition at line 54 of file layer_triangles.cpp.
References m_vertexs.
Referenced by RENDER_3D_OPENGL::addObjectTriangles(), TRIANGLE_DISPLAY_LIST::AddToMiddleContourns(), and RENDER_3D_OPENGL::generateCylinder().
Definition at line 67 of file layer_triangles.cpp.
References m_vertexs.
Referenced by RENDER_3D_OPENGL::addObjectTriangles(), and RENDER_3D_OPENGL::addTopAndBottomTriangles().
|
inline |
Get the array of normals.
Definition at line 79 of file layer_triangles.h.
References m_normals.
Referenced by OPENGL_RENDER_LIST::generate_middle_triangles().
|
inline |
Definition at line 83 of file layer_triangles.h.
References m_normals.
Referenced by OPENGL_RENDER_LIST::generate_middle_triangles(), OPENGL_RENDER_LIST::generate_top_or_bot_seg_ends(), and OPENGL_RENDER_LIST::generate_top_or_bot_triangles().
|
inline |
Get the array of vertices.
Definition at line 72 of file layer_triangles.h.
References m_vertexs.
Referenced by OPENGL_RENDER_LIST::generate_middle_triangles(), OPENGL_RENDER_LIST::generate_top_or_bot_seg_ends(), and OPENGL_RENDER_LIST::generate_top_or_bot_triangles().
|
inline |
Definition at line 81 of file layer_triangles.h.
References m_vertexs.
Referenced by OPENGL_RENDER_LIST::generate_middle_triangles(), OPENGL_RENDER_LIST::generate_top_or_bot_seg_ends(), OPENGL_RENDER_LIST::generate_top_or_bot_triangles(), and OPENGL_RENDER_LIST::OPENGL_RENDER_LIST().
void TRIANGLE_LIST::Reserve_More | ( | unsigned int | aNrReservedTriangles, |
bool | aReserveNormals | ||
) |
Reserve more triangles.
Definition at line 45 of file layer_triangles.cpp.
References m_normals, and m_vertexs.
Referenced by TRIANGLE_DISPLAY_LIST::AddToMiddleContourns().
|
private |
normals array
Definition at line 87 of file layer_triangles.h.
Referenced by AddNormal(), GetNormalsPointer(), GetNormalsSize(), Reserve_More(), and TRIANGLE_LIST().
|
private |
vertex array
Definition at line 86 of file layer_triangles.h.
Referenced by AddQuad(), AddTriangle(), GetVertexPointer(), GetVertexSize(), Reserve_More(), and TRIANGLE_LIST().