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

SphericalTexturedConvexPolygon Class Reference

Extension of SphericalConvexPolygon for textured polygon. More...

#include <StelSphereGeometry.hpp>

List of all members.

Public Member Functions

 SphericalTexturedConvexPolygon ()
 Default constructor.
 SphericalTexturedConvexPolygon (const QVector< Vec3d > &contour, const QVector< Vec2f > &texCoord)
 Constructor from one contour.
 SphericalTexturedConvexPolygon (const Vec3d &e0, const Vec3d &e1, const Vec3d &e2, const Vec3d &e3)
 Special constructor for quads.
virtual void setContour (const QVector< Vec3d > &acontour, const QVector< Vec2f > &texCoord)
 Set a single contour defining the SphericalPolygon.
virtual QVariantList toQVariant () const
 Serialize the region into a QVariant map matching the JSON format.
virtual void serialize (QDataStream &out) const
 Serialize the region. This method must allow as fast as possible serialization and work with deserialize().

Protected Member Functions

virtual void updateFillVertexBuffer (class StelRenderer *renderer, const DrawParams &params, bool handleDiscontinuity)
 Update the vertex buffer used by drawFill().
virtual void drawFillVertexBuffer (class StelRenderer *renderer, class StelProjector *projector)
 Drawing part of drawFill() - assumes the buffer/s is/are generated.

Protected Attributes

QVector< Vec2ftextureCoords
 A list of uv texture coordinates corresponding to the triangle vertices.
StelVertexBuffer
< TexturedVertex > * 
fillTexturedVertexBuffer
 Vertex buffer used in our override of drawFill() (using vertices with texcoords).

Detailed Description

Extension of SphericalConvexPolygon for textured polygon.

Definition at line 1106 of file StelSphereGeometry.hpp.


Constructor & Destructor Documentation

SphericalTexturedConvexPolygon::SphericalTexturedConvexPolygon (  )  [inline]

Default constructor.

Definition at line 1110 of file StelSphereGeometry.hpp.

SphericalTexturedConvexPolygon::SphericalTexturedConvexPolygon ( const QVector< Vec3d > &  contour,
const QVector< Vec2f > &  texCoord 
) [inline]

Constructor from one contour.

Definition at line 1116 of file StelSphereGeometry.hpp.

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.

Definition at line 1125 of file StelSphereGeometry.hpp.


Member Function Documentation

virtual void SphericalTexturedConvexPolygon::drawFillVertexBuffer ( class StelRenderer renderer,
class StelProjector projector 
) [protected, virtual]

Drawing part of drawFill() - assumes the buffer/s is/are generated.

Parameters:
renderer Renderer used for drawing.
projector Projector to project the vertices (NULL if subdivision is enabled, as in that case the projection is done during buffer generation)

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.

Definition at line 1159 of file StelSphereGeometry.hpp.

virtual void SphericalTexturedConvexPolygon::setContour ( const QVector< Vec3d > &  acontour,
const QVector< Vec2f > &  texCoord 
) [inline, virtual]

Set a single contour defining the SphericalPolygon.

Parameters:
acontour a contour defining the polygon area.
texCoord a list of texture coordinates matching the vertices of the contour.

Definition at line 1144 of file StelSphereGeometry.hpp.

virtual QVariantList SphericalTexturedConvexPolygon::toQVariant (  )  const [virtual]

Serialize the region into a QVariant map matching the JSON format.

The format is:

 ["TEXTURED_CONVEX_POLYGON", [[ra,dec], [ra,dec], [ra,dec], [ra,dec]], [[u,v],[u,v],[u,v],[u,v]]]

where the two lists are a closed convex contours, with each points defined by ra dec in degree in the ICRS frame followed by a list of texture coordinates in the u,v texture space (between 0 and 1). There must be one texture coordinate for each vertex.

Reimplemented from SphericalConvexPolygon.

virtual void SphericalTexturedConvexPolygon::updateFillVertexBuffer ( class StelRenderer renderer,
const DrawParams params,
bool  handleDiscontinuity 
) [protected, virtual]

Update the vertex buffer used by drawFill().

Called when drawing parameters have changed, or when we cannot cache vertices (e.g. when subdividing and this projecting outside Renderer).

Parameters:
renderer Renderer to create vertex buffer.
params Parameters used for drawing (which also affect vertex generation).
handleDiscontinuity Do we need to ensure that no triangles cross a projection discontinuity?

Reimplemented from SphericalConvexPolygon.


Member Data Documentation

Vertex buffer used in our override of drawFill() (using vertices with texcoords).

Definition at line 1167 of file StelSphereGeometry.hpp.

A list of uv texture coordinates corresponding to the triangle vertices.

There should be 1 uv position per vertex.

Definition at line 1164 of file StelSphereGeometry.hpp.


The documentation for this class was generated from the following file:
Generated on Thu Jan 31 14:05:44 2013 for Stellarium by  doxygen 1.6.3