![]() |
Stellarium 0.12.0 | ||
| Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · Renderer · File Structure |
Drawable 3D sphere. More...
#include <StelGeometryBuilder.hpp>
Public Member Functions | |
| ~StelGeometrySphere () | |
| Destroy the sphere, freeing vertex and index buffers. | |
| void | draw (class StelRenderer *renderer, StelProjectorP projector) |
| Draw the sphere. | |
| void | setRadius (const float radius) |
| Set radius of the sphere. | |
| void | setOneMinusOblateness (const float oneMinusOblateness) |
| Set the oblateness of the sphere. | |
| void | setResolution (const int slices, const int stacks) |
| Set resolution (detail) of the sphere grid. | |
| void | setOrientInside (const bool orientInside) |
| Should sphere faces be oriented inside? (Useful e.g. for skyspheres). | |
| void | setFlipTexture (const bool flipTexture) |
| Should texture coordinates be flipped on the x (texture coord, not world) axis? | |
| void | setLight (const StelLight &light) |
| Update the light. Can only be called if this is a lit sphere (constructed by buildSphereLit). | |
Drawable 3D sphere.
Encapsulates vertex and index buffers needed to draw the sphere. These are generated as needed any time sphere parameters change.
The sphere is a spherical grid with multiple stacks each composed of multiple slices.
Spheres are constructed by StelGeometryBuilder functions buildSphereFisheye(), buildSphereUnlit() and buildSphereLit().
Definition at line 136 of file StelGeometryBuilder.hpp.
| StelGeometrySphere::~StelGeometrySphere | ( | ) | [inline] |
Destroy the sphere, freeing vertex and index buffers.
Definition at line 153 of file StelGeometryBuilder.hpp.
| void StelGeometrySphere::draw | ( | class StelRenderer * | renderer, | |
| StelProjectorP | projector | |||
| ) |
Draw the sphere.
| renderer | Renderer to draw the sphere. | |
| projector | Projector to project the vertices. |
| void StelGeometrySphere::setFlipTexture | ( | const bool | flipTexture | ) | [inline] |
Should texture coordinates be flipped on the x (texture coord, not world) axis?
Definition at line 233 of file StelGeometryBuilder.hpp.
| void StelGeometrySphere::setLight | ( | const StelLight & | light | ) | [inline] |
Update the light. Can only be called if this is a lit sphere (constructed by buildSphereLit).
Definition at line 240 of file StelGeometryBuilder.hpp.
| void StelGeometrySphere::setOneMinusOblateness | ( | const float | oneMinusOblateness | ) | [inline] |
Set the oblateness of the sphere.
1.0 is a perfect sphere, 0.0f a flat ring.
Must be at least zero and at most one.
Definition at line 197 of file StelGeometryBuilder.hpp.
| void StelGeometrySphere::setOrientInside | ( | const bool | orientInside | ) | [inline] |
Should sphere faces be oriented inside? (Useful e.g. for skyspheres).
Definition at line 226 of file StelGeometryBuilder.hpp.
| void StelGeometrySphere::setRadius | ( | const float | radius | ) | [inline] |
Set radius of the sphere.
| radius | Radius to set. Must be greater than zero. |
Definition at line 185 of file StelGeometryBuilder.hpp.
| void StelGeometrySphere::setResolution | ( | const int | slices, | |
| const int | stacks | |||
| ) | [inline] |
Set resolution (detail) of the sphere grid.
Higher values result in more detail, but also higher resource usage.
| slices | Number of slices/columns, i.e. horizontal resolution of the sphere. Must be at least 3 and at most 4096. | |
| stacks | Number of stacks/rows/rings, i.e. vertical resolution of the sphere. Must be at least 3 and at most 4096. |
Definition at line 213 of file StelGeometryBuilder.hpp.
1.6.3