LuciadCPillar 2023.1.04
luciad::PatchCreator Class Referencefinal

This class can create patch instances, based on other created geometries. More...

#include <luciad/create/geometries/PatchCreator.h>

Inheritance diagram for luciad::PatchCreator:
luciad::IGeometryCreator

Public Member Functions

 PatchCreator (std::shared_ptr< IGeometryCreator > delegateCreator)
 Creates a new PatchCreator. More...
 
 ~PatchCreator () override
 
EventResult onEvent (const std::shared_ptr< IInputEvent > &inputEvent, const std::shared_ptr< FeatureCreateContext > &context) override
 Handles the given event, and returns if the event was handled or not. More...
 
void start (std::shared_ptr< IGeometryCreateCallback > callback, const std::shared_ptr< FeatureCreateContext > &context) override
 This method is called to start creation. More...
 
- Public Member Functions inherited from luciad::IGeometryCreator
virtual ~IGeometryCreator ()=default
 
virtual EventResult onEvent (const std::shared_ptr< IInputEvent > &inputEvent, const std::shared_ptr< FeatureCreateContext > &context)=0
 Handles the given event, and returns if the event was handled or not. More...
 
virtual void start (std::shared_ptr< IGeometryCreateCallback > callback, const std::shared_ptr< FeatureCreateContext > &context)=0
 This method is called to start creation. More...
 

Detailed Description

This class can create patch instances, based on other created geometries.

It is a wrapper class, that takes the result of another IGeometryCreator, and creates a Patch from Ring geometries that are created. If the wrapped creator does not create a Ring, it is left as-is.

This creator doesn't consume any events itself, but it delegates the events to the wrapped creator instance.

Since
2020.1

Constructor & Destructor Documentation

◆ PatchCreator()

luciad::PatchCreator::PatchCreator ( std::shared_ptr< IGeometryCreator delegateCreator)
explicit

Creates a new PatchCreator.

Parameters
delegateCreatorthe delegate creator to use

◆ ~PatchCreator()

luciad::PatchCreator::~PatchCreator ( )
override

Member Function Documentation

◆ onEvent()

EventResult luciad::PatchCreator::onEvent ( const std::shared_ptr< IInputEvent > &  inputEvent,
const std::shared_ptr< FeatureCreateContext > &  context 
)
overridevirtual

Handles the given event, and returns if the event was handled or not.

Parameters
contextthe context, cannot be nullptr
inputEventan event, cannot be nullptr
Returns
if the event was consumed or not
Exceptions
NullArgumentExceptionwhen nullptr is passed.

Implements luciad::IGeometryCreator.

◆ start()

void luciad::PatchCreator::start ( std::shared_ptr< IGeometryCreateCallback callback,
const std::shared_ptr< FeatureCreateContext > &  context 
)
overridevirtual

This method is called to start creation.

After this call, IGeometryCreator::onEvent can be called.

When a IGeometryCreator was started, it can not be started again until it has finished. Implementations of this method are encouraged to throw an exception in that case to signal a programming error by the caller of this method.

Parameters
contextthe context, cannot be nullptr
callbackthe callback to signal geometry changes, and whether creation for the geometry has finished, cannot be nullptr.
Exceptions
NullArgumentExceptionwhen nullptr is passed.

Implements luciad::IGeometryCreator.