Helios++
Helios software for LiDAR simulations
HeliosTests::LadLutTest Class Reference

Test look-up table for leaf angle distribution. More...

#include <LadLutTest.h>

Inheritance diagram for HeliosTests::LadLutTest:
Collaboration diagram for HeliosTests::LadLutTest:

Public Member Functions

 LadLutTest (std::string testDir="data/test/")
 Leaf angle distribution look-up table test constructor.
 
bool run () override
 
bool validateLadLut (LadLut const &ladlut)
 Validate given leaf angle distribution look-up table. More...
 
bool validateTransformation (double x, double y, double z, double ex, double ey, double ez)
 Validate a transformation. More...
 
- Public Member Functions inherited from HeliosTests::BaseTest
 BaseTest (std::string const &name)
 Base test constructor. More...
 
std::string getName ()
 
void operator() (std::ostream &out=std::cout, bool color=true)
 Another way to call test function. More...
 
void test (std::ostream &out=std::cout, bool color=true)
 Perform the test and output its final status. More...
 

Public Attributes

double eps = 0.00001
 Decimal precision for validation purposes.
 
std::string testDir
 Where required test files are stored. For LadLutTest it is required that a file named spherical.txt is inside the test folder so ladlut can be parsed.
 

Additional Inherited Members

- Protected Attributes inherited from HeliosTests::BaseTest
std::string const name
 The name for the test.
 

Detailed Description

Test look-up table for leaf angle distribution.

Author
Alberto M. Esmoris Pena
Version
1.0

Member Function Documentation

◆ run()

bool HeliosTests::LadLutTest::run ( )
overridevirtual
See also
BaseTest::run

Implements HeliosTests::BaseTest.

◆ validateLadLut()

bool HeliosTests::LadLutTest::validateLadLut ( LadLut const &  ladlut)

Validate given leaf angle distribution look-up table.

Parameters
ladlutLeaf angle distribution look-up table to be validated
Returns
True if given leaf angle distribution look-up table was valid, false otherwise
See also
LadLut

◆ validateTransformation()

bool HeliosTests::LadLutTest::validateTransformation ( double  x,
double  y,
double  z,
double  ex,
double  ey,
double  ez 
)

Validate a transformation.

A transformation will be considered to be valid when the difference between obtained and expected value does not exceed eps

Parameters
xObtained X coordinate
yObtained Y coordinate
zObtained Z coordinate
exExpected X coordinate
eyExpected Y coordinate
ezExpected Z coordinate
Returns
True if transformation was valid, false otherwise
See also
LadLutTest::eps

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