Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
GreatCircles Class Reference

Draw great circle arcs in the fast preview. More...

#include <GreatCircles.h>

Public Member Functions

 GreatCircles ()
 constructor More...
 
void setVisualizationState (VisualizationState *visualizationState)
 Set the ViewState to use for information on output projection and preview display. More...
 
void drawLineFromSpherical (double startLat, double startLong, double endLat, double endLong, double width=1.0)
 Draw the shortest segment of the great circle crossing two spherical coordinates. More...
 

Private Attributes

VisualizationStatem_visualizationState
 

Detailed Description

Draw great circle arcs in the fast preview.

A great circle is the spherical equivalent of a straight line, but is often drawn curved, depending on the start and end positions and the projection.

Definition at line 35 of file GreatCircles.h.

Constructor & Destructor Documentation

GreatCircles::GreatCircles ( )

constructor

Definition at line 53 of file GreatCircles.cpp.

Member Function Documentation

void GreatCircles::drawLineFromSpherical ( double  startLat,
double  startLong,
double  endLat,
double  endLong,
double  width = 1.0 
)

Draw the shortest segment of the great circle crossing two spherical coordinates.

Actually, the line is approximated since OpenGL doesn't do curves.

Preconditions: The OpenGL state must be ready to draw lines the required width and colour, and outside of a glBegin/glEnd pair. setViewStatePtr must have been called with a valid (and still valid9 ViewState pointer to the ViewState used by the preview.

Parameters
startLatlattiude of the first point in degrees.
startLonglongitude of the first point in degrees.
endLatlattide of the second point in degrees.
endLonglongitude of the second point in degrees.
widthwidth of the line in pixels.

Definition at line 62 of file GreatCircles.cpp.

References DEBUG_ASSERT, GreatCircleArc::draw(), and m_visualizationState.

Referenced by PreviewControlPointTool::AfterDrawImagesEvent().

void GreatCircles::setVisualizationState ( VisualizationState visualizationState)

Set the ViewState to use for information on output projection and preview display.

Parameters
viewStatea pointer to the ViewState the preview is using.

Definition at line 57 of file GreatCircles.cpp.

References m_visualizationState.

Referenced by PreviewControlPointTool::PreviewControlPointTool().

Member Data Documentation

VisualizationState* GreatCircles::m_visualizationState
private

Definition at line 64 of file GreatCircles.h.

Referenced by drawLineFromSpherical(), and setVisualizationState().


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