SCM Library
Spherical Cube Map rendering library
 All Classes Files Functions Variables Friends Pages
Classes | Public Member Functions | List of all members
scm_label Class Reference

An scm_label renders annotations on the sphere. More...

#include <scm-label.hpp>

Public Member Functions

 scm_label (const std::string &, int)
 Create a new label. More...
 
 ~scm_label ()
 Finalize all OpenGL state.
 
void draw (GLubyte r, GLubyte g, GLubyte b, GLubyte a)
 Draw all annotations using the given color and transparency. More...
 

Detailed Description

An scm_label renders annotations on the sphere.

The label renderer reads data from a CSV file giving a list of surface features, each with the following elements:

Key Type
Name a string
Latitude in degrees
Longitude in degrees
Diameter in meters
Radius distance from the center of the globe, in meters
Feature a two-letter code

The name string is rendered in text scaled to fit the given diameter. The currently-defined two-letter codes are:

Code Feature Representation
AA Crater Circle of given diameter
SF Secondary Crater Circle of given diameter with half opacity
MO Mountain Triangle icon
LF Landing Site Flag icon
@* Star Star icon
@C Circle Circle icon

Constructor & Destructor Documentation

scm_label::scm_label ( const std::string &  file,
int  size 
)

Create a new label.

Render all strings to a font atlas and initialize any OpenGL state needed to render all annotations.

Parameters
fileCSV data string
sizeIcon size (in pixels)

Member Function Documentation

void scm_label::draw ( GLubyte  r,
GLubyte  g,
GLubyte  b,
GLubyte  a 
)

Draw all annotations using the given color and transparency.

Parameters
rRed
gGreen
bBlue
aAlpha

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