artofillusion.object
Class ProceduralDirectionalLight

java.lang.Object
  extended by artofillusion.object.Object3D
      extended by artofillusion.object.Light
          extended by artofillusion.object.DirectionalLight
              extended by artofillusion.object.ProceduralDirectionalLight

public class ProceduralDirectionalLight
extends DirectionalLight

This is a DirectionalLight whose emitted light is calculated by a Procedure.


Nested Class Summary
static class ProceduralDirectionalLight.ProceduralLightKeyframe
          Inner class representing a pose for a directional light.
 
Nested classes/interfaces inherited from class artofillusion.object.DirectionalLight
DirectionalLight.DirectionalLightKeyframe
 
Field Summary
 
Fields inherited from class artofillusion.object.Light
TYPE_AMBIENT, TYPE_NORMAL, TYPE_SHADOWLESS
 
Fields inherited from class artofillusion.object.Object3D
APPROXIMATELY, CANT_CONVERT, EXACTLY
 
Constructor Summary
ProceduralDirectionalLight(java.io.DataInputStream in, Scene theScene)
           
ProceduralDirectionalLight(double theRadius)
           
 
Method Summary
 void applyPoseKeyframe(Keyframe k)
          Modify this object based on a pose keyframe.
 void configurePoseTrack(PoseTrack track)
          This will be called whenever a new pose track is created for this object.
 void copyObject(Object3D obj)
          Copy all the properties of another object, to make this one identical to it.
 Object3D duplicate()
          Create a new object which is an exact duplicate of this one.
 void edit(EditingWindow parent, ObjectInfo info, java.lang.Runnable cb)
          Display a window in which the user can edit this object.
 void editKeyframe(EditingWindow parent, Keyframe k, ObjectInfo info)
          Allow the user to edit a keyframe returned by getPoseKeyframe().
 void getLight(RGBColor light, Vec3 position)
          Evaluate the Procedure to determine the light color at a point.
 Keyframe getPoseKeyframe()
          Return a Keyframe which describes the current pose of this object.
 Property[] getProperties()
          Get a list of editable properties defined by this object.
 java.lang.Object getPropertyValue(int index)
          Get the value of one of this object's editable properties.
 void sceneChanged(ObjectInfo info, Scene scene)
          This will be called whenever this object is moved, or the time changes.
 void setPropertyValue(int index, java.lang.Object value)
          Set the value of one of this object's editable properties.
 void writeToFile(java.io.DataOutputStream out, Scene theScene)
          The following method writes the object's data to an output stream.
 
Methods inherited from class artofillusion.object.DirectionalLight
canSetTexture, getBounds, getRadius, getWireframeMesh, isEditable, setRadius, setSize
 
Methods inherited from class artofillusion.object.Light
getColor, getDecayRate, getIntensity, getType, setColor, setDecayRate, setIntensity, setParameters, setType
 
Methods inherited from class artofillusion.object.Object3D
canConvertToActor, canConvertToTriangleMesh, canSetMaterial, convertToTriangleMesh, copyTextureAndMaterial, editGesture, getAverageParameterValues, getMaterial, getMaterialMapping, getParameters, getParameterValue, getParameterValues, getPosableObject, getRenderingMesh, getSkeleton, getTexture, getTextureMapping, isClosed, readParameterValue, renderObject, setMaterial, setParameters, setParameterValue, setParameterValues, setTexture
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProceduralDirectionalLight

public ProceduralDirectionalLight(double theRadius)

ProceduralDirectionalLight

public ProceduralDirectionalLight(java.io.DataInputStream in,
                                  Scene theScene)
                           throws java.io.IOException
Throws:
java.io.IOException
Method Detail

duplicate

public Object3D duplicate()
Description copied from class: Object3D
Create a new object which is an exact duplicate of this one.

Overrides:
duplicate in class DirectionalLight

copyObject

public void copyObject(Object3D obj)
Description copied from class: Object3D
Copy all the properties of another object, to make this one identical to it. If the two objects are of different classes, this will throw a ClassCastException.

Overrides:
copyObject in class DirectionalLight

sceneChanged

public void sceneChanged(ObjectInfo info,
                         Scene scene)
Description copied from class: Object3D
This will be called whenever this object is moved, or the time changes. Most objects will do nothing here, and do not need to override this. It is available for those cases where an object's internal properties depend explicitly on time or on the object's position within the scene.

Overrides:
sceneChanged in class Object3D

getLight

public void getLight(RGBColor light,
                     Vec3 position)
Evaluate the Procedure to determine the light color at a point.

Overrides:
getLight in class DirectionalLight

writeToFile

public void writeToFile(java.io.DataOutputStream out,
                        Scene theScene)
                 throws java.io.IOException
Description copied from class: Object3D
The following method writes the object's data to an output stream. Subclasses should override this method, but also call super.writeToFile() to save information about materials, etc. In addition to this method, every Object3D must include a constructor with the signature public Classname(DataInputStream in, Scene theScene) throws IOException, InvalidObjectException which reconstructs the object by reading its data from an input stream. This constructor, similarly, should call the overridden constructor to read information about materials, etc.

Overrides:
writeToFile in class DirectionalLight
Throws:
java.io.IOException

edit

public void edit(EditingWindow parent,
                 ObjectInfo info,
                 java.lang.Runnable cb)
Description copied from class: Object3D
Display a window in which the user can edit this object.

Overrides:
edit in class DirectionalLight
Parameters:
parent - the window from which this command is being invoked
info - the ObjectInfo corresponding to this object
cb - a callback which will be executed when editing is complete. If the user cancels the operation, it will not be called.

getProperties

public Property[] getProperties()
Description copied from class: Object3D
Get a list of editable properties defined by this object.

Overrides:
getProperties in class DirectionalLight

getPropertyValue

public java.lang.Object getPropertyValue(int index)
Description copied from class: Object3D
Get the value of one of this object's editable properties.

Overrides:
getPropertyValue in class DirectionalLight
Parameters:
index - the index of the property to get

setPropertyValue

public void setPropertyValue(int index,
                             java.lang.Object value)
Description copied from class: Object3D
Set the value of one of this object's editable properties.

Overrides:
setPropertyValue in class DirectionalLight
Parameters:
index - the index of the property to set
value - the value to set for the property

getPoseKeyframe

public Keyframe getPoseKeyframe()
Description copied from class: Object3D
Return a Keyframe which describes the current pose of this object.

Overrides:
getPoseKeyframe in class DirectionalLight

applyPoseKeyframe

public void applyPoseKeyframe(Keyframe k)
Description copied from class: Object3D
Modify this object based on a pose keyframe.

Overrides:
applyPoseKeyframe in class DirectionalLight

configurePoseTrack

public void configurePoseTrack(PoseTrack track)
This will be called whenever a new pose track is created for this object. It allows the object to configure the track by setting its graphable values, subtracks, etc.

Overrides:
configurePoseTrack in class DirectionalLight

editKeyframe

public void editKeyframe(EditingWindow parent,
                         Keyframe k,
                         ObjectInfo info)
Allow the user to edit a keyframe returned by getPoseKeyframe().

Overrides:
editKeyframe in class DirectionalLight


Copyright © 1999-2011 by Peter Eastman.