![]() |
Stellarium 0.12.0 | ||
| Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · Renderer · File Structure |
Parameters specifying how to generate a sphere. More...
#include <StelGeometryBuilder.hpp>
Public Member Functions | |
| SphereParams (const float radius) | |
| Construct SphereParams specifying the required radius parameter with other parameters at default values. | |
| SphereParams & | oneMinusOblateness (const float rhs) |
| Set the oblateness of the sphere. | |
| SphereParams & | resolution (const int slices, const int stacks) |
| Set resolution (detail) of the sphere grid. | |
| SphereParams & | orientInside () |
| If specified, the faces of the sphere will point inside instead of outside. | |
| SphereParams & | flipTexture () |
| If specified, texture coords will be flipped on the (texture, not global) X axis. | |
Public Attributes | |
| float | radius_ |
| Radius of the sphere. | |
| float | oneMinusOblateness_ |
| Determines how oblate the "sphere" is. | |
| int | slices_ |
| Number of slices/columns in the sphere grid. | |
| int | stacks_ |
| Number of stacks/rows in the sphere grid. | |
| bool | orientInside_ |
| Are the faces of the sphere oriented inside? | |
| bool | flipTexture_ |
| Are the the texture coordinates flipped on the X axis? | |
Parameters specifying how to generate a sphere.
These are passed to StelGeometryBuilder to build a sphere.
This is a builder-style struct. Parameters can be specified like this:
// Radius (required parameter) set to 5, optional parameters have default values // (completely spherical, 20 stacks, 20 slices, oriented outside, texture not flipped) SphereParams a = SphereParams(5.0f); // Higher detail sphere SphereParams b = SphereParams(5.0f).resolution(40, 40); // Oblate "sphere" with faces oriented inside SphereParams c = SphereParams(5.0f).oneMinusOblateness(0.5f).orientInside();
Definition at line 50 of file StelGeometryBuilder.hpp.
| SphereParams::SphereParams | ( | const float | radius | ) | [inline] |
Construct SphereParams specifying the required radius parameter with other parameters at default values.
Default values are no oblateness, 20 stacks, 20 slices, faces oriented outside and texture not flipped.
| radius | Radius of the sphere. Must be greater than zero. |
Definition at line 35 of file StelGeometryBuilder.hpp.
| SphereParams& SphereParams::flipTexture | ( | ) | [inline] |
If specified, texture coords will be flipped on the (texture, not global) X axis.
Definition at line 79 of file StelGeometryBuilder.hpp.
| SphereParams& SphereParams::oneMinusOblateness | ( | const float | rhs | ) | [inline] |
Set the oblateness of the sphere.
1.0f is a sphere, 0.0f a flat ring.
Must be at least zero and at most one.
Definition at line 50 of file StelGeometryBuilder.hpp.
| SphereParams& SphereParams::orientInside | ( | ) | [inline] |
If specified, the faces of the sphere will point inside instead of outside.
Definition at line 72 of file StelGeometryBuilder.hpp.
| SphereParams& SphereParams::resolution | ( | 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 64 of file StelGeometryBuilder.hpp.
Are the the texture coordinates flipped on the X axis?
Definition at line 96 of file StelGeometryBuilder.hpp.
Determines how oblate the "sphere" is.
Definition at line 88 of file StelGeometryBuilder.hpp.
Are the faces of the sphere oriented inside?
Definition at line 94 of file StelGeometryBuilder.hpp.
| float SphereParams::radius_ |
Radius of the sphere.
Definition at line 86 of file StelGeometryBuilder.hpp.
Number of slices/columns in the sphere grid.
Definition at line 90 of file StelGeometryBuilder.hpp.
Number of stacks/rows in the sphere grid.
Definition at line 92 of file StelGeometryBuilder.hpp.
1.6.3