com.jme3.scene
Class UserData

java.lang.Object
  extended by com.jme3.scene.UserData
All Implemented Interfaces:
Savable

public final class UserData
extends java.lang.Object
implements Savable

UserData is used to contain user data objects set on spatials (primarily primitives) that do not implement the Savable interface. Note that attempting to export any models which have non-savable objects attached to them will fail.


Field Summary
static java.lang.String JME_PHYSICSIGNORE
          Boolean type on Geometries to indicate that physics collision shape generation should ignore them.
static java.lang.String JME_SHAREDMESH
          For geometries using shared mesh, this will specify the shared mesh reference.
protected  byte type
           
protected  java.lang.Object value
           
 
Constructor Summary
UserData()
           
UserData(byte type, java.lang.Object value)
          Creates a new UserData with the given type and value.
 
Method Summary
static byte getObjectType(java.lang.Object type)
           
 java.lang.Object getValue()
           
 void read(JmeImporter im)
           
 java.lang.String toString()
           
 void write(JmeExporter ex)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

JME_PHYSICSIGNORE

public static final java.lang.String JME_PHYSICSIGNORE
Boolean type on Geometries to indicate that physics collision shape generation should ignore them.

See Also:
Constant Field Values

JME_SHAREDMESH

public static final java.lang.String JME_SHAREDMESH
For geometries using shared mesh, this will specify the shared mesh reference.

See Also:
Constant Field Values

type

protected byte type

value

protected java.lang.Object value
Constructor Detail

UserData

public UserData()

UserData

public UserData(byte type,
                java.lang.Object value)
Creates a new UserData with the given type and value.

Parameters:
type - Type of data, should be between 0 and 4.
value - Value of the data
Method Detail

getValue

public java.lang.Object getValue()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getObjectType

public static byte getObjectType(java.lang.Object type)

write

public void write(JmeExporter ex)
           throws java.io.IOException
Specified by:
write in interface Savable
Throws:
java.io.IOException

read

public void read(JmeImporter im)
          throws java.io.IOException
Specified by:
read in interface Savable
Throws:
java.io.IOException