Celeritas  0.5.0-56+6b053cd
Typedefs | Functions
VariantTransform.hh File Reference
#include <variant>
#include "corecel/cont/VariantUtils.hh"
#include "NoTransformation.hh"
#include "SignedPermutation.hh"
#include "TransformTypeTraits.hh"
#include "Transformation.hh"
#include "Translation.hh"
This graph shows which files directly or indirectly include this file:

Typedefs

using celeritas::VariantTransform = EnumVariant< TransformType, TransformTypeTraits >
 std::variant for all transforms.
 

Functions

VariantTransform celeritas::apply_transform (VariantTransform const &left, VariantTransform const &right)
 Apply the left "daughter-to-parent" transform to the right. More...
 
VariantTransform celeritas::calc_inverse (VariantTransform const &transform)
 Calculate the inverse of a transform.
 
BoundingBox< real_type > celeritas::apply_transform (VariantTransform const &transform, BoundingBox< real_type > const &bbox)
 

Function Documentation

◆ apply_transform()

VariantTransform celeritas::apply_transform ( VariantTransform const &  left,
VariantTransform const &  right 
)

Apply the left "daughter-to-parent" transform to the right.

The resulting variant may be a monostate (identity), translation (no rotation), or full transformation.

The resulting transform has rotation

\[ \mathbf{R}' = \mathbf{R}_2 \]

and translation

\[ \mathbf{t}' = \mathbf{R}_1\mathbf{t}_2 + \mathbf{t}_1 \]