org.bouncycastle.graphics.rt.objects
Class PointLight
java.lang.Object
|
+--org.bouncycastle.graphics.rt.objects.PointLight
- All Implemented Interfaces:
- Light
- public class PointLight
- extends java.lang.Object
- implements Light
A point light source. By default it affects all objects in the scene,
unless the choice is constrained by the using the addAffected method.
Example:
<PointLight location="0, 0, 0" direction="0, 0, -1" color="0.8, 0.7, 1"/>
Document Type Definition:
<!ENTITY %Float "CDATA">
<!ENTITY %Color3f "CDATA">
<!ENTITY %Point3f "CDATA">
<!ELEMENT PointLight EMPTY>
<!ATTLIST PointLight
color %Color3f; "1, 1, 1"
location %Point3f; "0, 0, 0">
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PointLight
public PointLight(Point3f loc,
Color3f col)
getInstance
public static Light getInstance(RMLReader in)
throws java.io.IOException
setShadows
public void setShadows(boolean shadows)
- set whether or not this light will cast shadows (if not objects
in the world are treated as though invisible).
- Specified by:
setShadows
in interface Light
transform
public void transform(Transform trans)
- transform the location of the light.
- Specified by:
transform
in interface Light
addAffected
public void addAffected(Renderable obj)
- add an object as being one of those affected by this light.
- Specified by:
addAffected
in interface Light
getLightData
public LightData getLightData(Hit hit,
Illuminated world)
- Specified by:
getLightData
in interface Light