![]() |
GlsMap Toolkit
1.4.2
|
#include <gls_map_symbology.h>
Public Member Functions | |
GlsMapSymbology (bool generateInstance=false) | |
virtual | ~GlsMapSymbology () |
virtual void | SetAvailableAttributes (unsigned int value) |
virtual DisplayObject * | CloneObject (bool generateNames=false) |
virtual void | CopyProperties (DisplayObject *src) |
virtual InterfaceListType * | GetCppInterfaceDescription (InterfaceListType *addToThisList=NULL) |
virtual void | GetCppInterfaceDescriptionFree (InterfaceListType *array) |
virtual void | PreDraw (const OpenGLMatrices &parentMatrices, Culler &culler) |
virtual void | Draw (void) |
virtual DisplayObject * | Pick3D (const Vector &winLoc, const Vector &logicalCoords, float scale, const Vector &directionVector, Vector &collisionWinLoc, const OpenGLMatrices &drawnMatrices) |
virtual DisplayObject * | handle (DisplayEvent *ev) |
virtual void | SetValue (int spec, va_list &args) |
GlsMapView * | GetMapView () |
virtual void | SetDataSource (GlsMapSymbologyDataSource *database) |
GlsMapSymbologyDataSource * | GetDataSource () |
GlsMapSymbologyStdDataSource * | GetStdDataSource () |
virtual bool | PickSymbols (GlsMapView *view, LocationEvent *lev, GlsMapSymbologyDataSource::IconIDList *iconsHit, GlsMapSymbologyDataSource::PathIDList *pathsHit) |
void | SetDefaultPathColor (const glsColor &value) |
glsColor | GetDefaultPathColor () |
Static Public Member Functions | |
static DisplayObject * | CreateInstance () |
Protected Attributes | |
GlsMapSymbologyDataSource * | _dataSource |
GlsMapSymbologyStdDataSource * | _internalDataSource |
DisplayObject * | _defaultPathGeometry |
Friends | |
class | GlsMapSymbologyEditor |
The GlsMapSymbology class is a Group that contains a collection of DisplayObjects that can be thought of as 'icon templates'. When drawing, the MapSymbologyLayer will query it's MapSymbologyDataSource for the list of visible icons and paths, then render them to the map using the icon templates. The MapSymbologyDataSource interface is simple, while still allowing the MapSymbologyDataSource the ability to override the appearance of icons and paths.
When a new GlsMapSymbology instance is first created, it will create it's own GlsMapSymbologyStdDataSource which provides an interface for the user to create/update icons and paths without having to write their own MapSymbologyDataSource class. While this class provides much of the common functionality that is needed, some users will still want to create their own MapSymbologyDataSource to provide the best performance when working with their own datasets. These users have the option of deriving from the BasicDataSource class (a template class which provides basic functionality) or deriving directly from MapSymbologyDataSource interface to optimize all of the MapSymbologyDataSource code for their data set.
disti::GlsMapSymbology::GlsMapSymbology | ( | bool | generateInstance = false | ) |
Create a new GlsMapSymbology.
generateInstance | Whether or not to generate an instance name for this inputdevice |
|
virtual |
Destructs a GlsMapSymbology object
|
inline |
Returns the MapSymbologyDataSource that this object is using. This may be the default GlsMapSymbologyStdDataSource or another data source that was provided using the SetDataSource() method.
|
inline |
GlsMapSymbologyStdDataSource * disti::GlsMapSymbology::GetStdDataSource | ( | ) |
|
virtual |
This method can be called by the user in their GlsMapView event callback.
Utility method that can be called by the user from the GlsMapView event callback to determine if any symbols were picked. If the method returns true, then iconsHit and pathsHit will contain the list of icons and paths that were picked. NOTE: This method uses the generic MapSymbologyDataSource interface in it's picking algorithm. If you are using a derived DataSource class that has it's own picking method, it will probably be faster than this method.
view | The GlsMapView that was picked |
lev | A LocationEvent indicating the point that was picked |
iconsHit | IconIDList to receive the list of icons that were picked |
pathsHit | PathIDList to receive the list of paths that were picked |
|
virtual |
Set the MapSymbologyDataSource to use for rendering. The creator of the MapSymbologyDataSource instance is responsible for deleting it.
database | Pointer to the MapSymbologyDataSource to use |
void disti::GlsMapSymbology::SetDefaultPathColor | ( | const glsColor & | value | ) |
Set the default color for path lines This is only used if the MapSymbologyDataSource does not provide geometry for the paths