GlsMap Toolkit  1.7.0
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 GlsMapChartDataSourceGetSource () const =0
 
virtual unsigned long GetLayerID () const
 
const GeoRectGetGeoRect () const
 
GeoCoordGetLowerLeftCoord ()
 
GeoCoordGetLowerRightCoord ()
 
GeoCoordGetUpperLeftCoord ()
 
GeoCoordGetUpperRightCoord ()
 
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

disti::MapChartCell::MapChartCell ( )
inline

Constructor

Parameters
logicalHeightThe viewing height in logical space.
virtual disti::MapChartCell::~MapChartCell ( )
inlineprotectedvirtual

Destructor for abstract base class

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

Member Function Documentation

virtual bool disti::MapChartCell::AllowOutlines ( ) const
inlinevirtual

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

Returns
True if the outlines should be drawn.
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.

const GeoRect& disti::MapChartCell::GetGeoRect ( ) const
inline
Returns
The GeoRect that describes the coverage area for the cell.
virtual unsigned long disti::MapChartCell::GetLayerID ( ) const
inlinevirtual

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.

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
virtual bool disti::MapChartCell::IsCellValid ( ) const
inlinevirtual

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
virtual bool disti::MapChartCell::IsSameCell ( const MapChartCell other) const
pure virtual

Determine if two MapCells are equivalent

Parameters
otherReference to the MapChartCell to compare to
Returns
true if the cells are equivalent, false otherwise
virtual void disti::MapChartCell::PostDraw ( GlsMapView view,
GlsMapChart chart 
)
inlinevirtual

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
viewThe GlsMapView used to draw the chart
chartThe GlsMapChart that is being drawn
virtual void disti::MapChartCell::Release ( )
inlinevirtual

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

virtual void disti::MapChartCell::SetLoadPriority ( unsigned int  val)
inlinevirtual

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

virtual bool disti::MapChartCell::TextureIsReady ( ) const
pure virtual
Returns
true if BindTexture will apply a texture when called.

Friends And Related Function Documentation

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: