GlsMap Toolkit  1.3.1
disti::MapChartCell Class Referenceabstract

#include <gls_map_chart_data_source.h>

Public Member Functions

 MapChartCell ()
 
virtual ~MapChartCell ()
 
virtual void AddRef ()
 
virtual void Release ()
 
virtual bool AllowOutlines ()
 
virtual bool IsCellValid ()=0
 
virtual GlsMapChartDataSourceGetSource ()=0
 
virtual unsigned long GetLayerID ()=0
 
GeoRectGetGeoRect ()
 
GeoCoordGetLowerLeftCoord ()
 
GeoCoordGetLowerRightCoord ()
 
GeoCoordGetUpperLeftCoord ()
 
GeoCoordGetUpperRightCoord ()
 
virtual void SetLoadPriority (unsigned int val)
 
unsigned int GetLoadPriority ()
 
virtual bool HasTexture ()=0
 
virtual bool TextureIsReady ()=0
 
virtual void BindTexture ()=0
 
virtual void InvalidateTexture ()=0
 
virtual void PostDraw (GlsMapView *view, GlsMapChart *chart)
 
virtual bool IsSameCell (const MapChartCell &other)=0
 
bool operator== (const MapChartCell &other)
 

Protected Member Functions

virtual void Write (std::ostream &os) const
 

Protected Attributes

unsigned int _loadPriority
 
GeoRect _geoRect
 
int _referenceCount
 
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.

Member Function Documentation

virtual bool disti::MapChartCell::AllowOutlines ( )
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.

GeoRect& disti::MapChartCell::GetGeoRect ( )
inline
Returns
The GeoRect that describes the coverage area for the cell.
virtual unsigned long disti::MapChartCell::GetLayerID ( )
pure 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.

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