MineLink
 All Data Structures Functions Variables Pages
delphos::RosettaSlope Class Reference

This class allows to store different slope angles depending on azimuth. More...

#include <rosetta.h>

Collaboration diagram for delphos::RosettaSlope:
Collaboration graph

Public Member Functions

 RosettaSlope (vector< double > azimuth_angles, vector< double > slopes)
 Creates a new rosetta. More...
 
unsigned long NumAngles () const
 Returns the number of angles (Azimuth/Slopes). More...
 
unsigned long GetNumAngles () const
 Returns the number of angles (Azimuth/Slopes). More...
 
double SlopeAngleByIndex (const unsigned int &i) const
 Returns the \(i\)-th slope angle. More...
 
double AzimuthAngleByIndex (const unsigned int &i) const
 Returns the \(i\)-th-th azimuth angle. More...
 
double SlopeAngleAt (const double &azimuth) const
 Returns the slope angle that applies at a given Azimuth. More...
 

Detailed Description

This class allows to store different slope angles depending on azimuth.

This class is not a precedence. It only stores values that are useful in order to construct one.

Constructor & Destructor Documentation

delphos::RosettaSlope::RosettaSlope ( vector< double >  azimuth_angles,
vector< double >  slopes 
)

Creates a new rosetta.

Parameters
azimuth_anglesThe azimuth angles (in degrees). 0 corresponds to North.
slopesThe slope angles (in degrees) that apply for each azimuth.

Azimuth angles should be positive and add up to 360. If the addition is larger than 360, then the "rest" is ignored. It they add less than 360, then the last angle is used to complete the difference.

Azimuth angles shoull be between 0 and 360 (both inclusive). Slope angles should be between 0 and 90 (both inclusive).

Angles cannot be changed after the object is constructed.

If the azimuth_angles and slopes vectors have a different sizes, only the smallest one is used (so remaining values in the larger vector are ignored). In particular, if the slopes vector is smaller, then some azimuth angles could be ignored.

If any of the submitted angle containers is empty, an exception is thrown.

Member Function Documentation

double delphos::RosettaSlope::AzimuthAngleByIndex ( const unsigned int &  i) const

Returns the \(i\)-th-th azimuth angle.

Parameters
iThe index of the angle (starting at 0).

The given index must be between 0 and RosettaSlope::NumAngles()-1. If the index is greater than RosettaSlope::NumAngles()-1, an exception is thrown.

unsigned long delphos::RosettaSlope::GetNumAngles ( ) const

Returns the number of angles (Azimuth/Slopes).

Returns
The sizes of the angles containers. This is the number of different azimuth/slopes.
unsigned long delphos::RosettaSlope::NumAngles ( ) const

Returns the number of angles (Azimuth/Slopes).

Deprecated:
See Precedence::GetNumAngles().
Returns
The sizes of the angles containers. This is the number of different azimuth/slopes.
double delphos::RosettaSlope::SlopeAngleAt ( const double &  azimuth) const

Returns the slope angle that applies at a given Azimuth.

Parameters
azimuthThe azimuth angle to look by.
Returns
The slope angle that applies for the angular sector containing the given azimuth angle.

This method will look at the azimuth section that applies to the given value and return the slope angle for that section.

If the submmited azimuth angle is negative the slope angle for the 0-azimuth is returned, if it is greater than 360 the slope angle for the 360-azimuth angle is returned.

double delphos::RosettaSlope::SlopeAngleByIndex ( const unsigned int &  i) const

Returns the \(i\)-th slope angle.

Parameters
iThe index of the angle (starting at 0).

The given index must be between 0 and RosettaSlope::NumAngles()-1. If the index is greater than RosettaSlope::NumAngles()-1, an exception is thrown.


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