artofillusion.object
Class CompoundImplicitObject

java.lang.Object
  extended by artofillusion.object.Object3D
      extended by artofillusion.object.ImplicitObject
          extended by artofillusion.object.CompoundImplicitObject

public class CompoundImplicitObject
extends ImplicitObject


Nested Class Summary
static class CompoundImplicitObject.CompoundImplicitKeyframe
          Inner class representing a pose for a CompoundImplicitObject.
 
Field Summary
 
Fields inherited from class artofillusion.object.Object3D
APPROXIMATELY, CANT_CONVERT, EXACTLY
 
Constructor Summary
CompoundImplicitObject()
           
 
Method Summary
 void addObject(ImplicitObject obj, CoordinateSystem coords)
           
 void applyPoseKeyframe(Keyframe k)
          Modify this object based on a pose keyframe.
 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.
 double getCutoff()
          Get the cutoff value which defines the surface of the object.
 void getFieldGradient(double x, double y, double z, double size, double time, Vec3 grad)
          Get the gradient of the field function at a point specified in object coordinates.
 double getFieldValue(double x, double y, double z, double size, double time)
          Get the value of the field function at a point specified in object coordinates.
 int getNumObjects()
           
 ImplicitObject getObject(int index)
           
 CoordinateSystem getObjectCoordinates(int index)
           
 Keyframe getPoseKeyframe()
          Return a Keyframe which describes the current pose of this object.
 boolean getPreferDirectRendering()
          Get the preferred rendering method to use when this object is rendered by a renderer that supports direct evaluation of the field.
 boolean isEditable()
          Allow the user to edit this object.
 void setCutoff(double cutoff)
           
 void setObject(int index, ImplicitObject obj)
           
 void setObjectCoordinates(int index, CoordinateSystem coords)
           
 void setSize(double xsize, double ysize, double zsize)
          Resize the object.
 
Methods inherited from class artofillusion.object.ImplicitObject
canConvertToTriangleMesh, convertToTriangleMesh, generateMesh, getMaxGradient, getRenderingMesh, getWireframeMesh, sceneChanged, writeToFile
 
Methods inherited from class artofillusion.object.Object3D
canConvertToActor, canSetMaterial, canSetTexture, configurePoseTrack, copyTextureAndMaterial, editGesture, getAverageParameterValues, getMaterial, getMaterialMapping, getParameters, getParameterValue, getParameterValues, getPosableObject, getProperties, getPropertyValue, getSkeleton, getTexture, getTextureMapping, isClosed, readParameterValue, renderObject, setMaterial, setParameters, setParameterValue, setParameterValues, setPropertyValue, setTexture
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompoundImplicitObject

public CompoundImplicitObject()
Method Detail

addObject

public void addObject(ImplicitObject obj,
                      CoordinateSystem coords)

getNumObjects

public int getNumObjects()

getObject

public ImplicitObject getObject(int index)

setObject

public void setObject(int index,
                      ImplicitObject obj)

getObjectCoordinates

public CoordinateSystem getObjectCoordinates(int index)

setObjectCoordinates

public void setObjectCoordinates(int index,
                                 CoordinateSystem coords)

getCutoff

public double getCutoff()
Description copied from class: ImplicitObject
Get the cutoff value which defines the surface of the object. Points for which the field value is greater than the cutoff are inside the object.

The default implementation returns 1.0. It may be overridden to return a different value.

Overrides:
getCutoff in class ImplicitObject

setCutoff

public void setCutoff(double cutoff)

getFieldValue

public double getFieldValue(double x,
                            double y,
                            double z,
                            double size,
                            double time)
Description copied from class: ImplicitObject
Get the value of the field function at a point specified in object coordinates.

Specified by:
getFieldValue in class ImplicitObject
Parameters:
x - the x coordinate of the location at which to evaluate the function
y - the y coordinate of the location at which to evaluate the function
z - the z coordinate of the location at which to evaluate the function
size - the width of the region over which to average the function for antialiasing
time - the time at which the function is being evaluated
Returns:
the value of the field function at the specified location

getFieldGradient

public void getFieldGradient(double x,
                             double y,
                             double z,
                             double size,
                             double time,
                             Vec3 grad)
Description copied from class: ImplicitObject
Get the gradient of the field function at a point specified in object coordinates.

The default implementation of this method estimates the gradient by evaluating the field function at several closely spaced points. In many cases, it is possible to calculate the gradient both more quickly and more accurately by analytical means. Whenever possible, this method should be overridden to calculate the gradient directly.

Overrides:
getFieldGradient in class ImplicitObject
Parameters:
x - the x coordinate of the location at which to evaluate the function
y - the y coordinate of the location at which to evaluate the function
z - the z coordinate of the location at which to evaluate the function
size - the width of the region over which to average the function for antialiasing
time - the time at which the function is being evaluated
grad - on exit, this should be set equal to the gradient of the field function at the specified location

getPreferDirectRendering

public boolean getPreferDirectRendering()
Description copied from class: ImplicitObject
Get the preferred rendering method to use when this object is rendered by a renderer that supports direct evaluation of the field.

Specified by:
getPreferDirectRendering in class ImplicitObject
Returns:
true if direct evaluation is preferred, false if it is preferable to triangulate the surface by calling getRenderingMesh()

duplicate

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

Specified by:
duplicate in class Object3D

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.

Specified by:
copyObject in class Object3D

getBounds

public BoundingBox getBounds()
Description copied from class: Object3D
Get a BoundingBox which just encloses the object.

Specified by:
getBounds in class Object3D

setSize

public void setSize(double xsize,
                    double ysize,
                    double zsize)
Description copied from class: Object3D
Resize the object. This should be interpreted such that, if setSize() is followed by a call to getBounds(), the dimensions of the BoundingBox will exactly match the dimensions specified in setSize().

Specified by:
setSize in class Object3D

isEditable

public boolean isEditable()
Allow the user to edit this object.

Overrides:
isEditable in class Object3D

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 Object3D
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.

getPoseKeyframe

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

Specified by:
getPoseKeyframe in class Object3D

applyPoseKeyframe

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

Specified by:
applyPoseKeyframe in class Object3D

editKeyframe

public void editKeyframe(EditingWindow parent,
                         Keyframe k,
                         ObjectInfo info)
Description copied from class: Object3D
Allow the user to edit a keyframe returned by getPoseKeyframe().

Overrides:
editKeyframe in class Object3D


Copyright © 1999-2011 by Peter Eastman.