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

#include <Ball.h>

Inheritance diagram for SpatialIndex::Ball:
Inheritance graph
Collaboration diagram for SpatialIndex::Ball:
Collaboration graph

Public Member Functions

 Ball ()
 
 Ball (double radius, const Point &center)
 
 Ball (double radius, const double *pCoords, uint32_t dimension)
 
 Ball (const Ball &b)
 
 ~Ball () override
 
virtual Balloperator= (const Ball &b)
 
virtual bool operator== (const Ball &b) const
 
Ballclone () 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 (SpatialIndex::Point &out) const override
 
uint32_t getDimension () const override
 
void getMBR (SpatialIndex::Region &out) const override
 
double getArea () const override
 
double getMinimumDistance (const IShape &in) const override
 
virtual bool containsLineSegment (const SpatialIndex::LineSegment *line) const
 
virtual bool containsRegion (const SpatialIndex::Region *region) const
 
bool containsPoint (const Point *point) const
 
bool containsBall (const Ball *ball) const
 
- 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

double m_radius {0.0}
 
Point m_centerPoint
 

Detailed Description

Definition at line 37 of file Ball.h.

Constructor & Destructor Documentation

◆ Ball() [1/4]

Ball::Ball ( )
default

Referenced by clone().

Here is the caller graph for this function:

◆ Ball() [2/4]

Ball::Ball ( double  radius,
const Point center 
)

Definition at line 45 of file Ball.cc.

References m_centerPoint, and m_radius.

◆ Ball() [3/4]

Ball::Ball ( double  radius,
const double *  pCoords,
uint32_t  dimension 
)

Definition at line 51 of file Ball.cc.

References m_centerPoint, m_radius, and ~Ball().

Here is the call graph for this function:

◆ Ball() [4/4]

Ball::Ball ( const Ball b)

Definition at line 39 of file Ball.cc.

References m_centerPoint, and m_radius.

◆ ~Ball()

Ball::~Ball ( )
overridedefault

Referenced by Ball().

Here is the caller graph for this function:

Member Function Documentation

◆ clone()

Ball * Ball::clone ( )
overridevirtual

Implements Tools::IObject.

Definition at line 79 of file Ball.cc.

References Ball().

Here is the call graph for this function:

◆ containsBall()

bool SpatialIndex::Ball::containsBall ( const Ball ball) const
inline

Definition at line 84 of file Ball.h.

References m_centerPoint, and m_radius.

Referenced by containsShape().

Here is the caller graph for this function:

◆ containsLineSegment()

bool Ball::containsLineSegment ( const SpatialIndex::LineSegment line) const
virtual

◆ containsPoint()

bool SpatialIndex::Ball::containsPoint ( const Point point) const
inline

Definition at line 79 of file Ball.h.

Referenced by containsShape().

Here is the caller graph for this function:

◆ containsRegion()

bool Ball::containsRegion ( const SpatialIndex::Region region) const
virtual

Definition at line 183 of file Ball.cc.

References m_centerPoint, SpatialIndex::Point::m_dimension, SpatialIndex::Point::m_pCoords, SpatialIndex::Region::m_pHigh, SpatialIndex::Region::m_pLow, and m_radius.

Referenced by containsShape().

Here is the caller graph for this function:

◆ containsShape()

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

◆ getArea()

double Ball::getArea ( ) const
overridevirtual

Implements SpatialIndex::IShape.

Definition at line 171 of file Ball.cc.

References m_centerPoint, SpatialIndex::Point::m_dimension, M_PI, and m_radius.

◆ getByteArraySize()

uint32_t Ball::getByteArraySize ( )
overridevirtual

Implements Tools::ISerializable.

Definition at line 87 of file Ball.cc.

References SpatialIndex::Point::getByteArraySize(), and m_centerPoint.

Referenced by storeToByteArray().

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

◆ getCenter()

void Ball::getCenter ( SpatialIndex::Point out) const
overridevirtual

Implements SpatialIndex::IShape.

Definition at line 151 of file Ball.cc.

References m_centerPoint.

◆ getDimension()

uint32_t Ball::getDimension ( ) const
overridevirtual

Implements SpatialIndex::IShape.

Definition at line 156 of file Ball.cc.

References m_centerPoint, and SpatialIndex::Point::m_dimension.

◆ getMBR()

void Ball::getMBR ( SpatialIndex::Region out) const
overridevirtual

◆ getMinimumDistance()

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

Implements SpatialIndex::IShape.

Definition at line 178 of file Ball.cc.

References SpatialIndex::IShape::getMinimumDistance(), m_centerPoint, and m_radius.

Here is the call graph for this function:

◆ intersectsShape()

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

Implements SpatialIndex::IShape.

Definition at line 116 of file Ball.cc.

References SpatialIndex::IShape::getMinimumDistance(), m_centerPoint, and m_radius.

Here is the call graph for this function:

◆ loadFromByteArray()

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

Implements Tools::ISerializable.

Definition at line 92 of file Ball.cc.

References SpatialIndex::Point::getByteArraySize(), SpatialIndex::Point::loadFromByteArray(), m_centerPoint, and m_radius.

Here is the call graph for this function:

◆ operator=()

Ball & Ball::operator= ( const Ball b)
virtual

Definition at line 60 of file Ball.cc.

References m_centerPoint, and m_radius.

◆ operator==()

bool Ball::operator== ( const Ball b) const
virtual

Definition at line 70 of file Ball.cc.

References m_centerPoint, and m_radius.

◆ storeToByteArray()

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

Implements Tools::ISerializable.

Definition at line 99 of file Ball.cc.

References getByteArraySize(), m_centerPoint, m_radius, and SpatialIndex::Point::storeToByteArray().

Here is the call graph for this function:

◆ touchesShape()

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

Implements SpatialIndex::IShape.

Definition at line 145 of file Ball.cc.

References SpatialIndex::IShape::getMinimumDistance(), m_centerPoint, and m_radius.

Here is the call graph for this function:

Member Data Documentation

◆ m_centerPoint

◆ m_radius


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