Helios++
Helios software for LiDAR simulations
Vectorial Class Reference

Class to perform util vector operations. More...

#include <Vectorial.h>

Static Public Member Functions

static double directionToAngleXY (glm::dvec3 const u, bool positive=true)
 Translate the normalized director vector to the angle it corresponds in range \([0, 2\pi)\) if positive is requested, in range \([-pi, pi]\) otherwise. More...
 
static double shortestRotationSign (double theta)
 Let theta be the difference between two angles, alpha and beta: \(\theta = \beta - \alpha\). The sign of shortest rotation to go from beta to alpha is computed by this function. More...
 
static double shortestRotationSign (double alpha, double beta)
 Obtain the sign which minimizes the rotation magnitude to go from alpha to beta. More...
 
static double shortestRotationSignXY (glm::dvec3 const u, glm::dvec3 const v)
 Like the Vectorial::shortestRotationSign function but taking the angle from given normalized director vectors over XY. More...
 

Detailed Description

Class to perform util vector operations.

Member Function Documentation

◆ directionToAngleXY()

double Vectorial::directionToAngleXY ( glm::dvec3 const  u,
bool  positive = true 
)
static

Translate the normalized director vector to the angle it corresponds in range \([0, 2\pi)\) if positive is requested, in range \([-pi, pi]\) otherwise.

For this purpose, only X and Y components are considered.

Parameters
uDirector to be translated to angle over XY
Returns
Angle in range over XY for given director vector

◆ shortestRotationSign() [1/2]

double Vectorial::shortestRotationSign ( double  theta)
static

Let theta be the difference between two angles, alpha and beta: \(\theta = \beta - \alpha\). The sign of shortest rotation to go from beta to alpha is computed by this function.

Parameters
thetaAngular difference \(\beta - \alpha\)
Returns
Sign of shortest rotation

◆ shortestRotationSign() [2/2]

double Vectorial::shortestRotationSign ( double  alpha,
double  beta 
)
static

Obtain the sign which minimizes the rotation magnitude to go from alpha to beta.

Angles are expected to be expressed in interval \([0, 2pi)\), corresponding to the direction to angle translation from Vectorial::directionToAngleXY function. Negative angles will be translated and work adequately, as long as they were obtained through aforementioned function too.

Parameters
alphaStart direction angle
betaEnd direction angle
Returns
Sign of shortest rotation
See also
Vectorial::directionToAngleXY
Vectorial::shortestRotationSign(double)

◆ shortestRotationSignXY()

double Vectorial::shortestRotationSignXY ( glm::dvec3 const  u,
glm::dvec3 const  v 
)
static

Like the Vectorial::shortestRotationSign function but taking the angle from given normalized director vectors over XY.

Parameters
uFirst normalized director vector
vSecond normalized director vector
See also
Vectorial::directionToAngleXY
Vectorial::shortestRotationSign(double, double)

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