|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectartofillusion.object.Object3D
artofillusion.object.ObjectWrapper
artofillusion.animation.Actor
public class Actor
An Actor is an object with a set of predefined gestures. Gestures can be blended in arbitrary combinations to form poses.
Nested Class Summary | |
---|---|
static class |
Actor.ActorKeyframe
Inner class representing a pose for an Actor. |
Field Summary |
---|
Fields inherited from class artofillusion.object.Object3D |
---|
APPROXIMATELY, CANT_CONVERT, EXACTLY |
Constructor Summary | |
---|---|
Actor(java.io.DataInputStream in,
Scene theScene)
Reconstruct this object from its serialized representation. |
|
Actor(Object3D obj)
|
Method Summary | |
---|---|
void |
addGesture(Gesture p,
java.lang.String name)
Add a new gesture to this actor. |
void |
applyPoseKeyframe(Keyframe k)
Modify this object based on a pose keyframe. |
boolean |
canSetMaterial()
This method tells whether materials can be assigned to the object. |
boolean |
canSetTexture()
All of the following methods call through to the corresponding methods on the object. |
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. |
void |
deleteGestureWithID(int id)
Delete a gesture from this actor. |
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(). |
static Actor |
getActor(Object3D obj)
This is a utility routine. |
Gesture |
getGesture(int i)
Get the i'th gesture defined for this actor. |
int |
getGestureID(int i)
Get the ID of the i'th gesture defined for this actor. |
int |
getGestureIndex(int id)
Return the index of the gesture with a particular ID, or -1 if there is no gesture with that ID. |
java.lang.String |
getGestureName(int i)
Get the name of the i'th gesture defined for this actor. |
Gesture |
getGestureWithID(int id)
Get the gesture with a particular ID, or null if there is no gesture with that ID. |
int |
getNumGestures()
Get the number of gestures defined for this actor. |
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. |
boolean |
isEditable()
If the object can be edited by the user, isEditable() should be overridden to return true. |
void |
setGestureName(int i,
java.lang.String name)
Set the name of the i'th gesture defined for this actor. |
void |
setMaterial(Material mat,
MaterialMapping map)
Set the Material and MaterialMapping for this object. |
void |
setParameterValue(TextureParameter param,
ParameterValue value)
Set the values of a texture parameter in every gesture. |
void |
setParameterValues(ParameterValue[] val)
Set the list of objects defining the values of texture parameters. |
void |
setPropertyValue(int index,
java.lang.Object value)
Set the value of one of this object's editable properties. |
void |
setSize(double xsize,
double ysize,
double zsize)
The size of an Actor cannot be set directly, since that is determined by its Poses. |
void |
setTexture(Texture tex,
TextureMapping map)
Set the Texture and TextureMapping for this object. |
void |
shapeMeshFromGestures(Object3D obj)
Given an object (either this Actor's object or a duplicate of it), reshape the object based on this Actor's getures. |
void |
writeToFile(java.io.DataOutputStream out,
Scene theScene)
Write a representation of this object to a file. |
Methods inherited from class artofillusion.object.ObjectWrapper |
---|
canConvertToTriangleMesh, convertToTriangleMesh, editGesture, getAverageParameterValues, getBounds, getMaterial, getMaterialMapping, getParameters, getParameterValue, getParameterValues, getRenderingMesh, getSkeleton, getTexture, getTextureMapping, getWireframeMesh, getWrappedObject, isClosed, renderObject, sceneChanged, setParameters |
Methods inherited from class artofillusion.object.Object3D |
---|
canConvertToActor, copyTextureAndMaterial, getPosableObject, readParameterValue |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Actor(Object3D obj)
public Actor(java.io.DataInputStream in, Scene theScene) throws java.io.IOException, java.io.InvalidObjectException
java.io.IOException
java.io.InvalidObjectException
Method Detail |
---|
public void addGesture(Gesture p, java.lang.String name)
public void deleteGestureWithID(int id)
public int getNumGestures()
public Gesture getGesture(int i)
public Gesture getGestureWithID(int id)
public java.lang.String getGestureName(int i)
public void setGestureName(int i, java.lang.String name)
public int getGestureID(int i)
public int getGestureIndex(int id)
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 boolean isEditable()
isEditable
in class Object3D
public void edit(EditingWindow parent, ObjectInfo info, java.lang.Runnable cb)
Object3D
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 boolean canSetTexture()
canSetTexture
in class Object3D
public boolean canSetMaterial()
Object3D
canSetMaterial
in class Object3D
public void setTexture(Texture tex, TextureMapping map)
Object3D
setTexture
in class Object3D
public void setMaterial(Material mat, MaterialMapping map)
Object3D
setMaterial
in class Object3D
public void setParameterValues(ParameterValue[] val)
setParameterValues
in class ObjectWrapper
public void setParameterValue(TextureParameter param, ParameterValue value)
setParameterValue
in class ObjectWrapper
public void shapeMeshFromGestures(Object3D obj)
public void writeToFile(java.io.DataOutputStream out, Scene theScene) throws java.io.IOException
writeToFile
in class Object3D
java.io.IOException
public Property[] getProperties()
Object3D
getProperties
in class Object3D
public java.lang.Object getPropertyValue(int index)
Object3D
getPropertyValue
in class Object3D
index
- the index of the property to getpublic void setPropertyValue(int index, java.lang.Object value)
Object3D
setPropertyValue
in class Object3D
index
- the index of the property to setvalue
- the value to set for the propertypublic Keyframe getPoseKeyframe()
getPoseKeyframe
in class ObjectWrapper
public void applyPoseKeyframe(Keyframe k)
applyPoseKeyframe
in class ObjectWrapper
public void configurePoseTrack(PoseTrack track)
configurePoseTrack
in class ObjectWrapper
public void editKeyframe(EditingWindow parent, Keyframe k, ObjectInfo info)
editKeyframe
in class ObjectWrapper
public static Actor getActor(Object3D obj)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |