Stellarium 0.12.0
Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · Renderer · File Structure

RingParams Struct Reference

Parameters specifying how to generate a ring. More...

#include <StelGeometryBuilder.hpp>

List of all members.

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.
RingParamsresolution (const int slices, const int loops)
 Set resolution (detail) of the ring.
RingParamsflipFaces ()
 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?

Detailed Description

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();
See also:
StelGeometryRing, StelGeometryBuilder::buildRingTextured, StelGeometryBuilder::buildRing2D

Definition at line 345 of file StelGeometryBuilder.hpp.


Constructor & Destructor Documentation

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.

Parameters:
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.


Member Function Documentation

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.

Parameters:
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.


Member Data Documentation

Should the faces in the ring be flipped to face the opposite side?

Definition at line 394 of file StelGeometryBuilder.hpp.

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.

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.


The documentation for this struct was generated from the following file:
Generated on Thu Jan 31 14:05:44 2013 for Stellarium by  doxygen 1.6.3