Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://astro.uni-altai.ru/~aw/stellarium/api/classStelCircleArcRenderer.html
Дата изменения: Unknown Дата индексирования: Fri Feb 28 07:48:32 2014 Кодировка: Поисковые слова: ori |
![]() |
Stellarium 0.12.3
|
Provides functions to draw circle arcs using StelRenderer. More...
#include <StelCircleArcRenderer.hpp>
Public Member Functions | |
StelCircleArcRenderer (StelRenderer *renderer, StelProjectorP projector) | |
Construct a StelCircleArcRenderer using specified renderer. More... | |
StelCircleArcRenderer (StelRenderer *renderer, StelProjector *projector) | |
Construct a StelCircleArcRenderer using specified renderer. More... | |
~StelCircleArcRenderer () | |
Destroy the StelCircleArcRenderer, freeing any vertex buffers. More... | |
void | drawGreatCircleArc (const Vec3d &start, const Vec3d &stop, const SphericalCap *clippingCap=NULL, void(*viewportEdgeIntersectCallback)(const Vec3d &screenPos, const Vec3d &direction, void *userData)=NULL, void *userData=NULL) |
Draw a great circle arc between points start and stop. More... | |
void | drawGreatCircleArcs (const QVector< Vec3d > &points, const PrimitiveType primitiveType, const SphericalCap *clippingCap) |
Draw a series of great circle arcs between specified points. More... | |
void | setRotCenter (const Vec3d center) |
Set rotation point to draw a small circle around. More... | |
void | drawSmallCircleArc (const Vec3d &start, const Vec3d &stop, void(*viewportEdgeIntersectCallback)(const Vec3d &screenPos, const Vec3d &direction, void *userData), void *userData) |
Draw a small circle arc between points start and stop. More... | |
Provides functions to draw circle arcs using StelRenderer.
Performance could be improved if drawXXXCircleArc returned a list of vertex buffers to draw (perhaps generateXXXCircleArc), which could be cached as long as the StelProjector used is not modified. This would require a way to track the last update when StelProjector was modified.
Example:
Definition at line 51 of file StelCircleArcRenderer.hpp.
|
inline |
Construct a StelCircleArcRenderer using specified renderer.
renderer | Renderer to create adn draw vertex buffers. |
projector | Projector to project 3D coordinates to the screen. |
Definition at line 58 of file StelCircleArcRenderer.hpp.
|
inline |
Construct a StelCircleArcRenderer using specified renderer.
renderer | Renderer to create adn draw vertex buffers. |
projector | Projector to project 3D coordinates to the screen. |
Definition at line 69 of file StelCircleArcRenderer.hpp.
|
inline |
Destroy the StelCircleArcRenderer, freeing any vertex buffers.
Definition at line 77 of file StelCircleArcRenderer.hpp.
|
inline |
Draw a great circle arc between points start and stop.
The angle between start and stop must be < 180 deg.
The line will look smooth, even for non linear distortion. Each time the small circle crosses the edge of the viewport, viewportEdgeIntersectCallback is called with the screen 2d position of the intersection, normalized direction of the currently drawn arc toward the inside of the viewport, and any extra user specified data.
start | Start point of the arc. |
stop | End point of the arc. |
clippingCap | if not NULL, try to clip part of the arc outside the cap. |
viewportEdgeIntersectCallback | Callback called on intersection with viewportEdge. |
userData | User-defined data passed to viewportEdgeIntersectCallback. |
Definition at line 100 of file StelCircleArcRenderer.hpp.
|
inline |
Draw a series of great circle arcs between specified points.
primitiveType specifies how to interpret the points.
If primitiveType is PrimitiveType_Lines, the arcs are drawn between the first and the second point, third and fourth, and so on. In this case, the number of points must be divisible by 2.
If primitiveType is PrimitiveType_LineStrip, the arcs are drawn between the first and the second point, second and third, third and fourth, and so on.
If primitiveType is PrimitiveType_LineLoop, the arcs are drawn like with PrimitiveType_LineStrip, but there is also an arc between the last and the first point.
The angle between two points of any arc must be < 180 deg.
points | Points to use to draw the arcs. |
primitiveType | Determines how the points to draw arcs between are chosen (see above). Must be PrimitiveType_Lines, PrimitiveType_LineStrip or PrimitiveType_LineLoop. |
clippingCap | If not NULL, try to clip the parts of the arcs outside the cap. |
Definition at line 141 of file StelCircleArcRenderer.hpp.
|
inline |
Draw a small circle arc between points start and stop.
The rotation point is set by setRotCenter().
The angle between start and stop must be < 180 deg. The line will look smooth, even for non linear distortion. Each time the small circle crosses the edge of the viewport, viewportEdgeIntersectCallback is called with the screen 2d position of the intersection, normalized direction of the currently drawn arc toward the inside of the viewport, and any extra user specified data.
If rotCenter is (0,0,0), the method draws a great circle.
start | Start point of the arc. |
stop | End point of the arc. |
viewportEdgeIntersectCallback | Callback called on intersection with viewportEdge. |
userData | User-defined data passed to viewportEdgeIntersectCallback. |
Definition at line 199 of file StelCircleArcRenderer.hpp.
|
inline |
Set rotation point to draw a small circle around.
Definition at line 174 of file StelCircleArcRenderer.hpp.