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

Mask defining an elliptical or ellipsoidal region. More...

#include <mask.h>

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

Public Member Functions

 EllipseMask (Position< D > center, double major_axis, double minor_axis, double polar_axis, double azimuth_angle, double polar_angle)
 EllipseMask (const Dictionary &)
 Creates an EllipseMask from a Dictionary which should contain the keys "major_axis" and "minor_axis" with double values, and optionally the keys "polar_axis", "anchor" (the center position), "azimuth_angle" or "polar_angle" with a double, an array of doubles, a double and a double, respectively.
 ~EllipseMask () 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 Position< 2 > &p) const
bool inside (const Position< 3 > &p) const
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.
Public Member Functions inherited from nest::AbstractMask
virtual ~AbstractMask ()

Static Public Member Functions

static std::string get_name ()

Private Member Functions

void create_bbox_ ()

Private Attributes

Position< D > center_
double major_axis_
double minor_axis_
double polar_axis_
double azimuth_angle_
double polar_angle_
double x_scale_
double y_scale_
double z_scale_
double azimuth_cos_
double azimuth_sin_
double polar_cos_
double polar_sin_
Box< D > bbox_

Detailed Description

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

Mask defining an elliptical or ellipsoidal region.

Constructor & Destructor Documentation

◆ EllipseMask() [1/2]

template<int D>
nest::EllipseMask< D >::EllipseMask ( Position< D > center,
double major_axis,
double minor_axis,
double polar_axis,
double azimuth_angle,
double polar_angle )
inline
Parameters
centerCenter of ellipse
major_axisLength of major axis of ellipse or ellipsoid
minor_axisLength of minor axis of ellipse or ellipsoid
polar_axisLength of polar axis of ellipsoid
azimuth_angleAngle in degrees between x-axis and major axis of the ellipse or ellipsoid
polar_angleAngle in degrees between z-axis and polar axis of the ellipsoid

References azimuth_angle_, azimuth_cos_, azimuth_sin_, center_, create_bbox_(), major_axis_, minor_axis_, polar_angle_, polar_axis_, polar_cos_, polar_sin_, x_scale_, y_scale_, and z_scale_.

Referenced by clone().

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

◆ EllipseMask() [2/2]

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

Creates an EllipseMask from a Dictionary which should contain the keys "major_axis" and "minor_axis" with double values, and optionally the keys "polar_axis", "anchor" (the center position), "azimuth_angle" or "polar_angle" with a double, an array of doubles, a double and a double, respectively.

References nest::names::anchor(), nest::names::azimuth_angle(), azimuth_angle_, azimuth_cos_, azimuth_sin_, center_, create_bbox_(), nest::names::major_axis(), major_axis_, nest::names::minor_axis(), minor_axis_, numerics::pi, nest::names::polar_angle(), polar_angle_, nest::names::polar_axis(), polar_axis_, polar_cos_, polar_sin_, x_scale_, y_scale_, and z_scale_.

Here is the call graph for this function:

◆ ~EllipseMask()

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

Member Function Documentation

◆ clone()

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

Clone method.

Returns
dynamically allocated copy of mask object

Implements nest::Mask< D >.

References EllipseMask().

Here is the call graph for this function:

◆ create_bbox_()

template<int D>
void nest::EllipseMask< D >::create_bbox_ ( )
private

References azimuth_angle_, bbox_, center_, major_axis_, minor_axis_, polar_angle_, and polar_axis_.

Referenced by EllipseMask(), and EllipseMask().

Here is the caller graph for this function:

◆ get_bbox()

template<int D>
Box< D > nest::EllipseMask< 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 bbox_.

◆ get_dict()

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

Reimplemented from nest::AbstractMask.

References nest::names::anchor(), nest::names::azimuth_angle(), azimuth_angle_, center_, get_name(), nest::names::major_axis(), major_axis_, nest::names::minor_axis(), minor_axis_, nest::names::polar_angle(), polar_angle_, nest::names::polar_axis(), and polar_axis_.

Here is the call graph for this function:

◆ get_name() [1/3]

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

References nest::names::ellipsoidal().

Here is the call graph for this function:

◆ get_name() [2/3]

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

References nest::names::elliptical().

Here is the call graph for this function:

◆ get_name() [3/3]

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

Referenced by get_dict().

Here is the caller graph for this function:

◆ inside() [1/6]

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

References nest::inside().

Here is the call graph for this function:

◆ inside() [2/6]

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

References nest::inside().

Here is the call graph for this function:

◆ inside() [3/6]

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

Implements nest::Mask< D >.

◆ inside() [4/6]

bool nest::EllipseMask< 2 >::inside ( const Position< 2 > & p) const

◆ inside() [5/6]

bool nest::EllipseMask< 3 >::inside ( const Position< 3 > & p) const

◆ inside() [6/6]

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

Implements nest::Mask< D >.

◆ outside()

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

Reimplemented from nest::Mask< D >.

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

Member Data Documentation

◆ azimuth_angle_

template<int D>
double nest::EllipseMask< D >::azimuth_angle_
private

◆ azimuth_cos_

template<int D>
double nest::EllipseMask< D >::azimuth_cos_
private

◆ azimuth_sin_

template<int D>
double nest::EllipseMask< D >::azimuth_sin_
private

◆ bbox_

template<int D>
Box< D > nest::EllipseMask< D >::bbox_
private

Referenced by create_bbox_(), get_bbox(), and outside().

◆ center_

template<int D>
Position< D > nest::EllipseMask< D >::center_
private

◆ major_axis_

template<int D>
double nest::EllipseMask< D >::major_axis_
private

◆ minor_axis_

template<int D>
double nest::EllipseMask< D >::minor_axis_
private

◆ polar_angle_

template<int D>
double nest::EllipseMask< D >::polar_angle_
private

◆ polar_axis_

template<int D>
double nest::EllipseMask< D >::polar_axis_
private

◆ polar_cos_

template<int D>
double nest::EllipseMask< D >::polar_cos_
private

Referenced by EllipseMask(), EllipseMask(), and inside().

◆ polar_sin_

template<int D>
double nest::EllipseMask< D >::polar_sin_
private

Referenced by EllipseMask(), EllipseMask(), and inside().

◆ x_scale_

template<int D>
double nest::EllipseMask< D >::x_scale_
private

◆ y_scale_

template<int D>
double nest::EllipseMask< D >::y_scale_
private

◆ z_scale_

template<int D>
double nest::EllipseMask< D >::z_scale_
private

Referenced by EllipseMask(), EllipseMask(), and inside().


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