|
||||||||||
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.PhotonTracing
public class PhotonTracing
Illuminates scene by tracing photons through the scene and saving them into the map.
Field Summary | |
---|---|
protected static java.lang.String |
CATEGORY
Object category. |
protected LightMap |
caustic
Caustic map for cautic photon storing. |
static java.lang.String |
CAUSTICS
|
protected int |
dataMask
Mask used in MicroFacet.assertAttributes(int) . |
static java.lang.String |
DIRECT
|
protected LightMap |
global
Light map for photon storing. |
static java.lang.String |
INDIRECT
|
protected Intersectable |
inter
Accelerator: intersection between scene and ray. |
protected boolean |
isInit
Was the tracer initialized? |
protected boolean |
isMapFull
Is the photon map full? |
static RegPiece |
reg
Static registration instance for this class. |
protected RandomJames |
rnd
Random number generator. |
static java.lang.String |
SAMPLING
|
protected boolean |
savePhotonsInLights
Should be photons saved into the photon map when they are still in light source? |
protected RTScene |
scene
Accelerator: scene. |
protected LightMap |
shadow
Shadow map for shadow photon storing. |
static java.lang.String |
SHADOW
|
protected static java.lang.String |
TEMPLATE_NAME
Object template identifier. |
protected boolean |
useCaustics
Use caustics? |
protected boolean |
useDirect
Use direct illumination? |
protected boolean |
useIndirect
Use illumination illumination? |
protected boolean |
useShadow
Use shadow photons? |
protected LightMap |
volume
Volume map for volume photon storing. |
Fields inherited from class cz.cuni.jagrlib.Piece |
---|
channels, info, pl, plugs, TEMPLATE_TYPE, userBreak |
Fields inherited from interface cz.cuni.jagrlib.iface.Property |
---|
LOGGING, STATISTICS, TEXT_DESCRIPTION |
Constructor Summary | |
---|---|
PhotonTracing()
|
Method Summary | |
---|---|
java.lang.Object |
get(java.lang.String key)
Gets the given property. |
void |
illuminateScene()
Illuminate scene (transfer light from the light sources to the scene). |
boolean |
init()
Initializes everything important and builds photon map by photon tracing. |
void |
set(java.lang.String key,
java.lang.Object value)
Sets the given property. |
static int |
setTemplate(Template t,
int ord)
General-purpose registration routine. |
void |
tracePhoton(int level,
boolean prevHitSpec,
double importance,
float[] power,
double[] pos,
double[] dir)
Trace photon through the scene by recursive calling of this function. |
protected void |
traceShadowPhoton(double[] pos,
double[] dir,
float[] power)
Trace shadow ray and save shadow photon. |
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 |
Field Detail |
---|
protected RTScene scene
protected Intersectable inter
protected LightMap global
protected LightMap caustic
protected LightMap shadow
protected LightMap volume
protected final RandomJames rnd
protected int dataMask
MicroFacet.assertAttributes(int)
.
protected boolean useDirect
protected boolean useIndirect
protected boolean useCaustics
protected boolean useShadow
protected boolean savePhotonsInLights
true
, otherwise lights ourselfs
won't be visible.
protected boolean isMapFull
protected boolean isInit
public static final java.lang.String SAMPLING
public static final java.lang.String DIRECT
public static final java.lang.String INDIRECT
public static final java.lang.String CAUSTICS
public static final java.lang.String SHADOW
protected static final java.lang.String TEMPLATE_NAME
protected static final java.lang.String CATEGORY
public static final RegPiece reg
Constructor Detail |
---|
public PhotonTracing()
Method Detail |
---|
public void illuminateScene()
illuminateScene
in interface LightTracing
public boolean init()
public void tracePhoton(int level, boolean prevHitSpec, double importance, float[] power, double[] pos, double[] dir)
prevHitSpec
- True if photon hit specular material in previous intersection.protected void traceShadowPhoton(double[] pos, double[] dir, float[] power)
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 |