![]() |
Stellarium 0.12.0 | ||
| Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · Renderer · File Structure |
Parameters specifying how to generate a ring. More...
#include <StelGeometryBuilder.hpp>
Public Member Functions | |
| RingParams (const float innerRadius, const float outerRadius) | |
| Construct RingParams specifying the required inner and outer radius parameter and other parameters at default values. | |
| RingParams & | resolution (const int slices, const int loops) |
| Set resolution (detail) of the ring. | |
| RingParams & | flipFaces () |
| If specified, the ring will be flipped to face the opposite side. | |
Public Attributes | |
| float | innerRadius_ |
| Inner radius of the ring. | |
| float | outerRadius_ |
| Outer radius of the ring. | |
| int | loops_ |
| Number of loops in the ring. | |
| int | slices_ |
| Number of slices/subdivisions in the ring. | |
| bool | flipFaces_ |
| Should the faces in the ring be flipped to face the opposite side? | |
Parameters specifying how to generate a ring.
These are passed to StelGeometryBuilder to build a sphere.
This is a builder-style struct. Parameters can be specified like this:
// Required parameters, inner and outer radius, set to 5 and 10 respectively, // optional parameters have default values // (20 loops, 20 slices, faces not flipped) RingParams a = RingParams(5.0f, 10.0f); // Higher detail ring RingParams b = RingParams(5.0f, 10.0f).resolution(40, 40); // Ring facing the opposite side RingParams c = RingParams(5.0f, 10.0f).flipFaces();
Definition at line 345 of file StelGeometryBuilder.hpp.
| RingParams::RingParams | ( | const float | innerRadius, | |
| const float | outerRadius | |||
| ) | [inline] |
Construct RingParams specifying the required inner and outer radius parameter and other parameters at default values.
Default values are 20 loops, 20 slices and faces not flipped.
| innerRadius | Inner radius. Must be greater than zero. | |
| outerRadius | Outer radius. Must be greater than the inner radius. |
Definition at line 354 of file StelGeometryBuilder.hpp.
| RingParams& RingParams::flipFaces | ( | ) | [inline] |
If specified, the ring will be flipped to face the opposite side.
Definition at line 379 of file StelGeometryBuilder.hpp.
| RingParams& RingParams::resolution | ( | const int | slices, | |
| const int | loops | |||
| ) | [inline] |
Set resolution (detail) of the ring.
Higher values result in more detail, but also higher resource usage.
| slices | Number of slices/subdivisions. E.g. 3 is a triangle, 5 a pentagon, etc. Must be at least 3 and at most 4096. | |
| loops | Number of concentric loops in the ring. Must be at least 1. |
Definition at line 371 of file StelGeometryBuilder.hpp.
Should the faces in the ring be flipped to face the opposite side?
Definition at line 394 of file StelGeometryBuilder.hpp.
| float RingParams::innerRadius_ |
Inner radius of the ring.
Definition at line 386 of file StelGeometryBuilder.hpp.
Number of loops in the ring.
Definition at line 390 of file StelGeometryBuilder.hpp.
| float RingParams::outerRadius_ |
Outer radius of the ring.
Definition at line 388 of file StelGeometryBuilder.hpp.
Number of slices/subdivisions in the ring.
Definition at line 392 of file StelGeometryBuilder.hpp.
1.6.3