diff options
author | Julien Gouesse <[email protected]> | 2018-01-27 11:31:54 +0100 |
---|---|---|
committer | Julien Gouesse <[email protected]> | 2018-01-27 11:31:54 +0100 |
commit | 3b2aee44d8587327c26d106ddfc16c78c8fa8396 (patch) | |
tree | e1679845809e59c6a291d91f0923567f97ccdfb3 /ardor3d-extras | |
parent | 32e0d417017c81b2c1ab3aba278a113e67547559 (diff) | |
parent | cbc61566689660d39f469efe4c429f8adf5b239e (diff) |
Merge commit 'cbc61566689660d39f469efe4c429f8adf5b239e'
Diffstat (limited to 'ardor3d-extras')
-rw-r--r-- | ardor3d-extras/src/main/java/com/ardor3d/extension/interact/InteractManager.java | 8 | ||||
-rw-r--r-- | ardor3d-extras/src/main/java/com/ardor3d/extension/interact/data/SpatialState.java | 12 |
2 files changed, 7 insertions, 13 deletions
diff --git a/ardor3d-extras/src/main/java/com/ardor3d/extension/interact/InteractManager.java b/ardor3d-extras/src/main/java/com/ardor3d/extension/interact/InteractManager.java index 7bc8732..e924ede 100644 --- a/ardor3d-extras/src/main/java/com/ardor3d/extension/interact/InteractManager.java +++ b/ardor3d-extras/src/main/java/com/ardor3d/extension/interact/InteractManager.java @@ -61,7 +61,7 @@ public class InteractManager { /** * Spatial state tracking. */ - protected SpatialState _state = new SpatialState(); + protected final SpatialState _state; /** * List of filters to modify state prior to applying to a Spatial target. @@ -69,6 +69,12 @@ public class InteractManager { protected List<UpdateFilter> _filters = new ArrayList<>(); public InteractManager() { + _state = new SpatialState(); + setupLogicalLayer(); + } + + public InteractManager(final SpatialState stateTracking) { + _state = stateTracking; setupLogicalLayer(); } diff --git a/ardor3d-extras/src/main/java/com/ardor3d/extension/interact/data/SpatialState.java b/ardor3d-extras/src/main/java/com/ardor3d/extension/interact/data/SpatialState.java index a800fa7..aa822a4 100644 --- a/ardor3d-extras/src/main/java/com/ardor3d/extension/interact/data/SpatialState.java +++ b/ardor3d-extras/src/main/java/com/ardor3d/extension/interact/data/SpatialState.java @@ -16,36 +16,24 @@ import com.ardor3d.scenegraph.Spatial; public class SpatialState { protected Transform _transform = new Transform(); - protected Object _userData = null; public SpatialState() {} /** copy constructor */ public SpatialState(final SpatialState toCopy) { _transform.set(toCopy._transform); - _userData = toCopy._userData; } public Transform getTransform() { return _transform; } - public Object getUserData() { - return _userData; - } - - public void setUserData(final Object userData) { - _userData = userData; - } - public void copyState(final Spatial source) { _transform.set(source.getTransform()); - _userData = source.getUserData(); } public void applyState(final Spatial target) { target.setTransform(_transform); - target.setUserData(_userData); } } |