Helios++
Helios software for LiDAR simulations
LadLut Class Reference

Leaf Angle Distribution Look-Up Table. More...

#include <LadLut.h>

Public Member Functions

 LadLut ()=default
 LadLut default constructor.
 
 LadLut (LadLut &ll)
 
void computeAngles ()
 Compute angles. More...
 
double computeSigma (double padBVTotal, glm::dvec3 direction)
 
double computeSigma (double padBVTotal, double x, double y, double z)
 Compute sigma ( \(\sigma\)) More...
 
double interpolate (glm::dvec3 direction)
 
double interpolate (double x, double y, double z)
 Interpolate \(g\). More...
 
void transformToLadLutDomain (double a, double b, double c, double &x, double &y, double &z)
 Transform a vector \((a,b,c)\) from standard domain to a vector \((x,y=0,z)\) in LadLut domain. More...
 
void fastTransformToLadLutDomain (double a, double b, double c, double &x, double &y, double &z)
 Fast verision of transformToLadLutDomain function. More...
 
void findEnvelopmentDirections (double wx, double wy, double wz, size_t &uIdx, double &ux, double &uy, double &uz, size_t &vIdx, double &vx, double &vy, double &vz, double &a, double &b)
 Find the vector immediately after \(\hat{w}\) ( \(\hat{u}\)) and the one immediately before \(\hat{w}\) ( \(\hat{v}\)) More...
 

Public Attributes

std::vector< double > X
 X component of normalized director vector for each record.
 
std::vector< double > Y
 Y component of normalized director vector for each record.
 
std::vector< double > Z
 Z component of normalized director vector for each record.
 
std::vector< double > G
 Function evaluation for each record.
 
std::vector< double > angles
 The angle for each director vector with respect to \((0, 0, 1)\).
 

Static Public Attributes

static const double eps = 0.0000001
 Used to consider decimal precision. Two values will be treated as equal when the difference between them is not greater than eps ( \(\epsilon\))
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Friends

class boost::serialization::access
 

Detailed Description

Leaf Angle Distribution Look-Up Table.

Class representing the look-up table for leaf angle distribution

Member Function Documentation

◆ computeAngles()

void LadLut::computeAngles ( )

Compute angles.

See also
LadLut::angles

◆ computeSigma() [1/2]

double LadLut::computeSigma ( double  padBVTotal,
glm::dvec3  direction 
)
inline

◆ computeSigma() [2/2]

double LadLut::computeSigma ( double  padBVTotal,
double  x,
double  y,
double  z 
)

Compute sigma ( \(\sigma\))

\[ \sigma = \frac{p \cdot g}{2{\pi}} \]

Parameters
padBVTotalThe PadBVTotal value ( \(p\))
xThe x component of normalized director vector
yThe y component of normalized director vector
zThe z component of normalized director vector
Returns
Sigma \(\sigma\)

◆ fastTransformToLadLutDomain()

void LadLut::fastTransformToLadLutDomain ( double  a,
double  b,
double  c,
double &  x,
double &  y,
double &  z 
)
inline

Fast verision of transformToLadLutDomain function.

\[ \hat{u} = (x, y, z) \longrightarrow \hat{v} = \left(\sqrt{x^{2}+y^{2}}, 0, z\right) \]

See also
LadLut::transformToLadLutDomain

◆ findEnvelopmentDirections()

void LadLut::findEnvelopmentDirections ( double  wx,
double  wy,
double  wz,
size_t &  uIdx,
double &  ux,
double &  uy,
double &  uz,
size_t &  vIdx,
double &  vx,
double &  vy,
double &  vz,
double &  a,
double &  b 
)

Find the vector immediately after \(\hat{w}\) ( \(\hat{u}\)) and the one immediately before \(\hat{w}\) ( \(\hat{v}\))

Parameters
[in]wxX component of w vector
[in]wyY component of w vector
[in]wzZ component of w vector
[out]uIdxIndex of the closet direction after w
[out]uxX component of the closest direction after w
[out]uyY component of the closest direction after w
[out]uzZ component of the closest direction after w
[out]vIdxIndex of the closest direction before w
[out]vxX component of the closest direction before w
[out]vyY component of the closest direction before w
[out]vzZ component of the closest direction before w
[out]aAngular distance between u and w
[out]bAngular distance between v and w

◆ interpolate() [1/2]

double LadLut::interpolate ( glm::dvec3  direction)
inline

◆ interpolate() [2/2]

double LadLut::interpolate ( double  x,
double  y,
double  z 
)

Interpolate \(g\).

Considering known evaluations, interpolate the value for given direction.

First, \(\hat{u}\) and \(\hat{v}\) are the immediately after-before kown director vectors with respect to \(\hat{w}\), which is the one that must be interpolated.

Second, \(a\) and \(b\) are the absolute value of angular distance between \(\hat{u}\) and \(\hat{w}\) and between \(\hat{v}\) and \(\hat{w}\) respectively.

Therefore, \(\Delta = a+b\).

Now weights are defined as \(\alpha = \frac{b}{\Delta}\) and \(\beta = \frac{a}{\Delta}\).

And \(g\) can be interpolated:

\[ g_{\hat{w}} = {\alpha} g_{\hat{u}} + {\beta} g_{\hat{v}} \]

Finally, in case \(a\) or \(b\) is 0, there is a coincidence with respecct to \(\hat{w}\). In consequence, it is not necessary to compute interpolation as \(g\) is contained in the look-up table.

Parameters
xX component of normalized director vector for interpolation
yY component of normalized director vector for interpolation
zZ component of normalized director vector for interpolation
Returns
Interpolated \(g\)
See also
LadLut::findEnvelopmentDirections

◆ transformToLadLutDomain()

void LadLut::transformToLadLutDomain ( double  a,
double  b,
double  c,
double &  x,
double &  y,
double &  z 
)

Transform a vector \((a,b,c)\) from standard domain to a vector \((x,y=0,z)\) in LadLut domain.

Parameters
[in]aX component of the vector to transform
[in]bY component of the vector to transform
[in]cZ component of the vector to transform
[out]xX component of transformed vector
[out]yY component of transformed vector
[out]zZ component of transformed vector

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