clGLIBase Class Reference

GLI base - Version 1.0. More...

#include <GLIBase.h>

Inheritance diagram for clGLIBase:

clLightBase clBehaviorBase clWorkerBase clEpiphyticEstablishment clGliLight clGLIMap clGLIPoints clLightDepSeedSurvival clQuadratGLILight

List of all members.

Public Member Functions

 clGLIBase (clSimManager *p_oSimManager)
 Constructor.
virtual ~clGLIBase ()
 Destructor.

Protected Member Functions

void AddTreeToGliFishEye (const float &fTargetX, const float &fTargetY, const float &fTargetHeight, clTree *p_oNeighbor, clPlot *p_oPlot, clTreePopulation *p_oPop, clAllometry *p_oAllom)
 Adds one shading neighbor to the fisheye photo array for a GLI calculation.
void GLIFisheyeNoCanopyIntersect (const float &fTargetX, const float &fTargetY, const float &fNeighX, const float &fNeighY, const float &fNeighCanrad, const float &fNeighHeight, const short int &iNeighSpecies, const float &fTargetHeight, const float &fDistToNearEdge, clTree *p_oNeighbor, clPlot *p_oPlot, clAllometry *p_oAllom)
 Adds one shading neighbor to the fisheye photo array for a GLI calculation when the canopies of the two trees do not overlap.
void GLIFisheyeCanopyIntersect (const float &fTargetX, const float &fTargetY, const float &fNeighX, const float &fNeighY, const float &fNeighCanrad, const float &fNeighHeight, const short int &iNeighSpecies, const float &fTargetHeight, clTree *p_oNeighbor, clPlot *p_oPlot, clAllometry *p_oAllom)
 Adds one shading neighbor to the fisheye photo array for a GLI calculation when the canopies of the two trees overlap.

Protected Attributes

float m_fSinMinSunAng
 Sin of the min sun angle.
float m_fAziChunkConverter
 Reciprocal of the size of a single azimuth sky grid division, in degrees.
float m_fRcpTanMinAng
 1/tan (m_fMinSunAngle).
float * mp_fAziSlope
 For each azimuth chunk of sky, this holds the slope of the line to the middle of the chunk.


Detailed Description

GLI base - Version 1.0.

This groups the common GLI light functions and data members. Child classes can use the functions here, but there are a set of requirements they must fill. They must:

I could have done a common base class setup function to do this, but those are starting to nest pretty deep between clBehaviorBase and clLightBase. So I left it to the child classes. Each child has to do this separately since each might have different sky setup equations.

Copyright 2003 Charles D. Canham.

Author:
Lora E. Murphy

Edit history:
-----------------
April 28, 2004 - Submitted as beta (LEM)

Constructor & Destructor Documentation

clGLIBase::clGLIBase ( clSimManager p_oSimManager  ) 

Constructor.

Parameters:
p_oSimManager Pointer to the Sim Manager.

virtual clGLIBase::~clGLIBase (  )  [virtual]

Destructor.


Member Function Documentation

void clGLIBase::AddTreeToGliFishEye ( const float &  fTargetX,
const float &  fTargetY,
const float &  fTargetHeight,
clTree p_oNeighbor,
clPlot p_oPlot,
clTreePopulation p_oPop,
clAllometry p_oAllom 
) [protected]

Adds one shading neighbor to the fisheye photo array for a GLI calculation.

Parameters:
fTargetX X coordinate of target tree
fTargetY Y coordinate of target tree
fTargetHeight Height of target tree, in meters
p_oNeighbor The neighbor to be added
p_oPlot Pointer to the plot object
p_oPop Pointer to the tree population object
p_oAllom Pointer to an allometry object

void clGLIBase::GLIFisheyeNoCanopyIntersect ( const float &  fTargetX,
const float &  fTargetY,
const float &  fNeighX,
const float &  fNeighY,
const float &  fNeighCanrad,
const float &  fNeighHeight,
const short int &  iNeighSpecies,
const float &  fTargetHeight,
const float &  fDistToNearEdge,
clTree p_oNeighbor,
clPlot p_oPlot,
clAllometry p_oAllom 
) [protected]

Adds one shading neighbor to the fisheye photo array for a GLI calculation when the canopies of the two trees do not overlap.

Called by AddTreeToGliFishEye().

Parameters:
fTargetX X coordinate of target tree
fTargetY Y coordinate of target tree
fNeighX X coordinate of shading neighbor
fNeighY Y coordinate of shading neighbor
fNeighCanrad Shading neighbor canopy radius, in meters
fNeighHeight Shading neighbor height, in meters
iNeighSpecies Neighbor species
fTargetHeight Height of target tree, in meters
fDistToNearEdge Distance to nearest edge of shading neighbor canopy, in m.
p_oNeighbor The neighbor to be added
p_oPlot Pointer to plot object
p_oAllom Pointer to an allometry object

void clGLIBase::GLIFisheyeCanopyIntersect ( const float &  fTargetX,
const float &  fTargetY,
const float &  fNeighX,
const float &  fNeighY,
const float &  fNeighCanrad,
const float &  fNeighHeight,
const short int &  iNeighSpecies,
const float &  fTargetHeight,
clTree p_oNeighbor,
clPlot p_oPlot,
clAllometry p_oAllom 
) [protected]

Adds one shading neighbor to the fisheye photo array for a GLI calculation when the canopies of the two trees overlap.

Called by AddTreeToGliFishEye().

Parameters:
fTargetX X coordinate of target tree
fTargetY Y coordinate of target tree
fNeighX X coordinate of shading neighbor
fNeighY Y coordinate of shading neighbor
fNeighCanrad Shading neighbor canopy radius, in meters
fNeighHeight Shading neighbor height, in meters
iNeighSpecies Neighbor species
fTargetHeight Height of target tree, in meters
p_oNeighbor The neighbor to be added
p_oPlot Pointer to plot object
p_oAllom Pointer to an allometry object


Member Data Documentation

float clGLIBase::m_fSinMinSunAng [protected]

Sin of the min sun angle.

Saves tons of calculations to pre-calculate this. Child classes must set this; it's just sin(m_fMinSunAngle).

Reciprocal of the size of a single azimuth sky grid division, in degrees.

For converting to azimuth rows in brightness array - just multiply by an azimuth heading in degrees. This saves tons of calculations when pre-calculated. Since the size of azimuth sky grid divisions may differ, child classes must set this; it's m_iNumAziAng/360.0.

float clGLIBase::m_fRcpTanMinAng [protected]

1/tan (m_fMinSunAngle).

Child classes must set this.

float* clGLIBase::mp_fAziSlope [protected]

For each azimuth chunk of sky, this holds the slope of the line to the middle of the chunk.

Array size = m_iNumAziAng. Each value is 1/(tan(fAngChunk*(i + 0.5))), where i = array index, and fAngChunk is the size of each azimuth chunk in radians. Child classes must set this.


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

Generated on Tue Apr 19 13:56:10 2011 for SORTIE Core C++ Documentation by  doxygen 1.5.6