Description
The MotionEvent
class implements Control
and could therefore be included in a model asset. It also contains a mutable MotionPath
field, which gets serialized and de-serialized. And MotionPath
contains a mutable Spline
field, which gets serialized and de-serialized.
The usual use case for deserialization is to load scene-graph assets. Scene graphs are "smart assets" that get cached on first load. Subsequent loads are supposed to yield deep clones of the cached assets.
MotionPath
and Spline
are mutable objects; they ought to be replicated in any deep clone. However, path
field isn't cloned in MotionEvent.cloneFields()
, probably because MotionPath
isn't cloneable. And MotionPath
can't be cloned because Spline
isn't cloneable.
MotionPath
and Spline
should implement the JmeCloneable
interface, and MotionEvent.cloneFields()
should clone the path
field.