|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectartofillusion.object.Object3D
artofillusion.object.Sphere
public class Sphere
The Sphere class actually can represent any ellipsoid. It is specified by the radii along the three principle axes.
Field Summary |
---|
Fields inherited from class artofillusion.object.Object3D |
---|
APPROXIMATELY, CANT_CONVERT, EXACTLY |
Constructor Summary | |
---|---|
Sphere(java.io.DataInputStream in,
Scene theScene)
|
|
Sphere(double xradius,
double yradius,
double zradius)
|
Method Summary | |
---|---|
void |
applyPoseKeyframe(Keyframe k)
Modify this object based on a pose keyframe. |
int |
canConvertToTriangleMesh()
Tells whether the object can be converted to a TriangleMesh. |
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. |
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(). |
BoundingBox |
getBounds()
Get a BoundingBox which just encloses the object. |
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. |
Vec3 |
getRadii()
|
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. |
WireframeMesh |
getWireframeMesh()
Every object should override this method to return a WireframeMesh. |
boolean |
isEditable()
If the object can be edited by the user, isEditable() should be overridden to return true. |
void |
setMaterial(Material mat,
MaterialMapping map)
Set the Material and MaterialMapping for this object. |
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)
Resize the object. |
void |
setTexture(Texture tex,
TextureMapping mapping)
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 artofillusion.object.Object3D |
---|
canConvertToActor, canSetMaterial, canSetTexture, copyTextureAndMaterial, editGesture, getAverageParameterValues, getMaterial, getMaterialMapping, getParameters, getParameterValue, getParameterValues, getPosableObject, getSkeleton, getTexture, getTextureMapping, isClosed, readParameterValue, renderObject, sceneChanged, setParameters, setParameterValue, setParameterValues |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Sphere(double xradius, double yradius, double zradius)
public Sphere(java.io.DataInputStream in, Scene theScene) throws java.io.IOException, java.io.InvalidObjectException
java.io.IOException
java.io.InvalidObjectException
Method Detail |
---|
public Object3D duplicate()
Object3D
duplicate
in class Object3D
public void copyObject(Object3D obj)
Object3D
copyObject
in class Object3D
public BoundingBox getBounds()
Object3D
getBounds
in class Object3D
public void setSize(double xsize, double ysize, double zsize)
Object3D
setSize
in class Object3D
public Vec3 getRadii()
public WireframeMesh getWireframeMesh()
Object3D
getWireframeMesh
in class Object3D
public int canConvertToTriangleMesh()
Object3D
canConvertToTriangleMesh
in class Object3D
public TriangleMesh convertToTriangleMesh(double tol)
Object3D
convertToTriangleMesh
in class Object3D
public RenderingMesh getRenderingMesh(double tol, boolean interactive, ObjectInfo info)
Object3D
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.
getRenderingMesh
in class Object3D
public void setTexture(Texture tex, TextureMapping mapping)
Object3D
setTexture
in class Object3D
public void setMaterial(Material mat, MaterialMapping map)
Object3D
setMaterial
in class Object3D
public boolean isEditable()
Object3D
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 void writeToFile(java.io.DataOutputStream out, Scene theScene) throws java.io.IOException
Object3D
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()
Object3D
getPoseKeyframe
in class Object3D
public void applyPoseKeyframe(Keyframe k)
Object3D
applyPoseKeyframe
in class Object3D
public void configurePoseTrack(PoseTrack track)
configurePoseTrack
in class Object3D
public void editKeyframe(EditingWindow parent, Keyframe k, ObjectInfo info)
Object3D
editKeyframe
in class Object3D
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |