NEST main@caf0ae8
 
Loading...
Searching...
No Matches
nest::BallMask< D > Class Template Reference

Mask defining a circular or spherical region. More...

#include <mask.h>

Inheritance diagram for nest::BallMask< D >:
[legend]
Collaboration diagram for nest::BallMask< D >:
[legend]

Public Member Functions

 BallMask (Position< D > center, double radius)
 
 BallMask (const Dictionary &)
 Creates a BallMask from a Dictionary which should contain the key "radius" with a double value and optionally the key "anchor" (the center position) with an array of doubles.
 
 ~BallMask () override
 
bool inside (const Position< D > &p) const override
 
bool inside (const Box< D > &) const override
 
bool outside (const Box< D > &b) const override
 
Box< D > get_bbox () const override
 The whole mask is inside (i.e., false everywhere outside) the bounding box.
 
Dictionary get_dict () const override
 
Mask< D > * clone () const override
 Clone method.
 
bool inside (const Box< 2 > &b) const
 
bool inside (const Box< 3 > &b) const
 
std::string get_name ()
 
std::string get_name ()
 
- Public Member Functions inherited from nest::Mask< D >
 ~Mask () override
 
bool inside (const std::vector< double > &pt) const override
 
AbstractMask * intersect_mask (const AbstractMask &other) const override
 Create the intersection of this mask with another.
 
AbstractMask * union_mask (const AbstractMask &other) const override
 Create the union of this mask with another.
 
AbstractMask * minus_mask (const AbstractMask &other) const override
 Create the difference of this mask and another.
 
virtual bool inside (const std::vector< double > &) const=0
 
- Public Member Functions inherited from nest::AbstractMask
virtual ~AbstractMask ()
 

Static Public Member Functions

static std::string get_name ()
 

Protected Attributes

Position< D > center_
 
double radius_
 

Detailed Description

template<int D>
class nest::BallMask< D >

Mask defining a circular or spherical region.

Constructor & Destructor Documentation

◆ BallMask() [1/2]

template<int D>
nest::BallMask< D >::BallMask ( Position< D >  center,
double  radius 
)
inline
Parameters
centerCenter of sphere
radiusRadius of sphere

◆ BallMask() [2/2]

template<int D>
nest::BallMask< D >::BallMask ( const Dictionary &  d)

Creates a BallMask from a Dictionary which should contain the key "radius" with a double value and optionally the key "anchor" (the center position) with an array of doubles.

References nest::names::anchor(), and nest::names::radius().

Here is the call graph for this function:

◆ ~BallMask()

template<int D>
nest::BallMask< D >::~BallMask ( )
inlineoverride

Member Function Documentation

◆ clone()

template<int D>
Mask< D > * nest::BallMask< D >::clone ( ) const
overridevirtual

Clone method.

Returns
dynamically allocated copy of mask object

Implements nest::Mask< D >.

◆ get_bbox()

template<int D>
Box< D > nest::BallMask< D >::get_bbox ( ) const
overridevirtual

The whole mask is inside (i.e., false everywhere outside) the bounding box.

Returns
bounding box

Implements nest::Mask< D >.

References nest::Box< D >::lower_left, and nest::Box< D >::upper_right.

◆ get_dict()

template<int D>
Dictionary nest::BallMask< D >::get_dict ( ) const
overridevirtual
Returns
a dictionary with the definition for this mask.

Reimplemented from nest::AbstractMask.

References nest::names::anchor(), and nest::names::radius().

Here is the call graph for this function:

◆ get_name() [1/3]

template<int D>
static std::string nest::BallMask< D >::get_name ( )
static
Returns
the name of this mask type.

◆ get_name() [2/3]

std::string nest::BallMask< 2 >::get_name ( )
inline

References nest::names::circular().

Here is the call graph for this function:

◆ get_name() [3/3]

std::string nest::BallMask< 3 >::get_name ( )
inline

References nest::names::spherical().

Here is the call graph for this function:

◆ inside() [1/4]

bool nest::BallMask< 2 >::inside ( const Box< 2 > &  b) const

References nest::inside().

Here is the call graph for this function:

◆ inside() [2/4]

bool nest::BallMask< 3 >::inside ( const Box< 3 > &  b) const

References nest::inside().

Here is the call graph for this function:

◆ inside() [3/4]

template<int D>
bool nest::BallMask< D >::inside ( const Box< D > &  ) const
overridevirtual
Returns
true if the whole box is inside the circle

Implements nest::Mask< D >.

◆ inside() [4/4]

template<int D>
bool nest::BallMask< D >::inside ( const Position< D > &  p) const
overridevirtual
Returns
true if point is inside the circle

Implements nest::Mask< D >.

◆ outside()

template<int D>
bool nest::BallMask< D >::outside ( const Box< D > &  b) const
overridevirtual
Returns
true if the whole box is outside the circle

Reimplemented from nest::Mask< D >.

Member Data Documentation

◆ center_

template<int D>
Position< D > nest::BallMask< D >::center_
protected

◆ radius_

template<int D>
double nest::BallMask< D >::radius_
protected

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