| GlsMap Toolkit 1.10.2

Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
disti::MapChartCell Class Referenceabstract

`#include <gls_map_chart_data_source.h>`

## Public Member Functions
| MapChartCell ()
virtual void | AddRef ()
virtual void | Release ()
virtual bool | AllowOutlines () const
virtual bool | IsCellValid () const
virtual GlsMapChartDataSource * | GetSource () const =0
virtual unsigned long | GetLayerID () const
const GeoRect & | GetGeoRect () const
GeoCoord & | GetLowerLeftCoord ()
GeoCoord & | GetLowerRightCoord ()
GeoCoord & | GetUpperLeftCoord ()
GeoCoord & | GetUpperRightCoord ()
virtual void | SetLoadPriority (unsigned int val)
virtual unsigned int | GetLoadPriority () const
virtual bool | HasTexture () const =0
virtual bool | TextureIsReady () const =0
virtual void | BindTexture ()=0
virtual void | InvalidateTexture ()=0
virtual void | PostDraw (GlsMapView *view, GlsMapChart *chart)
virtual bool | IsSameCell (const MapChartCell &other) const =0

## Protected Member Functions
virtual | ~MapChartCell ()
virtual void | Write (std::ostream &os) const

## Protected Attributes
int | _referenceCount
unsigned int | _loadPriority
GeoRect | _geoRect
bool | _geoRectSet
GeoCoord | _lowerLeft
GeoCoord | _lowerRight
GeoCoord | _upperLeft
GeoCoord | _upperRight

## Friends
std::ostream & | operator<< (std::ostream &os, const MapChartCell &cell)

## Detailed Description

MapChartCells are obtained from a GlsMapChartDataSource by calling the GlsMapChartDataSource::GetCellList() method. Each MapChartCell may provide a texture for rendering or it may use it's own custom rendering method to draw its data. The data needed to render the cell may not have been loaded yet, the caller can set the priority of various cells to control the order in which they are loaded.

## Constructor & Destructor Documentation

## ◆ MapChartCell()

disti::MapChartCell::MapChartCell | ( |  | ) |
| inline

Constructor

Parameters

  logicalHeight | The viewing height in logical space.

## ◆ ~MapChartCell()

virtual disti::MapChartCell::~MapChartCell | ( |  | ) |
| inline protected virtual

Destructor for abstract base class

Note
  Protected for proper reference counting – call Release() instead of destroying directly.

## Member Function Documentation

## ◆ AllowOutlines()

virtual bool disti::MapChartCell::AllowOutlines | ( |  | ) | const
| inline virtual

Instructs the MapChart Cell Manager whether to calculate and display cell outlines.

Returns
  True if the outlines should be drawn.

## ◆ BindTexture()

virtual void disti::MapChartCell::BindTexture | ( |  | ) |
| pure virtual

If TextureIsReady() is true, this method will bind the texture for the cell. You must call UnbindTexture() to unbind the texture If TextureIsReady() is false, this method does nothing.

## ◆ GetGeoRect()

const GeoRect & disti::MapChartCell::GetGeoRect | ( |  | ) | const
| inline

Returns
  The GeoRect that describes the coverage area for the cell.

## ◆ GetLayerID()

virtual unsigned long disti::MapChartCell::GetLayerID | ( |  | ) | const
| inline virtual

Integer representing the layer of this image. Images from the same MapDataSource with the same Layer number all contain data at the same resolution (i.e. 'zoom level') and can be drawn together.

## ◆ HasTexture()

virtual bool disti::MapChartCell::HasTexture | ( |  | ) | const
| pure virtual

Determine if this cell displays a texture. If this returns true, you should call TextureIsReady() to determine if the texture data has loaded and BindTexture() to bind the texture to the current OpenGL context.

Returns
  true if this cell is capable of loading a texture

## ◆ IsCellValid()

virtual bool disti::MapChartCell::IsCellValid | ( |  | ) | const
| inline virtual

Determine if this cell is still valid. Invalid cells are cells that are no longer relevant for a given data source (e.g. backing data for cell is unloaded).

Returns
  true if the cell is valid, false if the cell is not valid

## ◆ IsSameCell()

virtual bool disti::MapChartCell::IsSameCell | ( | const MapChartCell & | other | ) | const
| pure virtual

Determine if two MapCells are equivalent

Parameters

  other | Reference to the MapChartCell to compare to

Returns
  true if the cells are equivalent, false otherwise

## ◆ PostDraw()

virtual void disti::MapChartCell::PostDraw | ( | GlsMapView * | view,
|  | GlsMapChart * | chart
| ) |  |
| inline virtual

The post draw callback for each cell should be called after all of the MapCell textures have been drawn to allow the MapCells to render any overlay geometry

Parameters

  view | The GlsMapView used to draw the chart
  chart | The GlsMapChart that is being drawn

## ◆ Release()

virtual void disti::MapChartCell::Release | ( |  | ) |
| inline virtual

MapCells cannot be deleted directly Use this method to decrement the reference count of the MapDataSource.

## ◆ SetLoadPriority()

virtual void disti::MapChartCell::SetLoadPriority | ( | unsigned int | val | ) |
| inline virtual

The priority of this cell in the loading order. 0 is the highest priority. This is typically set by the CellMgr.

## ◆ TextureIsReady()

virtual bool disti::MapChartCell::TextureIsReady | ( |  | ) | const
| pure virtual

Returns
  true if BindTexture will apply a texture when called.

## Friends And Related Function Documentation

## ◆ operator<<

std::ostream & operator<< | ( | std::ostream & | os,
|  | const MapChartCell & | cell
| ) |  |
| friend

Prints some information about the cell

See also
  MapChartCell::Write()

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

- gls_map_chart_data_source.h