trees.h


     1	
     2	typedef struct branchSeg *brchSegPtr;
     3	
     4	typedef struct branchSeg {
     5		float x1;
     6		float y1;
     7		float z1;
     8		float x2;
     9		float y2;
    10		float z2;
    11	        float radius;
    12		brchSegPtr next;
    13	} branchSeg;
    14	
    15	typedef struct rootSeg *rtSegPtr;
    16	
    17	typedef struct rootSeg {
    18		float x1;
    19		float y1;
    20		float z1;
    21		float x2;
    22		float y2;
    23		float z2;
    24		float radius;
    25	        float diameter;
    26	        float order;
    27	 	float rho;
    28	        rtSegPtr next;
    29	} rootSeg;
    30	
    31	typedef struct leafStruct *lfStructPtr;
    32	
    33	typedef struct leafStruct {
    34		float x1;
    35		float y1;
    36		float z1;
    37		float x2;
    38		float y2;
    39		float z2;
    40		float x3;
    41		float y3;
    42		float z3;
    43		float x4;
    44		float y4;
    45		float z4;
    46		float psyn;
    47	  	float shade;
    48		float lpi;
    49		float ppfdSUN;
    50	        float ppfdSHADE;
    51		lfStructPtr next;
    52	} leafStruct;
    53	
    54	typedef struct {
    55		float sunVec_x;
    56		float sunVec_y;
    57		float sunVec_z;
    58		bool displayBranches;
    59		bool displayRoots;
    60		bool displaySun;
    61		eco_color brchColor;
    62		eco_leafType leafType;
    63		eco_rootType rootType; 
    64	  	eco_color leafColor;
    65	        eco_color leafAttribColor;
    66		eco_color rootColor;
    67	        eco_color rootAttribColor;
    68	        int leafColorIndex;
    69	        int rootColorIndex;
    70		float minLfValue;
    71		float maxLfValue;
    72	        float minLfValueOrig;
    73	        float maxLfValueOrig;
    74	        float minRtValue;
    75	        float minRtValueOrig;
    76		float maxRtValue;
    77	        float maxRtValueOrig;
    78		bool rootsChanged;
    79		bool leavesChanged;
    80	 	bool branchChanged;
    81	        brchSegPtr B;
    82		rtSegPtr R;
    83		lfStructPtr L;
    84	} treeData;
    85	
    86	extern void clearBrchList (brchSegPtr*);
    87	extern void clearRootList (rtSegPtr*);
    88	extern void clearLeafList (lfStructPtr*);
    89	extern void readBrchList (brchSegPtr*, FILE*);
    90	extern void readRootList (rtSegPtr*, FILE*);
    91	extern void readLeafList (lfStructPtr*, FILE*);
    92	extern void printBrch (brchSegPtr);
    93	extern void printRoot (rtSegPtr);
    94	extern void printLeaf (lfStructPtr, eco_color);