![]() |
Stellarium 0.12.4
|
Drawable 3D sphere. More...
#include <StelGeometryBuilder.hpp>
Public Member Functions | |
~StelGeometrySphere () | |
Destroy the sphere, freeing vertex and index buffers. More... | |
void | draw (class StelRenderer *renderer, StelProjectorP projector) |
Draw the sphere. More... | |
void | setRadius (const float radius) |
Set radius of the sphere. More... | |
void | setOneMinusOblateness (const float oneMinusOblateness) |
Set the oblateness of the sphere. More... | |
void | setResolution (const int slices, const int stacks) |
Set resolution (detail) of the sphere grid. More... | |
void | setOrientInside (const bool orientInside) |
Should sphere faces be oriented inside? (Useful e.g. for skyspheres) More... | |
void | setFlipTexture (const bool flipTexture) |
Should texture coordinates be flipped on the x (texture coord, not world) axis? More... | |
void | setLight (const StelLight &light) |
Update the light. Can only be called if this is a lit sphere (constructed by buildSphereLit). More... | |
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.
|
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. |
|
inline |
Should texture coordinates be flipped on the x (texture coord, not world) axis?
Definition at line 233 of file StelGeometryBuilder.hpp.
|
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.
|
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.
|
inline |
Should sphere faces be oriented inside? (Useful e.g. for skyspheres)
Definition at line 226 of file StelGeometryBuilder.hpp.
|
inline |
Set radius of the sphere.
radius | Radius to set. Must be greater than zero. |
Definition at line 185 of file StelGeometryBuilder.hpp.
|
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.