minimc 0.5.1
Loading...
Searching...
No Matches
Direction Class Reference

Point in \( \mathbb{R}^{3} \) subject to \( \lVert v \rVert = 1 \). More...

#include <Point.hpp>

Inheritance diagram for Direction:
Collaboration diagram for Direction:

Public Member Functions

 Direction (const pugi::xml_node &pointtype_node) noexcept
 Constructs a Direction from a PointType node. More...
 
 Direction (const Real &x, const Real &y, const Real &z) noexcept
 Constructs a Direction with the given components.
 
 Direction (RNG &rng) noexcept
 Constructs an isotropically sampled Direction.
 
 Direction (const Direction &d, const Real &mu, const Real &phi) noexcept
 Constructs a new Direction that has a given cosine \( \mu \) with respect to an exsiting Direction. More...
 
 Direction (const Point &other) noexcept
 Constructs the Direction with the contents of a Point.
 
 Direction (Point &&other) noexcept
 Move constructor. Constructs the Direction with the contents of a Point. The given Point is normalized.
 
- Public Member Functions inherited from Point
 Point () noexcept
 Default constructor. Creates a Point at the origin;.
 
 Point (const pugi::xml_node &pointtype_node) noexcept
 Constructs a Point from a PointType node. More...
 
 Point (const Real &x, const Real &y, const Real &z) noexcept
 Constructs a Point with the given components.
 
const PointNormalize () noexcept
 Scales the point to satisfy \( \lVert v \rVert = 1 \).
 
Real Dot (const Point &rhs) const noexcept
 Returns the inner product of this and another Point.
 
Point Cross (const Point &rhs) const noexcept
 Returns the cross product of this and another Point.
 
Pointoperator+= (const Point &rhs) noexcept
 Adds the given Point to the current Point.
 
Pointoperator/= (const Real &rhs) noexcept
 Divides each element of this Point with rhs.
 
bool operator== (const Point &rhs) const noexcept
 Returns true if each corresponding element is equal.
 

Additional Inherited Members

- Protected Attributes inherited from Point
Real x {0}
 x component
 
Real y {0}
 y component
 
Real z {0}
 z component
 

Detailed Description

Point in \( \mathbb{R}^{3} \) subject to \( \lVert v \rVert = 1 \).

All users of this class can assume that the base Point is normalized.

Note
Maintainers of this class must take care to keep the underlying Point normalized by calling Normalize() when appropriate.

Constructor & Destructor Documentation

◆ Direction() [1/2]

Direction::Direction ( const pugi::xml_node &  pointtype_node)
noexcept

Constructs a Direction from a PointType node.

PointType is a complexType defined in the minimc XML schema.

◆ Direction() [2/2]

Direction::Direction ( const Direction d,
const Real mu,
const Real phi 
)
noexcept

Constructs a new Direction that has a given cosine \( \mu \) with respect to an exsiting Direction.

Given a Direction \( \boldsymbol{\Omega}^{\prime} \), the new Direction \( \boldsymbol{\Omega} \) will satisfy \( \boldsymbol{\Omega}^{\prime} \cdot \boldsymbol{\Omega} = \mu \).

Parameters
dThe reference direction \( \boldsymbol{\Omega}^{\prime} \)
muThe cosine \( \mu \).
phiThe azimuthal angle about \( \boldsymbol{\Omega}^{\prime} \). This is largely arbitrary since scattering is usually azimuthally symmetric.

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