Документ взят из кэша поисковой машины. Адрес оригинального документа : http://astro.uni-altai.ru/~aw/stellarium/api/structSphereParams.html
Дата изменения: Unknown
Дата индексирования: Fri Feb 28 07:29:47 2014
Кодировка:

Поисковые слова: п п п п п п п р п р п
Stellarium: SphereParams Struct Reference
Stellarium 0.12.3
List of all members | Public Member Functions | Public Attributes
SphereParams Struct Reference

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. More...
 
SphereParamsoneMinusOblateness (const float rhs)
 Set the oblateness of the sphere. More...
 
SphereParamsresolution (const int slices, const int stacks)
 Set resolution (detail) of the sphere grid. More...
 
SphereParamsorientInside ()
 If specified, the faces of the sphere will point inside instead of outside. More...
 
SphereParamsflipTexture ()
 If specified, texture coords will be flipped on the (texture, not global) X axis. More...
 

Public Attributes

float radius_
 Radius of the sphere. More...
 
float oneMinusOblateness_
 Determines how oblate the "sphere" is. More...
 
int slices_
 Number of slices/columns in the sphere grid. More...
 
int stacks_
 Number of stacks/rows in the sphere grid. More...
 
bool orientInside_
 Are the faces of the sphere oriented inside? More...
 
bool flipTexture_
 Are the the texture coordinates flipped on the X axis? More...
 

Detailed Description

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)
// 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();
See Also
StelGeometrySphere, StelGeometryBuilder::buildSphereUnlit, StelGeometryBuilder::buildSphereLit, StelGeometryBuilder::buildSphereFisheye

Definition at line 50 of file StelGeometryBuilder.hpp.

Constructor & Destructor Documentation

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.

Parameters
radiusRadius of the sphere. Must be greater than zero.

Definition at line 59 of file StelGeometryBuilder.hpp.

Member Function Documentation

SphereParams& SphereParams::flipTexture ( )
inline

If specified, texture coords will be flipped on the (texture, not global) X axis.

Definition at line 103 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 74 of file StelGeometryBuilder.hpp.

SphereParams& SphereParams::orientInside ( )
inline

If specified, the faces of the sphere will point inside instead of outside.

Definition at line 96 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.

Parameters
slicesNumber of slices/columns, i.e. horizontal resolution of the sphere. Must be at least 3 and at most 4096.
stacksNumber of stacks/rows/rings, i.e. vertical resolution of the sphere. Must be at least 3 and at most 4096.

Definition at line 88 of file StelGeometryBuilder.hpp.

Member Data Documentation

bool SphereParams::flipTexture_

Are the the texture coordinates flipped on the X axis?

Definition at line 120 of file StelGeometryBuilder.hpp.

float SphereParams::oneMinusOblateness_

Determines how oblate the "sphere" is.

Definition at line 112 of file StelGeometryBuilder.hpp.

bool SphereParams::orientInside_

Are the faces of the sphere oriented inside?

Definition at line 118 of file StelGeometryBuilder.hpp.

float SphereParams::radius_

Radius of the sphere.

Definition at line 110 of file StelGeometryBuilder.hpp.

int SphereParams::slices_

Number of slices/columns in the sphere grid.

Definition at line 114 of file StelGeometryBuilder.hpp.

int SphereParams::stacks_

Number of stacks/rows in the sphere grid.

Definition at line 116 of file StelGeometryBuilder.hpp.


The documentation for this struct was generated from the following file: