|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectartofillusion.object.Object3D
artofillusion.object.ImplicitObject
public abstract class ImplicitObject
This abstract class represents an object whose surface is defined as an isosurface of a 3D field function. Subclasses define the function and isosurface value used to generate a particular surface. More precisely, the interior of the object is defined to consist of all points which satisfy the following conditions:
When both methods are available, the object can specify which is the preferred one to use. It does this by implementing getPreferDirectRendering().
| Field Summary |
|---|
| Fields inherited from class artofillusion.object.Object3D |
|---|
APPROXIMATELY, CANT_CONVERT, EXACTLY |
| Constructor Summary | |
|---|---|
ImplicitObject()
The default constructor does nothing. |
|
ImplicitObject(java.io.DataInputStream in,
Scene theScene)
Subclasses should invoke this method in their own constructors for loading from a file. |
|
| Method Summary | |
|---|---|
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. |
abstract 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. |
double |
getMaxGradient()
Get the maximum value which can ever occur for the absolute value of the field gradient. |
abstract boolean |
getPreferDirectRendering()
Get the preferred rendering method to use when this object is rendered by a renderer that supports direct evaluation of the field. |
void |
writeToFile(java.io.DataOutputStream out,
Scene theScene)
Subclasses should invoke this method in their own writeToFile() methods. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ImplicitObject()
public ImplicitObject(java.io.DataInputStream in,
Scene theScene)
throws java.io.IOException,
java.io.InvalidObjectException
java.io.IOException
java.io.InvalidObjectException| Method Detail |
|---|
public abstract double getFieldValue(double x,
double y,
double z,
double size,
double time)
x - the x coordinate of the location at which to evaluate the functiony - the y coordinate of the location at which to evaluate the functionz - the z coordinate of the location at which to evaluate the functionsize - the width of the region over which to average the function for antialiasingtime - the time at which the function is being evaluated
public void getFieldGradient(double x,
double y,
double z,
double size,
double time,
Vec3 grad)
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.
x - the x coordinate of the location at which to evaluate the functiony - the y coordinate of the location at which to evaluate the functionz - the z coordinate of the location at which to evaluate the functionsize - the width of the region over which to average the function for antialiasingtime - the time at which the function is being evaluatedgrad - on exit, this should be set equal to the gradient of the field function at
the specified locationpublic double getMaxGradient()
public double getCutoff()
The default implementation returns 1.0. It may be overridden to return a different value.
public abstract boolean getPreferDirectRendering()
public void writeToFile(java.io.DataOutputStream out,
Scene theScene)
throws java.io.IOException
writeToFile in class Object3Djava.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||