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.Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
UserData() |
UserData(byte type,
java.lang.Object value)
Creates a new
UserData with the given
type and value. |
Modifier and Type | Method and Description |
---|---|
static byte |
getObjectType(java.lang.Object type) |
java.lang.Object |
getValue() |
void |
read(JmeImporter im) |
java.lang.String |
toString() |
void |
write(JmeExporter ex) |
public static final java.lang.String JME_PHYSICSIGNORE
public static final java.lang.String JME_SHAREDMESH
protected byte type
protected java.lang.Object value
public UserData()
public UserData(byte type, java.lang.Object value)
UserData
with the given
type and value.type
- Type of data, should be between 0 and 8.value
- Value of the datapublic java.lang.Object getValue()
public java.lang.String toString()
toString
in class java.lang.Object
public static byte getObjectType(java.lang.Object type)
public void write(JmeExporter ex) throws java.io.IOException
public void read(JmeImporter im) throws java.io.IOException