Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://astro.uni-altai.ru/~aw/stellarium/api/classStelGeometryBuilder.html
Дата изменения: Unknown Дата индексирования: Fri Feb 28 07:44:21 2014 Кодировка: Поисковые слова: п п п п п п п п п п п п п п п п п п п п п п п п |
Stellarium 0.12.3
|
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... | |
StelGeometrySphere * | buildSphereFisheye (const SphereParams ¶ms, const float textureFov) |
Build a fisheye-textured sphere. More... | |
StelGeometrySphere * | buildSphereUnlit (const SphereParams ¶ms) |
Build a regularly texture mapped sphere. More... | |
StelGeometrySphere * | buildSphereLit (const SphereParams ¶ms, const StelLight &light) |
Build a regularly texture mapped sphere with lighting baked into vertex colors. More... | |
StelGeometryRing * | buildRingTextured (const RingParams ¶ms, 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... | |
StelGeometryRing * | buildRing2D (const RingParams ¶ms, const Vec2f offset=Vec2f(0.0f, 0.0f)) |
Build a 2D ring without texture mapping. More... | |
Builds various geometry primitives, storing them in vertex buffers.
Definition at line 572 of file StelGeometryBuilder.hpp.
|
inline |
Build a 2D circle.
vertexBuffer | Vertex buffer to store the circle. Must be empty, and have the line strip primitive type. |
x | X position of the center of the ring. |
y | Y position of the center of the ring. |
radius | Radius of the ring. Must be greater than zero. |
segments | Number of segments to subdivide the ring into. |
Definition at line 584 of file StelGeometryBuilder.hpp.
|
inline |
Build a cylinder without top and bottom caps.
vertexBuffer | Vertex buffer to store the cylinder. Must be empty, and have the triangle strip primitive type. |
radius | Radius of the cylinder. |
height | Height of the cylinder. |
slices | Number of slices (sides) of the cylinder. Must be at least 3. |
orientInside | Should 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.
vertexBuffer | Vertex buffer to store the fan disk. Must be empty, and have the triangles primitive type. |
indexBuffer | Index buffer to store indices specifying the triangles to draw. |
radius | Radius of the disk. |
innerFanSlices | Number of slices. Must be at least 3. |
level | Number of concentric circles. Must be at most 31, but much lower (e.g; 8) is recommended. |
|
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.
Definition at line 792 of file StelGeometryBuilder.hpp.
|
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.
Definition at line 765 of file StelGeometryBuilder.hpp.
|
inline |
Build a fisheye-textured sphere.
The sphere must be deleted to free graphics resources.
params | Sphere parameters. |
textureFov | Field of view of the texture coordinates. |
Definition at line 689 of file StelGeometryBuilder.hpp.
|
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.
params | Sphere parameters. |
light | Light to use for lighting. |
Definition at line 736 of file StelGeometryBuilder.hpp.
|
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.
params | Sphere parameters. |
Definition at line 712 of file StelGeometryBuilder.hpp.