|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.cuni.jagrlib.DefaultProperty
cz.cuni.jagrlib.Piece
cz.cuni.jagrlib.testing.SLEHierarchical
public class SLEHierarchical
Solver for multi-level hierarchical radiosity method.
Nested Class Summary | |
---|---|
static class |
SLEHierarchical.AlgorithmTypes
Supported types of multi-level hierarchical radiosity. |
Field Summary | |
---|---|
protected int |
attrColor
Actual face-color attribute. |
protected int |
attrEmission
Actual face-emmision attribute. |
protected int |
attrNormal
Actual vertex-normal attribute. |
protected RadiosityBasisFunctions |
basis
Accelerator: input radiosity basis functions. |
protected Brep |
brep
Accelerator: input B-rep database. |
protected static java.lang.String |
CATEGORY
Object category. |
protected int |
colorMode
Actual color mode (0 = red, 1 = green, 2 = blue). |
protected int |
ctx
Actual Brep context. |
protected double |
epsilon
Required solution accuracy (max. norm of residual vector). |
static java.lang.String |
EPSILON
|
protected boolean |
isColorInit
Was the color-based variables already initialized? |
protected boolean |
isInitialized
Was the solver already initialized? |
static java.lang.String |
MAX_A
|
static java.lang.String |
MAX_F
|
protected float |
maxA
Maximal area of the element. |
protected float |
maxF
Maximal size of the single form factor. |
protected int |
N
Number of unknowns. |
protected cz.cuni.jagrlib.testing.SLEHierarchical.Node[] |
nodes
List of nodes. |
static RegPiece |
reg
Static registration instance for this class. |
protected int |
steps
Number of performed iteration steps. |
protected static java.lang.String |
TEMPLATE_NAME
Object template identifier. |
protected SLEHierarchical.AlgorithmTypes |
type
Actual type of multi-level hierarchical radiosity. |
static java.lang.String |
TYPE
|
Fields inherited from class cz.cuni.jagrlib.Piece |
---|
channels, info, pl, plugs, TEMPLATE_TYPE, userBreak |
Fields inherited from interface cz.cuni.jagrlib.iface.SLESolver |
---|
OMEGA, STEPS, TOTAL_RESIDUAL |
Fields inherited from interface cz.cuni.jagrlib.iface.Property |
---|
LOGGING, STATISTICS, TEXT_DESCRIPTION |
Constructor Summary | |
---|---|
SLEHierarchical()
|
Method Summary | |
---|---|
int |
actualComponent()
Get actual component number. |
protected void |
buildLinks()
Build initial set of links. |
protected void |
computeExtremes(double[][] point,
double[] min,
double[] max)
Computes extremes of collection of vertices. |
protected cz.cuni.jagrlib.testing.SLEHierarchical.Node |
divide(cz.cuni.jagrlib.testing.SLEHierarchical.Node p,
cz.cuni.jagrlib.testing.SLEHierarchical.Node q)
Returns node a or b depending on for which it appears using lower level nodes will reduce the error. |
protected double |
estimateFormFactors(cz.cuni.jagrlib.testing.SLEHierarchical.Node p,
cz.cuni.jagrlib.testing.SLEHierarchical.Node q)
Estimate unoccluded form factor. |
protected void |
gatherRad(cz.cuni.jagrlib.testing.SLEHierarchical.Node p)
Gathers energy over each incoming link (converting Bs to Bg). |
java.lang.Object |
get(java.lang.String key)
Gets the given property. |
double[] |
getSolution(double[] result)
Reads the whole solution vector. |
double |
getSolution(int col)
Reads a single unknown (element of solution vector). |
protected double |
getTotalResidual()
Return total unshoot radiosity in dependence on actual color mode. |
protected double[][] |
getVertices(int handle,
double[][] vertex)
Return coords of all vertices of the given triangle. |
protected double |
getWeight(int i)
Reads a single weight (size of element of solution vector). |
protected void |
init()
Initialize nodes. |
protected double |
lengthVector(double[] vector)
Length of given vector. |
protected void |
link(cz.cuni.jagrlib.testing.SLEHierarchical.Node p,
cz.cuni.jagrlib.testing.SLEHierarchical.Node q)
Builds the link between nodes a and b by computing the form factor between the areas represented at this nodes. |
protected boolean |
oracle(cz.cuni.jagrlib.testing.SLEHierarchical.Node p,
cz.cuni.jagrlib.testing.SLEHierarchical.Node q)
Returns a decision whether or not to link two nodes based on the approximating error. |
protected float |
pushPullRad(cz.cuni.jagrlib.testing.SLEHierarchical.Node p,
float BDown)
Pushes the recieved energy Bg down to the children of each quadtree node, and pulls the results back up the quadtrees by area averaging. |
double |
refine(int maxIterations,
boolean save)
Refine the solution performing several iterations. |
protected void |
refine(cz.cuni.jagrlib.testing.SLEHierarchical.Node p,
cz.cuni.jagrlib.testing.SLEHierarchical.Node q)
Establish links between p and q. |
void |
reset()
Reset the solver (if applicable). |
void |
set(java.lang.String key,
java.lang.Object value)
Sets the given property. |
void |
setComponent(int c)
Set actual component (non-mandatory). |
double |
setEpsilon(double epsilon)
Sets solver accuracy (whatever it means). |
static int |
setTemplate(Template t,
int ord)
General-purpose registration routine. |
void |
solve(boolean save)
Solve the whole system en bloc. |
protected double |
solve(int maxIterations,
boolean save)
Performs the given number of iteration steps. |
protected void |
sphereFromPoints(double[][] point,
double[] center,
double radius)
Creates bounding sphere (center, radius) from the triangle points. |
protected cz.cuni.jagrlib.testing.SLEHierarchical.Node |
subdivideNode(cz.cuni.jagrlib.testing.SLEHierarchical.Node a)
Subdivides single node to the three children. |
void |
update()
Input data was changed, solver should adapt to it. |
Methods inherited from class cz.cuni.jagrlib.Piece |
---|
className, connect, findPlug, findPlug, getInfo, getInterface, getInterface, getPlug, getReg, init, isCompatible, isCompatible, isConnected, logError, logWarning, myInterface, newInputPlug, newOptOutputPlug, newOutputPlug, newPlug, noTemplates, propBegin, propBounds, propDefault, propEnd, propEnum, propManipulator, propManipulator, setProgressListener, setRegStrings, setTemplateDynamic, stop |
Methods inherited from class cz.cuni.jagrlib.DefaultProperty |
---|
booleanProperty, booleanProperty, colorDoubleProperty, colorProperty, commit, doubleProperty, doubleProperty, doubleProperty, enumProperty, floatProperty, floatProperty, floatProperty, intProperty, intProperty, intProperty, longProperty, longProperty, longProperty, set, stringProperty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface cz.cuni.jagrlib.iface.Property |
---|
commit |
Field Detail |
---|
protected SLEHierarchical.AlgorithmTypes type
protected Brep brep
protected RadiosityBasisFunctions basis
protected int ctx
Brep
context.
protected int attrNormal
protected int attrColor
protected int attrEmission
protected double epsilon
protected int steps
protected int N
protected cz.cuni.jagrlib.testing.SLEHierarchical.Node[] nodes
protected float maxA
protected float maxF
protected int colorMode
protected boolean isInitialized
protected boolean isColorInit
public static final java.lang.String TYPE
public static final java.lang.String EPSILON
public static final java.lang.String MAX_A
public static final java.lang.String MAX_F
protected static final java.lang.String TEMPLATE_NAME
protected static final java.lang.String CATEGORY
public static final RegPiece reg
Constructor Detail |
---|
public SLEHierarchical()
Method Detail |
---|
public double setEpsilon(double epsilon)
setEpsilon
in interface SLESolver
public void solve(boolean save)
solve
in interface SLESolver
save
- Solution will be saved into the associated SLEData
.public void reset()
reset
in interface SLESolver
public double refine(int maxIterations, boolean save)
refine
in interface SLESolver
maxIterations
- Number of iterations requested.save
- Solution will be saved into the associated SLEData
.
public void update()
solve(boolean)
or refine(int, boolean)
will be called afterwards..
update
in interface SLESolver
public double getSolution(int col)
getSolution
in interface SLESolver
public double[] getSolution(double[] result)
getSolution
in interface SLESolver
public int actualComponent()
actualComponent
in interface SLESolver
public void setComponent(int c)
setComponent
in interface SLESolver
protected double solve(int maxIterations, boolean save)
maxIterations
- Maximal number of iterations.save
- Solution will be saved into the associated SLEData
.
protected void init()
protected void buildLinks()
protected void refine(cz.cuni.jagrlib.testing.SLEHierarchical.Node p, cz.cuni.jagrlib.testing.SLEHierarchical.Node q)
protected boolean oracle(cz.cuni.jagrlib.testing.SLEHierarchical.Node p, cz.cuni.jagrlib.testing.SLEHierarchical.Node q)
protected void link(cz.cuni.jagrlib.testing.SLEHierarchical.Node p, cz.cuni.jagrlib.testing.SLEHierarchical.Node q)
protected cz.cuni.jagrlib.testing.SLEHierarchical.Node divide(cz.cuni.jagrlib.testing.SLEHierarchical.Node p, cz.cuni.jagrlib.testing.SLEHierarchical.Node q)
protected cz.cuni.jagrlib.testing.SLEHierarchical.Node subdivideNode(cz.cuni.jagrlib.testing.SLEHierarchical.Node a)
protected double estimateFormFactors(cz.cuni.jagrlib.testing.SLEHierarchical.Node p, cz.cuni.jagrlib.testing.SLEHierarchical.Node q)
protected void sphereFromPoints(double[][] point, double[] center, double radius)
protected void computeExtremes(double[][] point, double[] min, double[] max)
protected double lengthVector(double[] vector)
protected double[][] getVertices(int handle, double[][] vertex)
protected void gatherRad(cz.cuni.jagrlib.testing.SLEHierarchical.Node p)
protected float pushPullRad(cz.cuni.jagrlib.testing.SLEHierarchical.Node p, float BDown)
p
- Node which pushes energy down to the children.BDown
- Recieved energy by node a.
protected double getWeight(int i)
protected double getTotalResidual()
public void set(java.lang.String key, java.lang.Object value)
set
in interface Property
set
in class DefaultProperty
key
- Key string.value
- The new value.Property.commit()
public java.lang.Object get(java.lang.String key)
get
in interface Property
get
in class DefaultProperty
key
- Key string.
null
.public static int setTemplate(Template t, int ord)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |