|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectartofillusion.object.Object3D
public abstract class Object3D
Object3D is the abstract superclass of any object which can be placed into a Scene.
Field Summary | |
---|---|
static int |
APPROXIMATELY
|
static int |
CANT_CONVERT
|
static int |
EXACTLY
|
Constructor Summary | |
---|---|
Object3D()
|
|
Object3D(java.io.DataInputStream in,
Scene theScene)
|
Method Summary | |
---|---|
abstract void |
applyPoseKeyframe(Keyframe k)
Modify this object based on a pose keyframe. |
boolean |
canConvertToActor()
Determine whether the user should be allowed to convert this object to an Actor. |
int |
canConvertToTriangleMesh()
Tells whether the object can be converted to a TriangleMesh. |
boolean |
canSetMaterial()
This method tells whether materials can be assigned to the object. |
boolean |
canSetTexture()
This method tells whether textures can be assigned to the object. |
void |
configurePoseTrack(PoseTrack track)
This will be called whenever a new pose track is created for this object. |
TriangleMesh |
convertToTriangleMesh(double tol)
Return a TriangleMesh which reproduces the shape of this object. |
abstract void |
copyObject(Object3D obj)
Copy all the properties of another object, to make this one identical to it. |
void |
copyTextureAndMaterial(Object3D obj)
Copy all texture and material information from another object to this one. |
abstract 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 |
editGesture(EditingWindow parent,
ObjectInfo info,
java.lang.Runnable cb,
ObjectInfo realObject)
Edit an object which represents a gesture for an Actor object. |
void |
editKeyframe(EditingWindow parent,
Keyframe k,
ObjectInfo info)
Allow the user to edit a keyframe returned by getPoseKeyframe(). |
double[] |
getAverageParameterValues()
Get the average value of each texture parameter. |
abstract BoundingBox |
getBounds()
Get a BoundingBox which just encloses the object. |
Material |
getMaterial()
Get this object's Material. |
MaterialMapping |
getMaterialMapping()
Get this object's MaterialMapping. |
TextureParameter[] |
getParameters()
Get the list of texture parameters for this object. |
ParameterValue |
getParameterValue(TextureParameter param)
Get the object defining the value of a particular texture parameter. |
ParameterValue[] |
getParameterValues()
Get the list of objects defining the values of texture parameters. |
Object3D |
getPosableObject()
Get a version of this object to which a pose track can be attached. |
abstract 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. |
RenderingMesh |
getRenderingMesh(double tol,
boolean interactive,
ObjectInfo info)
Objects which can be rendered as part of a scene should override this method to return a RenderingMesh which describes the appearance of the object. |
Skeleton |
getSkeleton()
Get the skeleton for this object, or null if it does not have one. |
Texture |
getTexture()
Get this object's Texture. |
TextureMapping |
getTextureMapping()
Get this object's TextureMapping. |
abstract WireframeMesh |
getWireframeMesh()
Every object should override this method to return a WireframeMesh. |
boolean |
isClosed()
Tells whether the object is closed. |
boolean |
isEditable()
If the object can be edited by the user, isEditable() should be overridden to return true. |
static ParameterValue |
readParameterValue(java.io.DataInputStream in)
Read in the value of a texture parameter from a stream. |
void |
renderObject(ObjectInfo obj,
ViewerCanvas canvas,
Vec3 viewDir)
Render this object into a ViewerCanvas. |
void |
sceneChanged(ObjectInfo info,
Scene scene)
This will be called whenever this object is moved, or the time changes. |
void |
setMaterial(Material mat,
MaterialMapping map)
Set the Material and MaterialMapping for this object. |
void |
setParameters(TextureParameter[] param)
Set the list of texture parameters for this object. |
void |
setParameterValue(TextureParameter param,
ParameterValue val)
Set the object defining the value of a particular texture parameter. |
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. |
abstract void |
setSize(double xsize,
double ysize,
double zsize)
Resize the object. |
void |
setTexture(Texture tex,
TextureMapping map)
Set the Texture and TextureMapping for this object. |
void |
writeToFile(java.io.DataOutputStream out,
Scene theScene)
The following method writes the object's data to an output stream. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int CANT_CONVERT
public static final int EXACTLY
public static final int APPROXIMATELY
Constructor Detail |
---|
public Object3D()
public Object3D(java.io.DataInputStream in, Scene theScene) throws java.io.IOException, java.io.InvalidObjectException
java.io.IOException
java.io.InvalidObjectException
Method Detail |
---|
public abstract Object3D duplicate()
public abstract void copyObject(Object3D obj)
public abstract BoundingBox getBounds()
public abstract void setSize(double xsize, double ysize, double zsize)
public boolean isClosed()
public int canConvertToTriangleMesh()
public TriangleMesh convertToTriangleMesh(double tol)
public void sceneChanged(ObjectInfo info, Scene scene)
public boolean isEditable()
public void edit(EditingWindow parent, ObjectInfo info, java.lang.Runnable cb)
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 editGesture(EditingWindow parent, ObjectInfo info, java.lang.Runnable cb, ObjectInfo realObject)
public boolean canSetTexture()
public boolean canSetMaterial()
public void setTexture(Texture tex, TextureMapping map)
public Texture getTexture()
public TextureMapping getTextureMapping()
public void setMaterial(Material mat, MaterialMapping map)
public Material getMaterial()
public MaterialMapping getMaterialMapping()
public TextureParameter[] getParameters()
public void setParameters(TextureParameter[] param)
public ParameterValue[] getParameterValues()
public double[] getAverageParameterValues()
public void setParameterValues(ParameterValue[] val)
public ParameterValue getParameterValue(TextureParameter param)
public void setParameterValue(TextureParameter param, ParameterValue val)
public void copyTextureAndMaterial(Object3D obj)
public Skeleton getSkeleton()
public RenderingMesh getRenderingMesh(double tol, boolean interactive, ObjectInfo info)
The ObjectInfo contains additional information which may affect how the object is rendered, such as it location in the scene, texture parameters, etc.
Objects which cannot be rendered directly (lights, cameras, curves, etc.) do not need to override this method.
public abstract WireframeMesh getWireframeMesh()
public void renderObject(ObjectInfo obj, ViewerCanvas canvas, Vec3 viewDir)
obj
- the ObjectInfo for this objectcanvas
- the canvas in which to render this objectviewDir
- the direction from which this object is being viewedpublic void writeToFile(java.io.DataOutputStream out, Scene theScene) throws java.io.IOException
java.io.IOException
public static ParameterValue readParameterValue(java.io.DataInputStream in) throws java.io.IOException
java.io.IOException
public Property[] getProperties()
public java.lang.Object getPropertyValue(int index)
index
- the index of the property to getpublic void setPropertyValue(int index, java.lang.Object value)
index
- the index of the property to setvalue
- the value to set for the propertypublic abstract Keyframe getPoseKeyframe()
public abstract void applyPoseKeyframe(Keyframe k)
public void configurePoseTrack(PoseTrack track)
public void editKeyframe(EditingWindow parent, Keyframe k, ObjectInfo info)
public boolean canConvertToActor()
public Object3D getPosableObject()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |