java.lang.Object
de.grogra.persistence.ShareableBase
de.grogra.imp3d.objects.LightBase
- All Implemented Interfaces:
Light,Scattering,Manageable,Shareable,Emitter,Light,Scattering
- Direct Known Subclasses:
AmbientLight,DirectionalLight,PointLight
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final LightBase.Typeprotected RGBColorstatic final SCOType.Fieldprotected intstatic final SCOType.Fieldprotected floatstatic final SCOType.Fieldstatic final SCOType.Fieldprotected booleanstatic final SCOType.FieldFields inherited from interface de.grogra.ray.physics.Light
AMBIENT, AREA, DIRECTIONAL, NO_LIGHT, POINT, SKYFields inherited from interface de.grogra.ray.physics.Scattering
DELTA_FACTOR, IS_NON_OPAQUE, MIN_UNUSED_FLAG, NEEDS_NORMAL, NEEDS_POINT, NEEDS_TANGENTS, NEEDS_TRANSFORMATION, NEEDS_UV, RANDOM_RAYS_GENERATE_ORIGINS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublecompleteRay(Environment env, Point3d vertex, Ray out) protected voiddraw(Tuple3f color, RenderState rs) intReturns an average color for the scattering entity.getColor()intgetFlags()intfloatbooleanDetermines whether the light source shall be ignored when a shot ray happens to hit the geometry of the light source.booleanDetermines whether the light source casts shadows or not.booleanvoidvoidsetNumberofrays(int value) voidsetRaylength(float value) voidsetShadowless(boolean value) voidsetVisualize(boolean value) Methods inherited from class de.grogra.persistence.ShareableBase
addReference, appendReferencesTo, fieldModified, getProvider, getStamp, initProvider, manageableReadResolve, manageableWriteReplace, removeReferenceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.grogra.ray.physics.Emitter
computeExitance, generateRandomOriginsMethods inherited from interface de.grogra.ray.physics.Light
getLightType, getTotalPowerMethods inherited from interface de.grogra.persistence.Manageable
getManageableTypeMethods inherited from interface de.grogra.ray.physics.Scattering
computeBSDF, generateRandomRays
-
Field Details
-
color
-
visualize
protected boolean visualize -
numberofrays
protected int numberofrays -
raylength
protected float raylength -
$TYPE
-
color$FIELD
-
shadowless$FIELD
-
visualize$FIELD
-
numberofrays$FIELD
-
raylength$FIELD
-
-
Constructor Details
-
LightBase
public LightBase()
-
-
Method Details
-
isShadowless
public boolean isShadowless()Description copied from interface:LightDetermines whether the light source casts shadows or not.- Specified by:
isShadowlessin interfaceLight- Returns:
trueiff the light source does not cast shadows
-
setShadowless
public void setShadowless(boolean value) -
isVisualize
public boolean isVisualize() -
setVisualize
public void setVisualize(boolean value) -
getNumberofrays
public int getNumberofrays() -
setNumberofrays
public void setNumberofrays(int value) -
getRaylength
public float getRaylength() -
setRaylength
public void setRaylength(float value) -
getColor
-
setColor
-
getAverageColor
public int getAverageColor()Description copied from interface:ScatteringReturns an average color for the scattering entity. This color is used for simplified graphical representations of the corresponding objects.- Specified by:
getAverageColorin interfaceScattering- Returns:
- an average color in Java's default sRGB color space, encoded as an int (0xAARRGGBB).
-
getFlags
public int getFlags()- Specified by:
getFlagsin interfaceScattering
-
isIgnoredWhenHit
public boolean isIgnoredWhenHit()Description copied from interface:LightDetermines whether the light source shall be ignored when a shot ray happens to hit the geometry of the light source.- Specified by:
isIgnoredWhenHitin interfaceLight- Returns:
trueiff the light source shall be ignored
-
draw
-
completeRay
- Specified by:
completeRayin interfaceEmitter
-
resolveLight
- Specified by:
resolveLightin interfaceLight
-