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.Type
protected RGBColor
static final SCOType.Field
protected int
static final SCOType.Field
protected float
static final SCOType.Field
static final SCOType.Field
protected boolean
static final SCOType.Field
Fields inherited from interface de.grogra.ray.physics.Light
AMBIENT, AREA, DIRECTIONAL, NO_LIGHT, POINT, SKY
Fields 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 TypeMethodDescriptiondouble
completeRay
(Environment env, Point3d vertex, Ray out) protected void
draw
(Tuple3f color, RenderState rs) int
Returns an average color for the scattering entity.getColor()
int
getFlags()
int
float
boolean
Determines whether the light source shall be ignored when a shot ray happens to hit the geometry of the light source.boolean
Determines whether the light source casts shadows or not.boolean
void
void
setNumberofrays
(int value) void
setRaylength
(float value) void
setShadowless
(boolean value) void
setVisualize
(boolean value) Methods inherited from class de.grogra.persistence.ShareableBase
addReference, appendReferencesTo, fieldModified, getProvider, getStamp, initProvider, manageableReadResolve, manageableWriteReplace, removeReference
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface de.grogra.ray.physics.Emitter
computeExitance, generateRandomOrigins
Methods inherited from interface de.grogra.ray.physics.Light
getLightType, getTotalPower
Methods inherited from interface de.grogra.persistence.Manageable
getManageableType
Methods 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:Light
Determines whether the light source casts shadows or not.- Specified by:
isShadowless
in interfaceLight
- Returns:
true
iff 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:Scattering
Returns an average color for the scattering entity. This color is used for simplified graphical representations of the corresponding objects.- Specified by:
getAverageColor
in interfaceScattering
- Returns:
- an average color in Java's default sRGB color space, encoded as an int (0xAARRGGBB).
-
getFlags
public int getFlags()- Specified by:
getFlags
in interfaceScattering
-
isIgnoredWhenHit
public boolean isIgnoredWhenHit()Description copied from interface:Light
Determines whether the light source shall be ignored when a shot ray happens to hit the geometry of the light source.- Specified by:
isIgnoredWhenHit
in interfaceLight
- Returns:
true
iff the light source shall be ignored
-
draw
-
completeRay
- Specified by:
completeRay
in interfaceEmitter
-
resolveLight
- Specified by:
resolveLight
in interfaceLight
-