artofillusion.animation
Class ObjectRef

java.lang.Object
  extended by artofillusion.animation.ObjectRef

public class ObjectRef
extends java.lang.Object

This class represents a reference either to an object, or to a joint within an object.


Constructor Summary
ObjectRef()
          Create a "null" reference which does not refer to any object.
ObjectRef(java.io.DataInputStream in, Scene theScene)
          Construct an object reference from its serialized representation.
ObjectRef(int objectID, int jointID, Scene sc)
          Create a reference to an object/joint which may not have been loaded yet.
ObjectRef(ObjectInfo info)
          Create a reference to an existing object.
ObjectRef(ObjectInfo info, Joint j)
          Create a reference to a joint within an existing object.
 
Method Summary
 void copy(ObjectRef ref)
          Make this ObjectRef identical to another one.
 ObjectRef duplicate()
          Create an exact duplicate of this object reference.
 boolean equals(java.lang.Object obj)
          Two ObjectRefs are equals if they refer to the same object or joint.
 CoordinateSystem getCoords()
          Get the coordinate system for the object/joint this refers to.
 Joint getJoint()
          Get the joint this reference refers to, or null if it does not refer to a joint.
 ObjectInfo getObject()
          Get the object this reference refers to.
 java.lang.String toString()
          Get a text string describing the object and joint.
 void writeToStream(java.io.DataOutputStream out)
          Write a serialized representation of this object reference to a stream.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ObjectRef

public ObjectRef()
Create a "null" reference which does not refer to any object.


ObjectRef

public ObjectRef(ObjectInfo info)
Create a reference to an existing object.


ObjectRef

public ObjectRef(ObjectInfo info,
                 Joint j)
Create a reference to a joint within an existing object.


ObjectRef

public ObjectRef(int objectID,
                 int jointID,
                 Scene sc)
Create a reference to an object/joint which may not have been loaded yet.


ObjectRef

public ObjectRef(java.io.DataInputStream in,
                 Scene theScene)
          throws java.io.IOException
Construct an object reference from its serialized representation.

Throws:
java.io.IOException
Method Detail

equals

public boolean equals(java.lang.Object obj)
Two ObjectRefs are equals if they refer to the same object or joint.

Overrides:
equals in class java.lang.Object

getObject

public ObjectInfo getObject()
Get the object this reference refers to.


getJoint

public Joint getJoint()
Get the joint this reference refers to, or null if it does not refer to a joint.


getCoords

public CoordinateSystem getCoords()
Get the coordinate system for the object/joint this refers to.


duplicate

public ObjectRef duplicate()
Create an exact duplicate of this object reference.


copy

public void copy(ObjectRef ref)
Make this ObjectRef identical to another one.


writeToStream

public void writeToStream(java.io.DataOutputStream out)
                   throws java.io.IOException
Write a serialized representation of this object reference to a stream.

Throws:
java.io.IOException

toString

public java.lang.String toString()
Get a text string describing the object and joint.

Overrides:
toString in class java.lang.Object


Copyright © 1999-2011 by Peter Eastman.