|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectartofillusion.object.Object3D
artofillusion.object.ObjectCollection
artofillusion.script.ScriptedObject
public class ScriptedObject
This class represents an Object3D whose properties are defined by a script.
Nested Class Summary | |
---|---|
static class |
ScriptedObject.ScriptedObjectKeyframe
Inner class representing a pose for a scripted object. |
Field Summary |
---|
Fields inherited from class artofillusion.object.Object3D |
---|
APPROXIMATELY, CANT_CONVERT, EXACTLY |
Constructor Summary | |
---|---|
ScriptedObject(java.io.DataInputStream in,
Scene theScene)
This constructor reconstructs a ScriptedObject from an input stream. |
|
ScriptedObject(java.lang.String scriptText)
|
|
ScriptedObject(java.lang.String scriptText,
java.lang.String language)
|
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)
Allow the user to edit the script. |
void |
editKeyframe(EditingWindow parent,
Keyframe k,
ObjectInfo info)
Allow the user to edit a keyframe returned by getPoseKeyframe(). |
double[] |
getDefaultPoseValues()
Get the default list of graphable values for a keyframe returned by getPoseKeyframe(). |
java.lang.String |
getLanguage()
Get the language the script is written in. |
int |
getNumParameters()
Get the number of parameters for this object. |
ObjectScript |
getObjectScript()
Get the parsed form of the script. |
java.lang.String |
getParameterName(int i)
Get the name of the i'th parameter. |
double |
getParameterValue(int i)
Get the value of the i'th parameter. |
Keyframe |
getPoseKeyframe()
Return a Keyframe which describes the current pose of this object. |
java.lang.String[] |
getPoseValueNames()
Return an array containing the names of the graphable values for the keyframes returned by getPoseKeyframe(). |
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. |
java.lang.String |
getScript()
Get the script which defines this object. |
boolean |
isEditable()
If the object can be edited by the user, isEditable() should be overridden to return true. |
void |
setLanguage(java.lang.String language)
Set the language the script is written in. |
void |
setParameterName(int i,
java.lang.String name)
Set the name of the i'th parameter. |
void |
setParameters(java.lang.String[] names,
double[] values)
Set a new list of parameters. |
void |
setParameterValue(int i,
double value)
Set the value of the i'th parameter. |
void |
setPropertyValue(int index,
java.lang.Object value)
Set the value of one of this object's editable properties. |
void |
setScript(java.lang.String scriptText)
Set the script which defines this object. |
void |
setSize(double xsize,
double ysize,
double zsize)
setSize() has no effect, since the geometry of the object is set by the script. |
void |
writeToFile(java.io.DataOutputStream out,
Scene theScene)
Write a serialized representation of this object to an output stream. |
Methods inherited from class artofillusion.object.ObjectCollection |
---|
canConvertToTriangleMesh, canSetMaterial, convertToTriangleMesh, getBounds, getObjects, getRenderingMesh, getWireframeMesh, isClosed, renderObject, sceneChanged, setUsesCoords, setUsesTime |
Methods inherited from class artofillusion.object.Object3D |
---|
canConvertToActor, canSetTexture, copyTextureAndMaterial, editGesture, getAverageParameterValues, getMaterial, getMaterialMapping, getParameters, getParameterValue, getParameterValues, getPosableObject, getSkeleton, getTexture, getTextureMapping, readParameterValue, setMaterial, setParameters, setParameterValue, setParameterValues, setTexture |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ScriptedObject(java.lang.String scriptText, java.lang.String language)
public ScriptedObject(java.lang.String scriptText)
public ScriptedObject(java.io.DataInputStream in, Scene theScene) throws java.io.IOException, java.io.InvalidObjectException
java.io.IOException
java.io.InvalidObjectException
Method Detail |
---|
public java.lang.String getScript()
public void setScript(java.lang.String scriptText)
public java.lang.String getLanguage()
public void setLanguage(java.lang.String language)
public ObjectScript getObjectScript()
public final int getNumParameters()
public final java.lang.String getParameterName(int i)
public final double getParameterValue(int i)
public void setParameterName(int i, java.lang.String name)
public void setParameterValue(int i, double value)
public void setParameters(java.lang.String[] names, double[] values)
public Object3D duplicate()
duplicate
in class Object3D
public void copyObject(Object3D obj)
copyObject
in class Object3D
public void setSize(double xsize, double ysize, double zsize)
setSize
in class Object3D
public Property[] getProperties()
getProperties
in class Object3D
public java.lang.Object getPropertyValue(int index)
getPropertyValue
in class Object3D
index
- the index of the property to getpublic void setPropertyValue(int index, java.lang.Object value)
setPropertyValue
in class Object3D
index
- the index of the property to setvalue
- the value to set for the propertypublic Keyframe getPoseKeyframe()
getPoseKeyframe
in class Object3D
public void applyPoseKeyframe(Keyframe k)
applyPoseKeyframe
in class Object3D
public java.lang.String[] getPoseValueNames()
public double[] getDefaultPoseValues()
public void configurePoseTrack(PoseTrack track)
configurePoseTrack
in class Object3D
public void editKeyframe(EditingWindow parent, Keyframe k, ObjectInfo info)
editKeyframe
in class Object3D
public boolean isEditable()
Object3D
isEditable
in class Object3D
public void edit(EditingWindow parent, ObjectInfo info, java.lang.Runnable cb)
edit
in class Object3D
parent
- the window from which this command is being invokedinfo
- the ObjectInfo corresponding to this objectcb
- a callback which will be executed when editing is complete. If the user
cancels the operation, it will not be called.public void writeToFile(java.io.DataOutputStream out, Scene theScene) throws java.io.IOException
writeToFile
in class Object3D
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |