Stellarium  0.16.1
List of all members | 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. More...
 

Detailed Description

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

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.

Definition at line 34 of file StelToastGrid.hpp.

Member Function Documentation

int ToastGrid::getMaxLevel ( void  ) const
inline

Return the max TOAST level of this grid.

Definition at line 64 of file StelToastGrid.hpp.

QVector<Vec3d> ToastGrid::getPolygon ( int  level,
int  x,
int  y 
) const

Returns the polygon contouring a given tile.

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

Get the texture array for a given tile.

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

Get the index of the vertex from getVertexArray sorted as a list of triangles.

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

Get the vertex array for a given tile.

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?

The documentation for this class was generated from the following file: