sexi.util
Class LightCalculator

java.lang.Object
  |
  +--sexi.util.LightCalculator
All Implemented Interfaces:
CalculatorEvent, java.lang.Runnable

public class LightCalculator
extends java.lang.Object
implements java.lang.Runnable, CalculatorEvent

Calculate the light with the given parameters


Field Summary
(package private)  boolean calculateTree
           
 java.lang.String calculationMethod
           
static int DETAIL_LIGHT
           
(package private)  java.util.ArrayList detailOut
           
static int DOUBLE_LIGHT
           
(package private)  ForestBasicStand forest
           
(package private)  Point3fValue[] inputPoint
           
(package private)  boolean isCanceled
           
(package private)  boolean isDetailCount
           
(package private)  boolean isShowResult
           
(package private)  LightParameters lightParam
           
(package private)  java.util.ArrayList listenerList
           
(package private)  float nPoint
           
(package private)  Point3fLabel[] output
           
(package private)  float progress
           
(package private)  float raySetSize
           
(package private)  java.lang.Object result
           
static int SINE_LIGHT
           
(package private)  float totalProgress
           
(package private)  int type
           
static int VERTICAL_LIGHT
           
 
Constructor Summary
LightCalculator()
           
 
Method Summary
 void addCalculatorListener(CalculatorListener l)
           
 void calculateForPoint(ForestBasicStand f, Point3fValue[] outputPosition)
           
 void calculateForTree(ForestBasicStand f, int positionOnTree)
           
 void calculateForTree(ForestBasicStand f, int positionOnTree, int type)
           
static LightMap countLightMap(TreeBasic[] trees, LightMap map)
           
static LightMap createInitLightMap(DimensionArea forestArea, DimensionArea gridSampling, int nGridXAvg, int nGridYAvg)
           
 double getCurrentProgress()
           
 Point3f[] getDetailResult()
           
 double getMaxProgress()
           
 double getMinProgress()
           
 java.lang.Object getResult()
           
 java.lang.Object getSource()
           
 void removeCalculatorListener(CalculatorListener l)
           
 void run()
           
 void runDetailLight()
           
 void runVerticalLight()
           
 void setAbortCalculation(boolean b)
           
 void setCountResultPoint(boolean b)
           
 void setDetailCount(boolean b)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DETAIL_LIGHT

public static final int DETAIL_LIGHT

VERTICAL_LIGHT

public static final int VERTICAL_LIGHT

SINE_LIGHT

public static final int SINE_LIGHT

DOUBLE_LIGHT

public static final int DOUBLE_LIGHT

type

int type

lightParam

LightParameters lightParam

calculationMethod

public java.lang.String calculationMethod

raySetSize

float raySetSize

calculateTree

boolean calculateTree

forest

ForestBasicStand forest

output

Point3fLabel[] output

inputPoint

Point3fValue[] inputPoint

nPoint

float nPoint

listenerList

java.util.ArrayList listenerList

result

java.lang.Object result

progress

float progress

totalProgress

float totalProgress

isCanceled

boolean isCanceled

isDetailCount

boolean isDetailCount

detailOut

java.util.ArrayList detailOut

isShowResult

boolean isShowResult
Constructor Detail

LightCalculator

public LightCalculator()
Method Detail

addCalculatorListener

public void addCalculatorListener(CalculatorListener l)

removeCalculatorListener

public void removeCalculatorListener(CalculatorListener l)

setDetailCount

public void setDetailCount(boolean b)

setCountResultPoint

public void setCountResultPoint(boolean b)

calculateForPoint

public void calculateForPoint(ForestBasicStand f,
                              Point3fValue[] outputPosition)

calculateForTree

public void calculateForTree(ForestBasicStand f,
                             int positionOnTree,
                             int type)

calculateForTree

public void calculateForTree(ForestBasicStand f,
                             int positionOnTree)

run

public void run()
Specified by:
run in interface java.lang.Runnable

runDetailLight

public void runDetailLight()

getCurrentProgress

public double getCurrentProgress()
Specified by:
getCurrentProgress in interface CalculatorEvent

getMinProgress

public double getMinProgress()
Specified by:
getMinProgress in interface CalculatorEvent

getMaxProgress

public double getMaxProgress()
Specified by:
getMaxProgress in interface CalculatorEvent

getResult

public java.lang.Object getResult()
Specified by:
getResult in interface CalculatorEvent

getSource

public java.lang.Object getSource()
Specified by:
getSource in interface CalculatorEvent

setAbortCalculation

public void setAbortCalculation(boolean b)

getDetailResult

public Point3f[] getDetailResult()

runVerticalLight

public void runVerticalLight()

createInitLightMap

public static LightMap createInitLightMap(DimensionArea forestArea,
                                          DimensionArea gridSampling,
                                          int nGridXAvg,
                                          int nGridYAvg)

countLightMap

public static LightMap countLightMap(TreeBasic[] trees,
                                     LightMap map)