artofillusion.object
Class NullObject

java.lang.Object
  extended by artofillusion.object.Object3D
      extended by artofillusion.object.NullObject

public class NullObject
extends Object3D

NullObject represents an object which has no effect on how the scene is rendered.


Field Summary
 
Fields inherited from class artofillusion.object.Object3D
APPROXIMATELY, CANT_CONVERT, EXACTLY
 
Constructor Summary
NullObject()
           
NullObject(java.io.DataInputStream in, Scene theScene)
           
 
Method Summary
 void applyPoseKeyframe(Keyframe k)
          Modify this object based on a pose keyframe.
 boolean canSetTexture()
          This method tells whether textures can be assigned to the 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.
 BoundingBox getBounds()
          Get a BoundingBox which just encloses the object.
 Keyframe getPoseKeyframe()
          Return a Keyframe which describes the current pose of this 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 setSize(double xsize, double ysize, double zsize)
          Resize the 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, canConvertToTriangleMesh, canSetMaterial, configurePoseTrack, convertToTriangleMesh, copyTextureAndMaterial, edit, editGesture, editKeyframe, getAverageParameterValues, getMaterial, getMaterialMapping, getParameters, getParameterValue, getParameterValues, getPosableObject, getProperties, getPropertyValue, getRenderingMesh, getSkeleton, getTexture, getTextureMapping, isClosed, readParameterValue, renderObject, sceneChanged, setMaterial, setParameters, setParameterValue, setParameterValues, setPropertyValue, setTexture
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullObject

public NullObject()

NullObject

public NullObject(java.io.DataInputStream in,
                  Scene theScene)
           throws java.io.IOException,
                  java.io.InvalidObjectException
Throws:
java.io.IOException
java.io.InvalidObjectException
Method Detail

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

canSetTexture

public boolean canSetTexture()
Description copied from class: Object3D
This method tells whether textures can be assigned to the object. Objects for which it makes no sense to assign a texture (curves, lights, etc.) should override this method to return false.

Overrides:
canSetTexture in class Object3D

getWireframeMesh

public WireframeMesh getWireframeMesh()
Description copied from class: Object3D
Every object should override this method to return a WireframeMesh. This will be used for drawing the object in wireframe mode, and also for drawing "nonrenderable" objects in other rendering modes.

Specified by:
getWireframeMesh in class Object3D

isEditable

public boolean isEditable()
Description copied from class: Object3D
If the object can be edited by the user, isEditable() should be overridden to return true. edit() should then create a window and allow the user to edit the object.

Overrides:
isEditable in class Object3D

writeToFile

public void writeToFile(java.io.DataOutputStream out,
                        Scene theScene)
                 throws java.io.IOException
Description copied from class: Object3D
The following method writes the object's data to an output stream. Subclasses should override this method, but also call super.writeToFile() to save information about materials, etc. In addition to this method, every Object3D must include a constructor with the signature public Classname(DataInputStream in, Scene theScene) throws IOException, InvalidObjectException which reconstructs the object by reading its data from an input stream. This constructor, similarly, should call the overridden constructor to read information about materials, etc.

Overrides:
writeToFile in class Object3D
Throws:
java.io.IOException

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


Copyright © 1999-2011 by Peter Eastman.