LuciadCPillar 2025.0.02
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
luciad::Patch Class Referencefinal

A patch is a surface based on a single ring, thus not having any holes. More...

#include <luciad/geometries/Patch.h>

Inheritance diagram for luciad::Patch:
luciad::Surface luciad::Geometry

Public Member Functions

 ~Patch () override
 
bool contains2D (Coordinate point) const
 Returns if this patch contains the given point. More...
 
const std::shared_ptr< Ring > & getBaseGeometry () const
 Returns the base ring geometry on which the patch is based. More...
 
Bounds getBounds () const override
 Returns the bounds for the geometry object. More...
 
std::shared_ptr< CoordinateReferencegetReference () const override
 Returns the coordinate reference of the geometry. More...
 
- Public Member Functions inherited from luciad::Geometry
virtual ~Geometry ()=default
 
virtual Bounds getBounds () const =0
 Returns the bounds for the geometry object. More...
 
virtual std::shared_ptr< CoordinateReferencegetReference () const =0
 Returns the coordinate reference of the geometry. More...
 

Protected Member Functions

size_t getHash () const override
 Returns the hash value for this geometry. More...
 
virtual size_t getHash () const =0
 Returns the hash value for this geometry. More...
 

Detailed Description

A patch is a surface based on a single ring, thus not having any holes.

You can read more about the available geometries here.

See also
GeometryFactory::createPatch

Constructor & Destructor Documentation

◆ ~Patch()

luciad::Patch::~Patch ( )
override

Member Function Documentation

◆ contains2D()

bool luciad::Patch::contains2D ( Coordinate  point) const

Returns if this patch contains the given point.

For these calculations, the height value of the given point or base geometry is ignored. I.e. only the horizontal coordinates are taken into account.

Limitations:

Parameters
pointa point, defined in the same reference as the reference of this Patch
Returns
whether this patch contains the given point.
Exceptions
luciad::InvalidArgumentExceptionwhen calling this function on a patch with a geodetic PolylineRing base geometry with linear interpolation.
Since
2025.0

◆ getBaseGeometry()

const std::shared_ptr< Ring > & luciad::Patch::getBaseGeometry ( ) const

Returns the base ring geometry on which the patch is based.

Returns
the base ring geometry on which the patch is based.

◆ getBounds()

Bounds luciad::Patch::getBounds ( ) const
overridevirtual

Returns the bounds for the geometry object.

Returns
the bounds for the geometry object.
Exceptions
luciad::InvalidArgumentExceptionif the bounds could not be computed. For example, when the geometry is defined by invalid points.

Implements luciad::Geometry.

◆ getHash()

size_t luciad::Patch::getHash ( ) const
overrideprotectedvirtual

Returns the hash value for this geometry.

Returns
the hash value for this geometry.

Implements luciad::Geometry.

◆ getReference()

std::shared_ptr< CoordinateReference > luciad::Patch::getReference ( ) const
overridevirtual

Returns the coordinate reference of the geometry.

Returns
the coordinate reference of the geometry.

Implements luciad::Geometry.