Stellarium  0.17.0
Public Member Functions
ToastGrid Class Reference

Convenience class that can be used to compute the TOAST grid points. More...

#include <StelToastGrid.hpp>

Public Member Functions

 ToastGrid (int maxLevel)
 
QVector< Vec3dgetVertexArray (int level, int x, int y, int resolution) const
 Get the vertex array for a given tile. More...
 
QVector< Vec2fgetTextureArray (int level, int x, int y, int resolution) const
 Get the texture array for a given tile. More...
 
QVector< unsigned short > getTrianglesIndex (int level, int x, int y, int resolution) const
 Get the index of the vertex from getVertexArray sorted as a list of triangles. More...
 
QVector< Vec3dgetPolygon (int level, int x, int y) const
 Returns the polygon contouring a given tile. More...
 
int getMaxLevel () const
 Return the max TOAST level of this grid.
 

Detailed Description

The ToastGrid class allows to compute the vertex arrays associated with TOAST tiles. Each method refers to a tile by its level and x and y coordinates.

Member Function Documentation

QVector<Vec3d> ToastGrid::getPolygon ( int  level,
int  x,
int  y 
) const
Parameters
levelthe TOAST level of the tile.
xthe x coordinate of the tile.
ythe y coordinate of the tile.
QVector<Vec2f> ToastGrid::getTextureArray ( int  level,
int  x,
int  y,
int  resolution 
) const

The position are stored in a grid

Parameters
levelthe TOAST level of the tile.
xthe x coordinate of the tile.
ythe y coordinate of the tile.
resolutionthe resolution of the returned array. TODO: UNITS?
QVector<unsigned short> ToastGrid::getTrianglesIndex ( int  level,
int  x,
int  y,
int  resolution 
) const
Parameters
levelthe TOAST level of the tile.
xthe x coordinate of the tile.
ythe y coordinate of the tile.
resolutionthe resolution of the returned array. TODO: UNITS?
QVector<Vec3d> ToastGrid::getVertexArray ( int  level,
int  x,
int  y,
int  resolution 
) const

The position are stored in a grid.

Parameters
levelthe TOAST level of the tile.
xthe x coordinate of the tile.
ythe y coordinate of the tile.
resolutionthe resolution of the returned array. TODO: UNITS?