![]() |
Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · File Structure |
#include <StelSphereGeometry.hpp>
Inherits SphericalConvexPolygon.
Public Member Functions | |
SphericalTexturedConvexPolygon () | |
SphericalTexturedConvexPolygon (const QVector< Vec3d > &contour, const QVector< Vec2f > &texCoord) | |
SphericalTexturedConvexPolygon (const Vec3d &e0, const Vec3d &e1, const Vec3d &e2, const Vec3d &e3) | |
virtual StelVertexArray | getFillVertexArray () const |
virtual void | setContour (const QVector< Vec3d > &acontour, const QVector< Vec2f > &texCoord) |
virtual QVariantMap | toQVariant () const |
virtual void | serialize (QDataStream &out) const |
Protected Attributes | |
QVector< Vec2f > | textureCoords |
SphericalTexturedConvexPolygon::SphericalTexturedConvexPolygon | ( | ) | [inline] |
Default constructor.
SphericalTexturedConvexPolygon::SphericalTexturedConvexPolygon | ( | const QVector< Vec3d > & | contour, | |
const QVector< Vec2f > & | texCoord | |||
) | [inline] |
Constructor from one contour.
SphericalTexturedConvexPolygon::SphericalTexturedConvexPolygon | ( | const Vec3d & | e0, | |
const Vec3d & | e1, | |||
const Vec3d & | e2, | |||
const Vec3d & | e3 | |||
) | [inline] |
Special constructor for quads.
Use the 4 textures corners for the 4 vertices.
virtual StelVertexArray SphericalTexturedConvexPolygon::getFillVertexArray | ( | ) | const [inline, virtual] |
Return an openGL compatible array to be displayed using vertex arrays.
This method is not optimized for SphericalConvexPolygon instances.
Reimplemented from SphericalConvexPolygon.
virtual void SphericalTexturedConvexPolygon::setContour | ( | const QVector< Vec3d > & | acontour, | |
const QVector< Vec2f > & | texCoord | |||
) | [inline, virtual] |
Set a single contour defining the SphericalPolygon.
acontour | a contour defining the polygon area. | |
texCoord | a list of texture coordinates matching the vertices of the contour. |
virtual QVariantMap SphericalTexturedConvexPolygon::toQVariant | ( | ) | const [virtual] |
Serialize the region into a QVariant map matching the JSON format.
The format is:
{"type": "CVXPOLYGON", "worldCoords": [[[ra,dec], [ra,dec], [ra,dec], [ra,dec]], [[ra,dec], [ra,dec], [ra,dec]],[...]], "textureCoords": [[[u,v],[u,v],[u,v],[u,v]], [[u,v],[u,v],[u,v]], [...]] }
Reimplemented from SphericalConvexPolygon.
virtual void SphericalTexturedConvexPolygon::serialize | ( | QDataStream & | out | ) | const [inline, virtual] |
Serialize the region. This method must allow as fast as possible serialization and work with deserialize().
Reimplemented from SphericalConvexPolygon.
QVector<Vec2f> SphericalTexturedConvexPolygon::textureCoords [protected] |
A list of uv textures coordinates corresponding to the triangle vertices.
There should be 1 uv position per vertex.