iLand
Public Member Functions | List of all members
LightRoomObject Class Reference

#include <lightroom.h>

Public Member Functions

 LightRoomObject ()
 
 ~LightRoomObject ()
 
int hittest (const double p_x, const double p_y, const double p_z, const double azimuth_rad, const double elevation_rad)
 Test if the ray starting at "p" hits the object. More...
 
void setuptree (const double height, const double crownheight, const QString &formula)
 sets up a tree as the obstacle. More...
 
bool noHitGuaranteed (const double p_x, const double p_y, const double p_z)
 returns true if there is no way that a ray hits the object starting from p. More...
 
double maxHeight () const
 
double maxRadius () const
 

Constructor & Destructor Documentation

◆ LightRoomObject()

LightRoomObject::LightRoomObject ( )
inline

◆ ~LightRoomObject()

LightRoomObject::~LightRoomObject ( )

Member Function Documentation

◆ hittest()

int LightRoomObject::hittest ( const double  p_x,
const double  p_y,
const double  p_z,
const double  azimuth_rad,
const double  elevation_rad 
)

Test if the ray starting at "p" hits the object.

The tree is located in x/y=0/0.

the ray has direction azimuth/elevation and starts from the position denoted by p_x, p_y and p_z

Returns
1: object is hit, 0: object is missed, -1: p is inside the object.

◆ maxHeight()

double LightRoomObject::maxHeight ( ) const
inline

◆ maxRadius()

double LightRoomObject::maxRadius ( ) const
inline

◆ noHitGuaranteed()

bool LightRoomObject::noHitGuaranteed ( const double  p_x,
const double  p_y,
const double  p_z 
)

returns true if there is no way that a ray hits the object starting from p.

◆ setuptree()

void LightRoomObject::setuptree ( const double  height,
const double  crownheight,
const QString &  formula 
)

sets up a tree as the obstacle.

Parameters
heighttreehight in meter
crownheightheight of the start of crown (above ground) in meter
formula(as string representation) that yields the radius as f(relativeheight). the variable of the formula is 0 for ground 1 for tree top.

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