LuciadCPillar 2024.0
luciad::FeatureCanvas::GeometryDrawCommand Class Referenceabstract

Command to specify drawing options for a geometry. More...

#include <luciad/layers/features/FeatureCanvas.h>

Public Member Functions

virtual ~GeometryDrawCommand ()=default
 
virtual GeometryDrawCommanddraped (bool draped)=0
 Indicates whether or not the geometry should be draped on top of the terrain. More...
 
virtual GeometryDrawCommandfill (FillStyle fillStyle)=0
 Specifies the fill styling for the geometry, cannot be nullptr. More...
 
virtual GeometryDrawCommandgeometry (std::shared_ptr< Geometry > geometry)=0
 Specifies the geometry to draw. More...
 
virtual GeometryDrawCommandocclusionMode (OcclusionMode occlusionMode)=0
 Determines when this geometry should be painted in 3D in relation to other 3D data. More...
 
virtual GeometryDrawCommandqueryable (bool queryable)=0
 Indicates whether or not the geometry should be considered when a Map::queryFeatures is requested. More...
 
virtual GeometryDrawCommandstroke (ComplexStrokeLineStyle lineStyle)=0
 Specifies the line styling of the geometry. More...
 
virtual GeometryDrawCommandstroke (LineStyle lineStyle)=0
 Specifies the line styling of the geometry. More...
 
virtual void submit ()=0
 Submits this draw command. More...
 
virtual GeometryDrawCommandzOrder (ZOrder zOrder)=0
 The Z-order of the geometry. More...
 

Detailed Description

Command to specify drawing options for a geometry.

Constructor & Destructor Documentation

◆ ~GeometryDrawCommand()

virtual luciad::FeatureCanvas::GeometryDrawCommand::~GeometryDrawCommand ( )
virtualdefault

Member Function Documentation

◆ draped()

virtual GeometryDrawCommand & luciad::FeatureCanvas::GeometryDrawCommand::draped ( bool  draped)
pure virtual

Indicates whether or not the geometry should be draped on top of the terrain.

Draping means that the geometry is painted directly on top of the terrain’s surface relief.

By default, a geometry is draped if it has all zero Z values. Otherwise it will not be draped. You can override the default behaviour by setting this flag true or false. If you explicitly drape a 3D geometry, its 2D "footprint" is painted on the terrain.

This setting is only relevant for 3D maps and is ignored for 2D maps.

Parameters
drapedtrue if the geometry should be draped over terrain.
Returns
this GeometryDrawCommand.

◆ fill()

virtual GeometryDrawCommand & luciad::FeatureCanvas::GeometryDrawCommand::fill ( FillStyle  fillStyle)
pure virtual

Specifies the fill styling for the geometry, cannot be nullptr.

When the given geometry does not have a surface, this style is ignored.

Parameters
fillStylethe fill styling to apply.
Returns
this GeometryDrawCommand.

◆ geometry()

virtual GeometryDrawCommand & luciad::FeatureCanvas::GeometryDrawCommand::geometry ( std::shared_ptr< Geometry geometry)
pure virtual

Specifies the geometry to draw.

This property is mandatory.

Parameters
geometrythe geometry to draw, cannot be nullptr.
Returns
this GeometryDrawCommand.
Exceptions
luciad::NullArgumentExceptionwhen the geometry is nullptr.

◆ occlusionMode()

virtual GeometryDrawCommand & luciad::FeatureCanvas::GeometryDrawCommand::occlusionMode ( OcclusionMode  occlusionMode)
pure virtual

Determines when this geometry should be painted in 3D in relation to other 3D data.

Details and limitations:

  • Mode OcclusionMode::VisibleOnly shows only the part of the geometry that is not obscured by other 3D data. This is the default.
  • Mode OcclusionMode::AlwaysVisible shows the entire geometry even if behind other 3D data. The geometry will appear in front of other objects.
  • Mode OcclusionMode::OccludedOnly shows only the part of the geometry that is behind other 3D data. You typically use this to display obscured geometries in combination with another style that uses OcclusionMode::VisibleOnly mode.
  • This parameter is only relevant in 3D. It is ignored on a 2D map.
  • This parameter is only applied on non-draped geometries.

The default is OcclusionMode::VisibleOnly.

Parameters
occlusionModethe occlusion mode to use
Returns
this GeometryDrawCommand
Since
2024.0

◆ queryable()

virtual GeometryDrawCommand & luciad::FeatureCanvas::GeometryDrawCommand::queryable ( bool  queryable)
pure virtual

Indicates whether or not the geometry should be considered when a Map::queryFeatures is requested.

The default is true.

Parameters
queryabletrue if the geometry should be considered.
Returns
this GeometryDrawCommand.
Since
2020.1

◆ stroke() [1/2]

virtual GeometryDrawCommand & luciad::FeatureCanvas::GeometryDrawCommand::stroke ( ComplexStrokeLineStyle  lineStyle)
pure virtual

Specifies the line styling of the geometry.

This is the geometry's outline if it's a surface.

Only one stroke style can be set, if this function is called when a lineStyle stroke has already been set, it will be overwritten.

Parameters
lineStylethe complex stroke styling to apply.
Returns
this GeometryDrawCommand.
Since
2023.1

◆ stroke() [2/2]

virtual GeometryDrawCommand & luciad::FeatureCanvas::GeometryDrawCommand::stroke ( LineStyle  lineStyle)
pure virtual

Specifies the line styling of the geometry.

This is the geometry's outline if it's a surface.

Only one stroke style can be set, if this function is called when a ComplexStrokeLineStyle stroke has already been set, it will be overwritten.

Parameters
lineStylethe stroke styling to apply.
Returns
this GeometryDrawCommand.

◆ submit()

virtual void luciad::FeatureCanvas::GeometryDrawCommand::submit ( )
pure virtual

Submits this draw command.

Nothing will be painted if the draw command is not submitted.

Exceptions
luciad::LogicExceptionwhen there are missing geometry command calls or the command is already submitted.

◆ zOrder()

virtual GeometryDrawCommand & luciad::FeatureCanvas::GeometryDrawCommand::zOrder ( ZOrder  zOrder)
pure virtual

The Z-order of the geometry.

DrawCommands are painted from lowest to highest Z-order, so DrawCommands with a higher Z-order are painted on top of DrawCommands with a lower Z-order. Note that the Z-order only affects the ordering of features within the same layer. A feature from a certain layer will always get painted above any other feature from a layer that comes lower in the map's layer order, regardless of what Z-order they may have. The default value is 0.

Parameters
zOrderthe Z-order of this geometry.
Returns
this GeometryDrawCommand.
Since
2020.1