libspatialindex API Reference  (git-trunk)
SpatialIndex::Point Class Reference

#include <Point.h>

Inheritance diagram for SpatialIndex::Point:
Inheritance graph
Collaboration diagram for SpatialIndex::Point:
Collaboration graph

Public Member Functions

 Point ()
 
 Point (const double *pCoords, uint32_t dimension)
 
 Point (const Point &p)
 
 ~Point () override
 
virtual Pointoperator= (const Point &p)
 
virtual bool operator== (const Point &p) const
 
Pointclone () override
 
uint32_t getByteArraySize () override
 
void loadFromByteArray (const uint8_t *data) override
 
void storeToByteArray (uint8_t **data, uint32_t &length) override
 
bool intersectsShape (const IShape &in) const override
 
bool containsShape (const IShape &in) const override
 
bool touchesShape (const IShape &in) const override
 
void getCenter (Point &out) const override
 
uint32_t getDimension () const override
 
void getMBR (Region &out) const override
 
double getArea () const override
 
double getMinimumDistance (const IShape &in) const override
 
virtual double getMinimumDistance (const Point &p) const
 
virtual double getCoordinate (uint32_t index) const
 
virtual void makeInfinite (uint32_t dimension)
 
virtual void makeDimension (uint32_t dimension)
 
- Public Member Functions inherited from Tools::IObject
virtual ~IObject ()=default
 
- Public Member Functions inherited from SpatialIndex::IShape
 ~IShape () override=default
 
- Public Member Functions inherited from Tools::ISerializable
virtual ~ISerializable ()=default
 

Public Attributes

uint32_t m_dimension {0}
 
double * m_pCoords {nullptr}
 

Friends

class Region
 
SIDX_DLL std::ostream & operator<< (std::ostream &os, const Point &pt)
 

Detailed Description

Definition at line 34 of file Point.h.

Constructor & Destructor Documentation

◆ Point() [1/3]

Point::Point ( )
default

Referenced by clone(), and SpatialIndex::TimePoint::TimePoint().

Here is the caller graph for this function:

◆ Point() [2/3]

Point::Point ( const double *  pCoords,
uint32_t  dimension 
)

Definition at line 39 of file Point.cc.

References m_dimension, and m_pCoords.

◆ Point() [3/3]

Point::Point ( const Point p)

Definition at line 48 of file Point.cc.

References m_dimension, and m_pCoords.

◆ ~Point()

Point::~Point ( )
override

Definition at line 57 of file Point.cc.

References m_pCoords.

Member Function Documentation

◆ clone()

Point * Point::clone ( )
overridevirtual

Implements Tools::IObject.

Reimplemented in SpatialIndex::TimePoint.

Definition at line 93 of file Point.cc.

References Point().

Here is the call graph for this function:

◆ containsShape()

bool Point::containsShape ( const IShape in) const
overridevirtual

Implements SpatialIndex::IShape.

Definition at line 145 of file Point.cc.

◆ getArea()

double Point::getArea ( ) const
overridevirtual

Implements SpatialIndex::IShape.

Definition at line 185 of file Point.cc.

◆ getByteArraySize()

uint32_t Point::getByteArraySize ( )
overridevirtual

Implements Tools::ISerializable.

Reimplemented in SpatialIndex::TimePoint.

Definition at line 101 of file Point.cc.

References m_dimension.

Referenced by SpatialIndex::Ball::getByteArraySize(), SpatialIndex::Ball::loadFromByteArray(), and storeToByteArray().

Here is the caller graph for this function:

◆ getCenter()

void Point::getCenter ( Point out) const
overridevirtual

Implements SpatialIndex::IShape.

Definition at line 170 of file Point.cc.

◆ getCoordinate()

double Point::getCoordinate ( uint32_t  index) const
virtual

Definition at line 226 of file Point.cc.

References m_dimension, and m_pCoords.

Referenced by SpatialIndex::Region::containsPoint(), SpatialIndex::Region::getMinimumDistance(), and SpatialIndex::Region::touchesPoint().

Here is the caller graph for this function:

◆ getDimension()

uint32_t Point::getDimension ( ) const
overridevirtual

Implements SpatialIndex::IShape.

Definition at line 175 of file Point.cc.

References m_dimension.

◆ getMBR()

void Point::getMBR ( Region out) const
overridevirtual

Implements SpatialIndex::IShape.

Definition at line 180 of file Point.cc.

References m_dimension, m_pCoords, and Region.

◆ getMinimumDistance() [1/2]

double Point::getMinimumDistance ( const IShape in) const
overridevirtual

Implements SpatialIndex::IShape.

Definition at line 190 of file Point.cc.

References SpatialIndex::Region::getMinimumDistance().

Here is the call graph for this function:

◆ getMinimumDistance() [2/2]

double Point::getMinimumDistance ( const Point p) const
virtual

Definition at line 209 of file Point.cc.

References m_dimension, and m_pCoords.

◆ intersectsShape()

bool Point::intersectsShape ( const IShape in) const
overridevirtual

Implements SpatialIndex::IShape.

Definition at line 132 of file Point.cc.

References SpatialIndex::Region::containsPoint().

Here is the call graph for this function:

◆ loadFromByteArray()

void Point::loadFromByteArray ( const uint8_t *  data)
overridevirtual

Implements Tools::ISerializable.

Reimplemented in SpatialIndex::TimePoint.

Definition at line 106 of file Point.cc.

References m_dimension, m_pCoords, and makeDimension().

Referenced by SpatialIndex::Ball::loadFromByteArray().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeDimension()

void Point::makeDimension ( uint32_t  dimension)
virtual

Reimplemented in SpatialIndex::TimePoint, and SpatialIndex::MovingPoint.

Definition at line 243 of file Point.cc.

References m_dimension, and m_pCoords.

Referenced by SpatialIndex::Region::getCenter(), SpatialIndex::MovingPoint::getPointAtTime(), loadFromByteArray(), makeInfinite(), and operator=().

Here is the caller graph for this function:

◆ makeInfinite()

void Point::makeInfinite ( uint32_t  dimension)
virtual

Reimplemented in SpatialIndex::TimePoint, and SpatialIndex::MovingPoint.

Definition at line 234 of file Point.cc.

References m_dimension, m_pCoords, and makeDimension().

Here is the call graph for this function:

◆ operator=()

Point & Point::operator= ( const Point p)
virtual

Definition at line 62 of file Point.cc.

References m_dimension, m_pCoords, and makeDimension().

Here is the call graph for this function:

◆ operator==()

bool Point::operator== ( const Point p) const
virtual

Definition at line 73 of file Point.cc.

References m_dimension, and m_pCoords.

◆ storeToByteArray()

void Point::storeToByteArray ( uint8_t **  data,
uint32_t &  length 
)
overridevirtual

Implements Tools::ISerializable.

Reimplemented in SpatialIndex::TimePoint.

Definition at line 117 of file Point.cc.

References getByteArraySize(), m_dimension, and m_pCoords.

Referenced by SpatialIndex::Ball::storeToByteArray().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ touchesShape()

bool Point::touchesShape ( const IShape in) const
overridevirtual

Implements SpatialIndex::IShape.

Definition at line 150 of file Point.cc.

References SpatialIndex::Region::touchesPoint().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator<<

SIDX_DLL std::ostream& operator<< ( std::ostream &  os,
const Point pt 
)
friend

◆ Region

friend class Region
friend

Definition at line 80 of file Point.h.

Referenced by getMBR().

Member Data Documentation

◆ m_dimension

uint32_t SpatialIndex::Point::m_dimension {0}

Definition at line 77 of file Point.h.

Referenced by SpatialIndex::Region::combinePoint(), SpatialIndex::Ball::containsLineSegment(), SpatialIndex::Region::containsPoint(), SpatialIndex::MovingRegion::containsPointInTime(), SpatialIndex::Ball::containsRegion(), SpatialIndex::Ball::containsShape(), SpatialIndex::Ball::getArea(), getByteArraySize(), SpatialIndex::TimePoint::getByteArraySize(), SpatialIndex::MovingPoint::getByteArraySize(), SpatialIndex::MovingPoint::getCoord(), getCoordinate(), getDimension(), SpatialIndex::Ball::getDimension(), getMBR(), SpatialIndex::Ball::getMBR(), SpatialIndex::MovingPoint::getMBRAtTime(), getMinimumDistance(), SpatialIndex::Region::getMinimumDistance(), SpatialIndex::MovingPoint::getPointAtTime(), SpatialIndex::MovingPoint::getProjectedCoord(), SpatialIndex::MovingPoint::getVCoord(), SpatialIndex::MovingPoint::getVMBR(), SpatialIndex::MovingRegion::intersectsPointInTime(), SpatialIndex::LineSegment::LineSegment(), loadFromByteArray(), SpatialIndex::TimePoint::loadFromByteArray(), SpatialIndex::MovingPoint::loadFromByteArray(), SpatialIndex::MovingPoint::makeDimension(), makeDimension(), SpatialIndex::TimePoint::makeDimension(), SpatialIndex::MovingPoint::makeInfinite(), makeInfinite(), SpatialIndex::TimePoint::makeInfinite(), SpatialIndex::MovingPoint::MovingPoint(), SpatialIndex::MovingRegion::MovingRegion(), SpatialIndex::operator<<(), operator=(), SpatialIndex::MovingPoint::operator=(), SpatialIndex::TimePoint::operator=(), operator==(), SpatialIndex::MovingPoint::operator==(), SpatialIndex::TimePoint::operator==(), Point(), SpatialIndex::TPRTree::TPRTree::pointLocationQuery(), SpatialIndex::RTree::RTree::pointLocationQuery(), SpatialIndex::MVRTree::MVRTree::pointLocationQuery(), SpatialIndex::Region::Region(), storeToByteArray(), SpatialIndex::TimePoint::storeToByteArray(), SpatialIndex::MovingPoint::storeToByteArray(), SpatialIndex::TimePoint::TimePoint(), SpatialIndex::Region::touchesPoint(), and SpatialIndex::MovingPoint::~MovingPoint().

◆ m_pCoords

double* SpatialIndex::Point::m_pCoords {nullptr}

The documentation for this class was generated from the following files: