PLaSK library
Loading...
Searching...
No Matches
plask::align::AlignerBase2D< _direction1, _direction2 > Struct Template Reference

Base class for two directions aligner in 3D space, compose and use two 2D aligners. More...

#include <plask/geometry/align.hpp>

Inheritance diagram for plask::align::AlignerBase2D< _direction1, _direction2 >:
[legend]
Collaboration diagram for plask::align::AlignerBase2D< _direction1, _direction2 >:
[legend]

Public Member Functions

 AlignerBase2D ()
 
 AlignerBase2D (const Aligner< direction1 > &dir1aligner, const Aligner< direction2 > &dir2aligner)
 
bool useBounds () const
 Check if this aligner getAlign uses bounding box in calculation.
 
virtual void align (Translation< 3 > &toAlign, const Box3D &childBoundingBox) const
 Set object translation in directions of aligner activity.
 
virtual void align (Translation< 3 > &toAlign) const
 Set object translation in directions of aligner activity.
 
std::string str () const
 Get string representation of this using print method.
 
virtual std::map< std::string, doubleasDict (const AxisNames &axis_names) const
 Get aligner as dictionary.
 
virtual void writeToXML (XMLElement &dest, const AxisNames &axis_names) const
 Write this aligner to XML.
 
bool isNull ()
 

Public Attributes

Aligner< _direction1dir1aligner
 
Aligner< _direction2dir2aligner
 

Static Public Attributes

static const Direction direction1 = _direction1
 
static const Direction direction2 = _direction2
 

Friends

std::ostream & operator<< (std::ostream &out, const Aligner< _direction1, _direction2 > &to_print)
 Print this to stream.
 

Detailed Description

template<Direction _direction1, Direction _direction2>
struct plask::align::AlignerBase2D< _direction1, _direction2 >

Base class for two directions aligner in 3D space, compose and use two 2D aligners.

Definition at line 313 of file align.hpp.

Constructor & Destructor Documentation

◆ AlignerBase2D() [1/2]

template<Direction _direction1, Direction _direction2>
plask::align::AlignerBase2D< _direction1, _direction2 >::AlignerBase2D ( )
inline

Definition at line 322 of file align.hpp.

◆ AlignerBase2D() [2/2]

template<Direction _direction1, Direction _direction2>
plask::align::AlignerBase2D< _direction1, _direction2 >::AlignerBase2D ( const Aligner< direction1 > &  dir1aligner,
const Aligner< direction2 > &  dir2aligner 
)
inline

Definition at line 324 of file align.hpp.

Member Function Documentation

◆ align() [1/2]

template<Direction _direction1, Direction _direction2>
virtual void plask::align::AlignerBase2D< _direction1, _direction2 >::align ( Translation< 3 > &  toAlign) const
inlinevirtual

Set object translation in directions of aligner activity.

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

Parameters
toAligntranslation to set, should have child, which is an object to align

Definition at line 369 of file align.hpp.

◆ align() [2/2]

template<Direction _direction1, Direction _direction2>
virtual void plask::align::AlignerBase2D< _direction1, _direction2 >::align ( Translation< 3 > &  toAlign,
const Box3D childBoundingBox 
) const
inlinevirtual

Set object translation in directions of aligner activity.

This version is called if caller knows child bounding box.

Parameters
toAligntranslation to set, should have child, which is an object to align
childBoundingBoxbounding box of object to align

Definition at line 356 of file align.hpp.

◆ asDict()

template<Direction _direction1, Direction _direction2>
virtual std::map< std::string, double > plask::align::AlignerBase2D< _direction1, _direction2 >::asDict ( const AxisNames axis_names) const
inlinevirtual

Get aligner as dictionary.

Parameters
axis_namesname of axes
Returns
string:double map representing the aligner

Definition at line 399 of file align.hpp.

◆ isNull()

template<Direction _direction1, Direction _direction2>
bool plask::align::AlignerBase2D< _direction1, _direction2 >::isNull ( )
inline

Definition at line 416 of file align.hpp.

◆ str()

template<Direction _direction1, Direction _direction2>
std::string plask::align::AlignerBase2D< _direction1, _direction2 >::str ( ) const
inline

Get string representation of this using print method.

Returns
string representation of this

Definition at line 392 of file align.hpp.

◆ useBounds()

template<Direction _direction1, Direction _direction2>
bool plask::align::AlignerBase2D< _direction1, _direction2 >::useBounds ( ) const
inline

Check if this aligner getAlign uses bounding box in calculation.

Returns
true only if this aligner use bounding box, false if is ignored

Definition at line 347 of file align.hpp.

◆ writeToXML()

template<Direction _direction1, Direction _direction2>
virtual void plask::align::AlignerBase2D< _direction1, _direction2 >::writeToXML ( XMLElement dest,
const AxisNames axis_names 
) const
inlinevirtual

Write this aligner to XML.

Parameters
desttag where attributes describing this should be appended
axis_namesname of axes

Definition at line 411 of file align.hpp.

Friends And Related Symbol Documentation

◆ operator<<

template<Direction _direction1, Direction _direction2>
std::ostream & operator<< ( std::ostream &  out,
const Aligner< _direction1, _direction2 > &  to_print 
)
friend

Print this to stream.

Parameters
outprint destination, output stream
to_printaligner to print
Returns
out stream

Definition at line 384 of file align.hpp.

Member Data Documentation

◆ dir1aligner

template<Direction _direction1, Direction _direction2>
Aligner<_direction1> plask::align::AlignerBase2D< _direction1, _direction2 >::dir1aligner

Definition at line 317 of file align.hpp.

◆ dir2aligner

template<Direction _direction1, Direction _direction2>
Aligner<_direction2> plask::align::AlignerBase2D< _direction1, _direction2 >::dir2aligner

Definition at line 318 of file align.hpp.

◆ direction1

template<Direction _direction1, Direction _direction2>
const Direction plask::align::AlignerBase2D< _direction1, _direction2 >::direction1 = _direction1
static

Definition at line 320 of file align.hpp.

◆ direction2

template<Direction _direction1, Direction _direction2>
const Direction plask::align::AlignerBase2D< _direction1, _direction2 >::direction2 = _direction2
static

Definition at line 320 of file align.hpp.


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