LuciadCPillar 2023.1.04
luciad::PointEditHandle::IVisualAidProvider Class Referenceabstract

This interface allows to calculate a visual aid line based on the location of the handle. More...

#include <luciad/edit/handles/PointEditHandle.h>

Public Member Functions

virtual ~IVisualAidProvider ()=default
 
virtual std::shared_ptr< CurvecalculateVisualAid (const std::shared_ptr< Point > &handleLocation)=0
 Returns a new visual aid line. More...
 

Static Public Member Functions

static std::shared_ptr< IVisualAidProvidercreate (std::function< std::shared_ptr< Curve >(const std::shared_ptr< Point > &handleLocation)> function)
 Creates a default IVisualAidProvider instance that delegates IVisualAidProvider::calculateVisualAid to the given function. More...
 

Detailed Description

This interface allows to calculate a visual aid line based on the location of the handle.

This can for example be a vertical line to connect a point with the ground.

Constructor & Destructor Documentation

◆ ~IVisualAidProvider()

virtual luciad::PointEditHandle::IVisualAidProvider::~IVisualAidProvider ( )
virtualdefault

Member Function Documentation

◆ calculateVisualAid()

virtual std::shared_ptr< Curve > luciad::PointEditHandle::IVisualAidProvider::calculateVisualAid ( const std::shared_ptr< Point > &  handleLocation)
pure virtual

Returns a new visual aid line.

Parameters
handleLocationthe current location of the handle. Never nullptr.
Returns
a new visual aid line. Can be nullptr. In that case, no visual aid line will be painted.

◆ create()

static std::shared_ptr< IVisualAidProvider > luciad::PointEditHandle::IVisualAidProvider::create ( std::function< std::shared_ptr< Curve >(const std::shared_ptr< Point > &handleLocation)>  function)
static

Creates a default IVisualAidProvider instance that delegates IVisualAidProvider::calculateVisualAid to the given function.

This is a convenience method that allows to reduce boiler plate code, and use lambdas.

Parameters
functionthe function that is called by IVisualAidProvider::calculateVisualAid
Returns
an IVisualAidProvider instance based on the given function.