Stellarium 0.11.4
Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · File Structure

StelVertexArray Struct Reference

List of all members.

Public Types

enum  StelPrimitiveType {
  Points = 0x0000, Lines = 0x0001, LineLoop = 0x0002, LineStrip = 0x0003,
  Triangles = 0x0004, TriangleStrip = 0x0005, TriangleFan = 0x0006
}

Public Member Functions

 StelVertexArray (StelPrimitiveType pType=StelVertexArray::Triangles)
 StelVertexArray (const QVector< Vec3d > &v, StelPrimitiveType pType=StelVertexArray::Triangles, const QVector< Vec2f > &t=QVector< Vec2f >(), const QVector< unsigned int > i=QVector< unsigned int >())
bool isIndexed () const
bool isTextured () const
template<class Func >
Func foreachTriangle (Func func) const
 call a function for each triangle of the array.
StelVertexArray removeDiscontinuousTriangles (const class StelProjector *prj) const
 Create a copy of the array with all the triangles intersecting the projector discontinuty removed.

Public Attributes

QVector< Vec3dvertex
 OpenGL compatible array of 3D vertex to be displayed using vertex arrays.
QVector< Vec2ftexCoords
 OpenGL compatible array of edge flags to be displayed using vertex arrays.
QVector< unsigned int > indices
 OpenGL compatible array of indices for the vertex and the textures.
StelPrimitiveType primitiveType

Member Function Documentation

template<class Func >
Func StelVertexArray::foreachTriangle ( Func  func  )  const [inline]

call a function for each triangle of the array.

func should define the following method : void operator() (const Vec3d* vertex[3], const Vec2f* tex[3], unsigned int indices[3]) The method takes arrays of *pointers* as arguments because we can't assume the values are contiguous

StelVertexArray StelVertexArray::removeDiscontinuousTriangles ( const class StelProjector prj  )  const

Create a copy of the array with all the triangles intersecting the projector discontinuty removed.


Member Data Documentation

QVector<unsigned int> StelVertexArray::indices

OpenGL compatible array of indices for the vertex and the textures.

OpenGL compatible array of edge flags to be displayed using vertex arrays.

OpenGL compatible array of 3D vertex to be displayed using vertex arrays.

TODO, move to float? Most of the vectors are normalized, thus the precision is around 1E-45 using float which is enough (=2E-37 milli arcsec).

Generated on Sat Aug 25 22:13:34 2012 for Stellarium by  doxygen 1.6.3