PLaSK library

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

Base class for one direction aligners (in 2D and 3D spaces). More...

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

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

## Public Types
enum | { direction2D = DirectionTo2D<_direction>::value }

## Public Member Functions
| Aligner ()
| Aligner (AlignerImpl< _direction > *impl)
void | align (Translation< 2 > &toAlign, const Box2D &childBoundingBox) const
| Set object coordinate in direction of aligner activity.
void | align (Translation< 2 > &toAlign) const
| Set object translation in direction of aligner activity.
Public Member Functions inherited from plask::align::AlignerBase< _direction >
| 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
Static Public Attributes inherited from plask::align::AlignerBase< _direction >
static const Direction | direction = _direction
| Direction of activity.

## 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::Aligner< _direction >

Base class for one direction aligners (in 2D and 3D spaces).

Definition at line 242 of file align.hpp.

## Member Enumeration Documentation

## ◆ anonymous enum

template<Direction _direction>

anonymous enum

Enumerator
direction2D |

Definition at line 246 of file align.hpp.

## Constructor & Destructor Documentation

## ◆ Aligner() [1/2]

template<Direction _direction>

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

Definition at line 244 of file align.hpp.

## ◆ Aligner() [2/2]

template<Direction _direction>

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

Definition at line 244 of file align.hpp.

## Member Function Documentation

## ◆ align() [1/2]

template<Direction _direction>

void plask::align::Aligner< _direction >::align | ( | Translation< 2 > & | toAlign | ) | const
| inline

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 271 of file align.hpp.

## ◆ align() [2/2]

template<Direction _direction>

void plask::align::Aligner< _direction >::align | ( | Translation< 2 > & | toAlign,
|  | const Box2D & | 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 261 of file align.hpp.

## Member Data Documentation

## ◆ direction

template<Direction _direction>

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

Definition at line 244 of file align.hpp.

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

- plask/geometry/align.hpp