![]() |
Stellarium 0.12.4
|
Drawable 2D or 3D ring. More...
#include <StelGeometryBuilder.hpp>
Public Member Functions | |
~StelGeometryRing () | |
Destroy the ring, freeing vertex and index buffers. More... | |
void | draw (class StelRenderer *renderer, StelProjectorP projector=StelProjectorP()) |
Draw the ring. More... | |
void | setInnerOuterRadius (const float inner, const float outer) |
Set inner and outer radius of the ring. More... | |
void | setResolution (const int slices, const int loops) |
Set resolution (detail) of the ring. More... | |
void | setFlipFaces (const bool flipFaces) |
Should the ring be flipped to face the opposite side? More... | |
void | setOffset (const Vec3f offset) |
Set offset (position) of the ring (for 2D rings, the Z coordinate is ignored). More... | |
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.
|
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. |
|
inline |
Should the ring be flipped to face the opposite side?
Definition at line 493 of file StelGeometryBuilder.hpp.
|
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.
|
inline |
Set offset (position) of the ring (for 2D rings, the Z coordinate is ignored).
Definition at line 502 of file StelGeometryBuilder.hpp.
|
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.