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

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

Builds various geometry primitives, storing them in vertex buffers. More...

#include <StelGeometryBuilder.hpp>

Public Member Functions

void buildCircle (StelVertexBuffer< VertexP2 > *vertexBuffer, const float x, const float y, const float radius, const int segments=128)
 Build a 2D circle. More...
 
void buildCylinder (StelVertexBuffer< VertexP3T2 > *const vertexBuffer, const float radius, const float height, const int slices, const bool orientInside=false)
 Build a cylinder without top and bottom caps. More...
 
void buildFanDisk (StelVertexBuffer< VertexP3T2 > *const vertexBuffer, StelIndexBuffer *const indexBuffer, const float radius, const int innerFanSlices, const int level)
 Build a disk having texture center at center of disk. More...
 
StelGeometrySpherebuildSphereFisheye (const SphereParams &params, const float textureFov)
 Build a fisheye-textured sphere. More...
 
StelGeometrySpherebuildSphereUnlit (const SphereParams &params)
 Build a regularly texture mapped sphere. More...
 
StelGeometrySpherebuildSphereLit (const SphereParams &params, const StelLight &light)
 Build a regularly texture mapped sphere with lighting baked into vertex colors. More...
 
StelGeometryRingbuildRingTextured (const RingParams &params, const Vec3f offset=Vec3f(0.0f, 0.0f, 0.0f))
 Build a flat texture mapped ring with 3D coordinates (for example for planet's rings) More...
 
StelGeometryRingbuildRing2D (const RingParams &params, const Vec2f offset=Vec2f(0.0f, 0.0f))
 Build a 2D ring without texture mapping. More...
 

Detailed Description

Builds various geometry primitives, storing them in vertex buffers.

Definition at line 572 of file StelGeometryBuilder.hpp.

Member Function Documentation

void StelGeometryBuilder::buildCircle ( StelVertexBuffer< VertexP2 > *  vertexBuffer,
const float  x,
const float  y,
const float  radius,
const int  segments = 128 
)
inline

Build a 2D circle.

Parameters
vertexBufferVertex buffer to store the circle. Must be empty, and have the line strip primitive type.
xX position of the center of the ring.
yY position of the center of the ring.
radiusRadius of the ring. Must be greater than zero.
segmentsNumber of segments to subdivide the ring into.

Definition at line 584 of file StelGeometryBuilder.hpp.

void StelGeometryBuilder::buildCylinder ( StelVertexBuffer< VertexP3T2 > *const  vertexBuffer,
const float  radius,
const float  height,
const int  slices,
const bool  orientInside = false 
)
inline

Build a cylinder without top and bottom caps.

Parameters
vertexBufferVertex buffer to store the cylinder. Must be empty, and have the triangle strip primitive type.
radiusRadius of the cylinder.
heightHeight of the cylinder.
slicesNumber of slices (sides) of the cylinder. Must be at least 3.
orientInsideShould the cylinder's faces point inside?

Definition at line 624 of file StelGeometryBuilder.hpp.

void StelGeometryBuilder::buildFanDisk ( StelVertexBuffer< VertexP3T2 > *const  vertexBuffer,
StelIndexBuffer *const  indexBuffer,
const float  radius,
const int  innerFanSlices,
const int  level 
)

Build a disk having texture center at center of disk.

The disk is composed from concentric circles with increasing refinement. The number of slices of the outmost circle is (innerFanSlices << level).

Index buffer is used to decrease vertex count.

Parameters
vertexBufferVertex buffer to store the fan disk. Must be empty, and have the triangles primitive type.
indexBufferIndex buffer to store indices specifying the triangles to draw.
radiusRadius of the disk.
innerFanSlicesNumber of slices. Must be at least 3.
levelNumber of concentric circles. Must be at most 31, but much lower (e.g; 8) is recommended.
StelGeometryRing* StelGeometryBuilder::buildRing2D ( const RingParams params,
const Vec2f  offset = Vec2f(0.0f, 0.0f) 
)
inline

Build a 2D ring without texture mapping.

(Note that the parameters refer to RingParams parameters)

The ring is a disk with a radius specified by the outerRadius parameter , with a circular hole in center that has radius set by the innerRadius parameter. The ring is subdivided into multiple concentric loops, and radially into multiple slices.

Orientation of the ring's faces can be flipped by the flipFaces parameter. The offset parameter is an offset that is added to positions of all vertices in the ring.

The ring must be deleted to free graphics resources.

See Also
RingParams

Definition at line 792 of file StelGeometryBuilder.hpp.

StelGeometryRing* StelGeometryBuilder::buildRingTextured ( const RingParams params,
const Vec3f  offset = Vec3f(0.0f, 0.0f, 0.0f) 
)
inline

Build a flat texture mapped ring with 3D coordinates (for example for planet's rings)

(Note that the parameters refer to RingParams parameters)

The ring is a disk with a radius specified by the outerRadius parameter , with a circular hole in center that has radius set by the innerRadius parameter. The ring is subdivided into multiple concentric loops, and radially into multiple slices.

Orientation of the ring's faces can be flipped by the flipFaces parameter. The offset parameter is an offset that is added to positions of all vertices in the ring.

The ring must be deleted to free graphics resources.

See Also
RingParams

Definition at line 765 of file StelGeometryBuilder.hpp.

StelGeometrySphere* StelGeometryBuilder::buildSphereFisheye ( const SphereParams params,
const float  textureFov 
)
inline

Build a fisheye-textured sphere.

The sphere must be deleted to free graphics resources.

Parameters
paramsSphere parameters.
textureFovField of view of the texture coordinates.
See Also
SphereParams

Definition at line 689 of file StelGeometryBuilder.hpp.

StelGeometrySphere* StelGeometryBuilder::buildSphereLit ( const SphereParams params,
const StelLight light 
)
inline

Build a regularly texture mapped sphere with lighting baked into vertex colors.

Texture coordinates: x goes from 0.0/0.25/0.5/0.75/1.0 at +y/+x/-y/-x/+y sides of the sphere, y goes from -1.0/+1.0 at z = -radius/+radius (linear along longitudes)

The sphere must be deleted to free graphics resources.

Parameters
paramsSphere parameters.
lightLight to use for lighting.
See Also
SphereParams

Definition at line 736 of file StelGeometryBuilder.hpp.

StelGeometrySphere* StelGeometryBuilder::buildSphereUnlit ( const SphereParams params)
inline

Build a regularly texture mapped sphere.

Texture coordinates: x goes from 0.0/0.25/0.5/0.75/1.0 at +y/+x/-y/-x/+y sides of the sphere, y goes from -1.0/+1.0 at z = -radius/+radius (linear along longitudes)

The sphere must be deleted to free graphics resources.

Parameters
paramsSphere parameters.
See Also
SphereParams

Definition at line 712 of file StelGeometryBuilder.hpp.


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