LuciadCPillar 2023.1.04
|
Options to configure the constraint to restrict the navigation to specific bounds. More...
#include <luciad/maps/MapNavigator.h>
Public Member Functions | |
const std::optional< Bounds > & | getBounds () const |
Returns the bounds constraining the camera. More... | |
double | getPadding () const |
Returns the padding that is added to the bounds constraint options. More... | |
bool | isEnabled () const |
void | setBounds (Bounds bounds) |
Sets the bounds constraining the camera. More... | |
void | setEnabled (bool enabled) |
Enables or disables the constraint The default is true. More... | |
void | setPadding (double padding) |
Sets the padding that is added to the bounds constraint options. More... | |
Options to configure the constraint to restrict the navigation to specific bounds.
See MapNavigator::getBoundsConstraint
for more information.
const std::optional< Bounds > & luciad::MapNavigator::BoundsConstraintOptions::getBounds | ( | ) | const |
Returns the bounds constraining the camera.
double luciad::MapNavigator::BoundsConstraintOptions::getPadding | ( | ) | const |
Returns the padding that is added to the bounds constraint options.
bool luciad::MapNavigator::BoundsConstraintOptions::isEnabled | ( | ) | const |
void luciad::MapNavigator::BoundsConstraintOptions::setBounds | ( | Bounds | bounds | ) |
Sets the bounds constraining the camera.
The default value is std::nullopt
.
bounds | the bounds to constrain the main camera. |
void luciad::MapNavigator::BoundsConstraintOptions::setEnabled | ( | bool | enabled | ) |
Enables or disables the constraint The default is true.
enabled | true to enable the constraint or false to disable it |
void luciad::MapNavigator::BoundsConstraintOptions::setPadding | ( | double | padding | ) |
Sets the padding that is added to the bounds constraint options.
The padding is expressed in device independent pixels. It is applied to the bounds
.
This can for example be useful to make sure lines (with a pixel-sized width) or labels (with a pixel width/height), can still be displayed.
The default is 0.
padding | the padding that is added to the bounds. |