PLaSK library

Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Friends | List of all members
plask::align::AlignerBase< _direction > Struct Template Reference

`#include <plask/geometry/align.hpp>`

Inheritance diagram for plask::align::AlignerBase< _direction >:
[legend]
Collaboration diagram for plask::align::AlignerBase< _direction >:
[legend]

## Public Member Functions
| AlignerBase ()
| AlignerBase (AlignerImpl< _direction > *impl)
double | getCoordinate () const
| Get coordinate to which this aligner align.
double | getAlign (double low, double hi) const
| Get translation for aligned object.
bool | useBounds () const
| Check if this aligner getAlign use bounds (low and hi parameters) in calculation.
double | align (Translation< 3 > &toAlign, const Box3D &childBoundingBox) const
| Set object coordinate in direction of aligner activity.
virtual double | align (Translation< 3 > &toAlign) const
| Set object translation in direction of aligner activity.
virtual std::string | key (const AxisNames &axis_names) const
| Get aligner name.
std::map< std::string, double > | asDict (const AxisNames &axis_names) const
| Get aligner as dictionary.
void | writeToXML (XMLElement &dest, const AxisNames &axis_names) const
| Write this aligner to XML.
std::string | str () const
| Get string representation of this using print method.
Public Member Functions inherited from plask::HolderRef< AlignerImpl< _direction > >
| HolderRef ()
| HolderRef (AlignerImpl< _direction > *held)
| Construct a holder with given `held` object.
bool | isNotNull () const
bool | isNull () const
void | reset (AlignerImpl< _direction > *new_held)

## Static Public Attributes
static const Direction | direction = _direction
| Direction of activity.

## Friends
std::ostream & | operator<< (std::ostream &out, const AlignerBase< _direction > &to_print)
| Print this to stream.

## Additional Inherited Members
Protected Attributes inherited from plask::HolderRef< AlignerImpl< _direction > >
shared_ptr< AlignerImpl< _direction > > | held
| Hold object. Typically can be nullptr only after move assignment.

## Detailed Description

template<Direction _direction>
struct plask::align::AlignerBase< _direction >

Definition at line 143 of file align.hpp.

## Constructor & Destructor Documentation

## ◆ AlignerBase() [1/2]

template<Direction _direction>

plask::align::AlignerBase< _direction >::AlignerBase | ( |  | ) |
| inline

Definition at line 145 of file align.hpp.

## ◆ AlignerBase() [2/2]

template<Direction _direction>

plask::align::AlignerBase< _direction >::AlignerBase | ( | AlignerImpl< _direction > * | impl | ) |
| inline

Definition at line 147 of file align.hpp.

## Member Function Documentation

## ◆ align() [1/2]

template<Direction _direction>

virtual double plask::align::AlignerBase< _direction >::align | ( | Translation< 3 > & | toAlign | ) | const
| inline virtual

Set object translation in direction of aligner activity.

This version is called if caller doesn't know child bounding box.

Parameters

  toAlign | translation to set, should have child, which is an object to align

Definition at line 188 of file align.hpp.

## ◆ align() [2/2]

template<Direction _direction>

double plask::align::AlignerBase< _direction >::align | ( | Translation< 3 > & | toAlign,
|  | const Box3D & | childBoundingBox
| ) |  | const
| inline

Set object coordinate in direction of aligner activity.

This version is called if caller knows child bounding box.

Parameters

  toAlign | translation to set, should have child, which is an object to align
  childBoundingBox | bounding box of object to align

Definition at line 178 of file align.hpp.

## ◆ asDict()

template<Direction _direction>

std::map< std::string, double > plask::align::AlignerBase< _direction >::asDict | ( | const AxisNames & | axis_names | ) | const
| inline

Get aligner as dictionary.

Parameters

  axis_names | name of axes

Returns
  string:double map representing the aligner

Definition at line 204 of file align.hpp.

## ◆ getAlign()

template<Direction _direction>

double plask::align::AlignerBase< _direction >::getAlign | ( | double | low,
|  | double | hi
| ) |  | const
| inline

Get translation for aligned object.

Parameters

  low,hi | aligned object bounds in direction of activity of this aligner

Returns
  aligned object translation in direction of activity

Definition at line 163 of file align.hpp.

## ◆ getCoordinate()

template<Direction _direction>

double plask::align::AlignerBase< _direction >::getCoordinate | ( |  | ) | const
| inline

Get coordinate to which this aligner align.

Returns
  coordinate to which this aligner align.

Definition at line 156 of file align.hpp.

## ◆ key()

template<Direction _direction>

virtual std::string plask::align::AlignerBase< _direction >::key | ( | const AxisNames & | axis_names | ) | const
| inline virtual

Get aligner name.

Parameters

  axis_names | name of axes

Returns
  name of the aligner

Definition at line 197 of file align.hpp.

## ◆ str()

template<Direction _direction>

std::string plask::align::AlignerBase< _direction >::str | ( |  | ) | const
| inline

Get string representation of this using print method.

Returns
  string representation of this

Definition at line 232 of file align.hpp.

## ◆ useBounds()

template<Direction _direction>

bool plask::align::AlignerBase< _direction >::useBounds | ( |  | ) | const
| inline

Check if this aligner getAlign use bounds (low and hi parameters) in calculation.

Returns
  `true` only if this aligner use bounds, `false` if bounds are ignored

Definition at line 169 of file align.hpp.

## ◆ writeToXML()

template<Direction _direction>

void plask::align::AlignerBase< _direction >::writeToXML | ( | XMLElement & | dest,
|  | const AxisNames & | axis_names
| ) |  | const
| inline

Write this aligner to XML.

Parameters

  dest | tag where attributes describing this should be appended
  axis_names | name of axes

Definition at line 214 of file align.hpp.

## Friends And Related Symbol Documentation

## ◆ operator<<

template<Direction _direction>

std::ostream & operator<< | ( | std::ostream & | out,
|  | const AlignerBase< _direction > & | to_print
| ) |  |
| friend

Print this to stream.

Parameters

  out | print destination, output stream
  to_print | aligner to print

Returns
  out stream

Definition at line 224 of file align.hpp.

## Member Data Documentation

## ◆ direction

template<Direction _direction>

const Direction plask::align::AlignerBase< _direction >::direction = _direction
| static

Direction of activity.

Definition at line 150 of file align.hpp.

The documentation for this struct was generated from the following file:

- plask/geometry/align.hpp