![]() |
Stellarium 0.12.0 | ||
| Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · Renderer · File Structure |
Drawable 2D or 3D ring. More...
#include <StelGeometryBuilder.hpp>
Public Member Functions | |
| ~StelGeometryRing () | |
| Destroy the ring, freeing vertex and index buffers. | |
| void | draw (class StelRenderer *renderer, StelProjectorP projector=StelProjectorP()) |
| Draw the ring. | |
| void | setInnerOuterRadius (const float inner, const float outer) |
| Set inner and outer radius of the ring. | |
| void | setResolution (const int slices, const int loops) |
| Set resolution (detail) of the ring. | |
| void | setFlipFaces (const bool flipFaces) |
| Should the ring be flipped to face the opposite side? | |
| void | setOffset (const Vec3f offset) |
| Set offset (position) of the ring (for 2D rings, the Z coordinate is ignored). | |
Drawable 2D or 3D ring.
Encapsulates vertex and index buffers needed to draw a ring. These are generated as needed any time ring parameters change.
The ring is a flat circle with a hole in center formed by a circular grid with multiple loops each composed of multiple slices.
Rings are constructed by StelGeometryBuilder functions buildRingTextured(), and buildRing2D().
Definition at line 410 of file StelGeometryBuilder.hpp.
| StelGeometryRing::~StelGeometryRing | ( | ) | [inline] |
Destroy the ring, freeing vertex and index buffers.
Definition at line 423 of file StelGeometryBuilder.hpp.
| void StelGeometryRing::draw | ( | class StelRenderer * | renderer, | |
| StelProjectorP | projector = StelProjectorP() | |||
| ) |
Draw the ring.
| renderer | Renderer to draw the ring. | |
| projector | Projector to project the vertices, if any. Not used for 2D rings. |
| void StelGeometryRing::setFlipFaces | ( | const bool | flipFaces | ) | [inline] |
Should the ring be flipped to face the opposite side?
Definition at line 493 of file StelGeometryBuilder.hpp.
| void StelGeometryRing::setInnerOuterRadius | ( | const float | inner, | |
| const float | outer | |||
| ) | [inline] |
Set inner and outer radius of the ring.
| inner | Inner radius. Must be greater than zero. | |
| outer | Outer radius. Must be greater than the inner radius. |
Definition at line 457 of file StelGeometryBuilder.hpp.
| void StelGeometryRing::setOffset | ( | const Vec3f | offset | ) | [inline] |
Set offset (position) of the ring (for 2D rings, the Z coordinate is ignored).
Definition at line 502 of file StelGeometryBuilder.hpp.
| void StelGeometryRing::setResolution | ( | 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 477 of file StelGeometryBuilder.hpp.
1.6.3