aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien Gouesse <[email protected]>2014-09-24 23:27:40 +0200
committerJulien Gouesse <[email protected]>2014-09-24 23:27:40 +0200
commitf38dd328528849161455361c0ed0b2214634f98f (patch)
treed4496008e054ee3eec0b320f6a1251eb2fb05c75
parentfd1fca3240bca358b2f4e18fbcb6f4393318727d (diff)
Stops using Guava to create the lists, the sets and the maps except when it is really necessary
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/AnimationManager.java11
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/SkeletonPose.java4
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/SkinnedMesh.java3
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/BinaryLERPSource.java4
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/ExclusiveClipSource.java8
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/InclusiveClipSource.java8
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/ManagedTransformSource.java4
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/AnimationClip.java6
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/AnimationClipInstance.java8
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/GuaranteedTriggerChannel.java8
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/InterpolatedDoubleChannel.java6
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/InterpolatedFloatChannel.java6
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/TransformChannel.java10
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/TriggerChannel.java6
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/TriggerData.java5
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/layer/AnimationLayer.java6
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/state/AbstractTwoStateLerpTransition.java4
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/state/ImmediateTransitionState.java4
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/state/SteadyState.java4
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/state/loader/OutputStore.java4
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/util/LoggingMap.java5
-rw-r--r--ardor3d-awt/src/main/java/com/ardor3d/image/util/awt/AWTImageLoader.java4
-rw-r--r--ardor3d-awt/src/main/java/com/ardor3d/image/util/awt/AWTImageUtil.java4
-rw-r--r--ardor3d-awt/src/main/java/com/ardor3d/input/awt/AwtMouseWrapper.java6
-rw-r--r--ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaAnimUtils.java29
-rw-r--r--ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaImporter.java7
-rw-r--r--ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaNodeUtils.java9
-rw-r--r--ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/data/AnimationItem.java3
-rw-r--r--ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/data/ColladaStorage.java6
-rw-r--r--ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/data/DataCache.java50
-rw-r--r--ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/data/JointNode.java4
-rw-r--r--ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/data/MaterialInfo.java8
-rw-r--r--ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/data/SkinData.java3
-rw-r--r--ardor3d-core/src/main/java/com/ardor3d/image/Image.java5
-rw-r--r--ardor3d-core/src/main/java/com/ardor3d/image/util/dds/DdsLoader.java4
-rw-r--r--ardor3d-core/src/main/java/com/ardor3d/input/ControllerInfo.java6
-rw-r--r--ardor3d-core/src/main/java/com/ardor3d/input/ControllerState.java8
-rw-r--r--ardor3d-core/src/main/java/com/ardor3d/input/MouseButton.java4
-rw-r--r--ardor3d-core/src/main/java/com/ardor3d/input/MouseState.java5
-rw-r--r--ardor3d-core/src/main/java/com/ardor3d/input/logical/MouseButtonCondition.java3
-rw-r--r--ardor3d-core/src/main/java/com/ardor3d/renderer/ContextManager.java4
-rw-r--r--ardor3d-core/src/main/java/com/ardor3d/renderer/effect/EffectManager.java8
-rw-r--r--ardor3d-core/src/main/java/com/ardor3d/renderer/effect/EffectStep_RenderScreenOverlay.java8
-rw-r--r--ardor3d-core/src/main/java/com/ardor3d/renderer/effect/EffectStep_RenderSpatials.java7
-rw-r--r--ardor3d-core/src/main/java/com/ardor3d/renderer/effect/RenderEffect.java5
-rw-r--r--ardor3d-core/src/main/java/com/ardor3d/renderer/effect/TextureRendererPool.java4
-rw-r--r--ardor3d-core/src/main/java/com/ardor3d/renderer/queue/RenderQueue.java4
-rw-r--r--ardor3d-core/src/main/java/com/ardor3d/renderer/state/RenderState.java5
-rw-r--r--ardor3d-core/src/main/java/com/ardor3d/renderer/state/record/ShaderObjectsStateRecord.java4
-rw-r--r--ardor3d-core/src/main/java/com/ardor3d/renderer/state/record/TextureStateRecord.java3
-rw-r--r--ardor3d-core/src/main/java/com/ardor3d/scenegraph/InstancingManager.java4
-rw-r--r--ardor3d-core/src/main/java/com/ardor3d/scenegraph/Mesh.java4
-rw-r--r--ardor3d-core/src/main/java/com/ardor3d/scenegraph/MeshData.java3
-rw-r--r--ardor3d-core/src/main/java/com/ardor3d/ui/text/BMFont.java13
-rw-r--r--ardor3d-core/src/main/java/com/ardor3d/util/ContextIdReference.java4
-rw-r--r--ardor3d-core/src/main/java/com/ardor3d/util/SimpleContextIdReference.java5
-rw-r--r--ardor3d-core/src/main/java/com/ardor3d/util/TextureKey.java7
-rw-r--r--ardor3d-core/src/main/java/com/ardor3d/util/export/binary/BinaryExporter.java11
-rw-r--r--ardor3d-core/src/main/java/com/ardor3d/util/export/binary/BinaryImporter.java10
-rw-r--r--ardor3d-core/src/main/java/com/ardor3d/util/export/xml/DOMInputCapsule.java3
-rw-r--r--ardor3d-core/src/main/java/com/ardor3d/util/geom/GeometryTool.java6
-rw-r--r--ardor3d-core/src/main/java/com/ardor3d/util/geom/MeshCombiner.java15
-rw-r--r--ardor3d-core/src/main/java/com/ardor3d/util/geom/VertGroupData.java4
-rw-r--r--ardor3d-core/src/main/java/com/ardor3d/util/resource/ResourceLocatorTool.java5
-rw-r--r--ardor3d-core/src/main/java/com/ardor3d/util/stat/MultiStatSample.java4
-rw-r--r--ardor3d-core/src/main/java/com/ardor3d/util/stat/StatCollector.java4
-rw-r--r--ardor3d-effects/src/main/java/com/ardor3d/extension/effect/SimpleBloomEffect.java8
-rw-r--r--ardor3d-effects/src/main/java/com/ardor3d/extension/effect/water/WaterNode.java6
-rw-r--r--ardor3d-effects/src/main/java/com/ardor3d/extension/shadow/map/ParallelSplitShadowMapPass.java6
-rw-r--r--ardor3d-examples/src/main/java/com/ardor3d/example/ExampleRunner.java4
-rw-r--r--ardor3d-examples/src/main/java/com/ardor3d/example/effect/ExtrusionExample.java6
-rw-r--r--ardor3d-examples/src/main/java/com/ardor3d/example/pipeline/AnimationDemoExample.java13
-rw-r--r--ardor3d-examples/src/main/java/com/ardor3d/example/renderer/Texture3DExample.java4
-rw-r--r--ardor3d-examples/src/main/java/com/ardor3d/example/renderer/utils/atlas/AtlasExample.java4
-rw-r--r--ardor3d-examples/src/main/java/com/ardor3d/example/renderer/utils/atlas/AtlasExampleMultiTextured.java4
-rw-r--r--ardor3d-extras/src/main/java/com/ardor3d/extension/atlas/TexturePacker.java14
-rw-r--r--ardor3d-extras/src/main/java/com/ardor3d/extension/interact/InteractManager.java6
-rw-r--r--ardor3d-extras/src/main/java/com/ardor3d/extension/interact/widget/AbstractInteractWidget.java4
-rw-r--r--ardor3d-extras/src/main/java/com/ardor3d/extension/interact/widget/CompoundInteractWidget.java10
-rw-r--r--ardor3d-extras/src/main/java/com/ardor3d/extension/model/md2/Md2DataStore.java6
-rw-r--r--ardor3d-extras/src/main/java/com/ardor3d/extension/model/md2/Md2Importer.java6
-rw-r--r--ardor3d-extras/src/main/java/com/ardor3d/extension/model/md3/Md3DataStore.java6
-rw-r--r--ardor3d-extras/src/main/java/com/ardor3d/extension/model/obj/ObjDataStore.java10
-rw-r--r--ardor3d-extras/src/main/java/com/ardor3d/extension/model/obj/ObjGeometryStore.java12
-rw-r--r--ardor3d-extras/src/main/java/com/ardor3d/extension/model/obj/ObjImporter.java8
-rw-r--r--ardor3d-extras/src/main/java/com/ardor3d/extension/model/obj/ObjSetManager.java11
-rw-r--r--ardor3d-extras/src/main/java/com/ardor3d/extension/model/util/nvtristrip/NvStripInfo.java13
-rw-r--r--ardor3d-extras/src/main/java/com/ardor3d/extension/model/util/nvtristrip/NvStripifier.java23
-rw-r--r--ardor3d-extras/src/main/java/com/ardor3d/extension/model/util/nvtristrip/NvTriangleStripper.java12
-rw-r--r--ardor3d-jogl/src/main/java/com/ardor3d/image/util/jogl/JoglImageUtil.java4
-rw-r--r--ardor3d-jogl/src/main/java/com/ardor3d/input/jinput/JInputControllerWrapper.java7
-rw-r--r--ardor3d-jogl/src/main/java/com/ardor3d/input/jogl/JoglNewtMouseWrapper.java6
-rw-r--r--ardor3d-swt/src/main/java/com/ardor3d/image/util/SWTImageUtil.java4
-rw-r--r--ardor3d-swt/src/main/java/com/ardor3d/input/swt/SwtMouseWrapper.java5
-rw-r--r--ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/client/Terrain.java5
-rw-r--r--ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/client/TerrainBuilder.java8
-rw-r--r--ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/client/TerrainGridCache.java14
-rw-r--r--ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/client/TextureClipmap.java16
-rw-r--r--ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/client/TextureGridCache.java14
-rw-r--r--ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/array/ArrayTerrainDataProvider.java10
-rw-r--r--ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/array/ArrayTerrainSource.java4
-rw-r--r--ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/array/ArrayTextureSource.java8
-rw-r--r--ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/awt/AbstractAwtElement.java5
-rw-r--r--ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/awt/AwtElementProvider.java6
-rw-r--r--ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/awt/AwtShapeElement.java4
-rw-r--r--ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/awt/AwtTextureSource.java14
-rw-r--r--ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/image/ImageTextureSource.java14
-rw-r--r--ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/inmemory/InMemoryTerrainDataProvider.java8
-rw-r--r--ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/inmemory/InMemoryTerrainSource.java6
-rw-r--r--ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/inmemory/InMemoryTextureSource.java10
-rw-r--r--ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/inmemory/data/InMemoryTerrainData.java14
-rw-r--r--ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/procedural/ProceduralNormalMapSource.java4
-rw-r--r--ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/procedural/ProceduralTerrainDataProvider.java4
-rw-r--r--ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/procedural/ProceduralTextureSource.java4
-rw-r--r--ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/simplearray/SimpleArrayTerrainDataProvider.java8
-rw-r--r--ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/simplearray/SimpleArrayTextureSource.java8
-rw-r--r--ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/util/ClipmapTerrainPicker.java4
-rw-r--r--ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/util/DoubleBufferedList.java7
-rw-r--r--ardor3d-ui/src/main/java/com/ardor3d/extension/ui/UIComboBox.java4
-rw-r--r--ardor3d-ui/src/main/java/com/ardor3d/extension/ui/UIComponent.java12
-rw-r--r--ardor3d-ui/src/main/java/com/ardor3d/extension/ui/UIHud.java5
-rw-r--r--ardor3d-ui/src/main/java/com/ardor3d/extension/ui/UISlider.java4
-rw-r--r--ardor3d-ui/src/main/java/com/ardor3d/extension/ui/layout/AnchorLayout.java4
-rw-r--r--ardor3d-ui/src/main/java/com/ardor3d/extension/ui/layout/RowLayout.java10
-rw-r--r--ardor3d-ui/src/main/java/com/ardor3d/extension/ui/model/DefaultComboBoxModel.java5
-rw-r--r--ardor3d-ui/src/main/java/com/ardor3d/extension/ui/text/RenderedText.java15
-rw-r--r--ardor3d-ui/src/main/java/com/ardor3d/extension/ui/text/TextFactory.java12
-rw-r--r--ardor3d-ui/src/main/java/com/ardor3d/extension/ui/text/TextSelection.java4
-rw-r--r--ardor3d-ui/src/main/java/com/ardor3d/extension/ui/text/font/BMFontProvider.java10
-rw-r--r--ardor3d-ui/src/main/java/com/ardor3d/extension/ui/text/font/UIFont.java8
-rw-r--r--ardor3d-ui/src/main/java/com/ardor3d/extension/ui/text/parser/ForumLikeMarkupParser.java8
-rw-r--r--ardor3d-ui/src/test/java/com/ardor3d/extension/ui/text/parser/ForumLikeMarkupParserTest.java16
132 files changed, 474 insertions, 510 deletions
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/AnimationManager.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/AnimationManager.java
index 9bda101..6a69e91 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/AnimationManager.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/AnimationManager.java
@@ -10,6 +10,7 @@
package com.ardor3d.extension.animation.skeletal;
+import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -21,7 +22,6 @@ import com.ardor3d.extension.animation.skeletal.util.LoggingMap;
import com.ardor3d.scenegraph.Spatial;
import com.ardor3d.util.ReadOnlyTimer;
import com.ardor3d.util.Timer;
-import com.google.common.collect.Lists;
import com.google.common.collect.MapMaker;
/**
@@ -61,7 +61,7 @@ public class AnimationManager {
protected AnimationApplier _applier;
/** Our animation layers. */
- protected final List<AnimationLayer> _layers = Lists.newArrayList();
+ protected final List<AnimationLayer> _layers = new ArrayList<AnimationLayer>();
/**
* A map of key->Double values, allowing control over elements under this manager without needing precise knowledge
@@ -97,7 +97,7 @@ public class AnimationManager {
/**
* Listeners for changes to this manager's AnimationUpdateState.
*/
- protected final List<AnimationUpdateStateListener> _updateStateListeners = Lists.newArrayList();
+ protected final List<AnimationUpdateStateListener> _updateStateListeners = new ArrayList<AnimationUpdateStateListener>();
/**
* Construct a new AnimationManager.
@@ -130,10 +130,9 @@ public class AnimationManager {
layer.setManager(this);
_layers.add(layer);
+ _applyToPoses = new ArrayList<SkeletonPose>();
if (pose != null) {
- _applyToPoses = Lists.newArrayList(pose);
- } else {
- _applyToPoses = Lists.newArrayList();
+ _applyToPoses.add(pose);
}
_valuesStore.setLogOnReplace(false);
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/SkeletonPose.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/SkeletonPose.java
index 41d2fdb..6a06fce 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/SkeletonPose.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/SkeletonPose.java
@@ -12,6 +12,7 @@ package com.ardor3d.extension.animation.skeletal;
import java.io.IOException;
import java.lang.reflect.Field;
+import java.util.ArrayList;
import java.util.List;
import com.ardor3d.annotation.SavableFactory;
@@ -21,7 +22,6 @@ import com.ardor3d.util.export.CapsuleUtils;
import com.ardor3d.util.export.InputCapsule;
import com.ardor3d.util.export.OutputCapsule;
import com.ardor3d.util.export.Savable;
-import com.google.common.collect.Lists;
/**
* Joins a Skeleton with an array of joint poses. This allows the skeleton to exist and be reused between multiple
@@ -48,7 +48,7 @@ public class SkeletonPose implements Savable {
/**
* The list of elements interested in notification when this SkeletonPose updates. Not saved to savable.
*/
- private transient final List<PoseListener> _poseListeners = Lists.newArrayListWithCapacity(1);
+ private transient final List<PoseListener> _poseListeners = new ArrayList<PoseListener>(1);
/**
* Construct a new SkeletonPose using the given Skeleton.
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/SkinnedMesh.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/SkinnedMesh.java
index 2859105..5a30091 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/SkinnedMesh.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/SkinnedMesh.java
@@ -28,7 +28,6 @@ import com.ardor3d.util.export.InputCapsule;
import com.ardor3d.util.export.OutputCapsule;
import com.ardor3d.util.export.Savable;
import com.ardor3d.util.geom.BufferUtils;
-import com.google.common.collect.Sets;
/**
* Mesh supporting deformation via skeletal animation.
@@ -624,7 +623,7 @@ public class SkinnedMesh extends Mesh implements PoseListener {
final short[] joints = new short[vcount * maxCount];
final float[] weights = new float[vcount * maxCount];
- final TreeSet<JointWeight> weightSort = Sets.newTreeSet();
+ final TreeSet<JointWeight> weightSort = new TreeSet<JointWeight>();
// Walk through old data vertex by vertex
int index;
for (int i = 0; i < vcount; i++) {
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/BinaryLERPSource.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/BinaryLERPSource.java
index 13e0284..7f2cb9f 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/BinaryLERPSource.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/BinaryLERPSource.java
@@ -10,13 +10,13 @@
package com.ardor3d.extension.animation.skeletal.blendtree;
+import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import com.ardor3d.extension.animation.skeletal.AnimationManager;
import com.ardor3d.extension.animation.skeletal.clip.TransformData;
import com.ardor3d.math.MathUtils;
-import com.google.common.collect.Maps;
/**
* <p>
@@ -115,7 +115,7 @@ public class BinaryLERPSource extends AbstractTwoPartSource {
Map<String, Object> rVal = store;
if (rVal == null) {
- rVal = Maps.newHashMap();
+ rVal = new HashMap<String, Object>();
}
for (final Entry<String, ? extends Object> entryAData : sourceAData.entrySet()) {
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/ExclusiveClipSource.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/ExclusiveClipSource.java
index 3d65439..c75a943 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/ExclusiveClipSource.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/ExclusiveClipSource.java
@@ -10,6 +10,8 @@
package com.ardor3d.extension.animation.skeletal.blendtree;
+import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -17,8 +19,6 @@ import com.ardor3d.extension.animation.skeletal.AnimationManager;
import com.ardor3d.extension.animation.skeletal.clip.AnimationClip;
import com.ardor3d.extension.animation.skeletal.clip.JointChannel;
import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
/**
* Similar to a ClipSource, this class samples and returns values from the channels of an AnimationClip.
@@ -27,7 +27,7 @@ import com.google.common.collect.Maps;
public class ExclusiveClipSource extends ClipSource {
/** Our List of channels to exclude by name. */
- private final List<String> _disabledChannels = Lists.newArrayList();
+ private final List<String> _disabledChannels = new ArrayList<String>();
/**
* Construct a new source. Clip and Manager must be set separately before use.
@@ -91,7 +91,7 @@ public class ExclusiveClipSource extends ClipSource {
final Map<String, ? extends Object> orig = super.getSourceData(manager);
// make a copy, removing specific channels
- final Map<String, ? extends Object> data = Maps.newHashMap(orig);
+ final Map<String, Object> data = new HashMap<String, Object>(orig);
if (_disabledChannels != null) {
for (final String key : _disabledChannels) {
data.remove(key);
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/InclusiveClipSource.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/InclusiveClipSource.java
index f8a260f..55ff54f 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/InclusiveClipSource.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/InclusiveClipSource.java
@@ -10,6 +10,8 @@
package com.ardor3d.extension.animation.skeletal.blendtree;
+import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -17,8 +19,6 @@ import com.ardor3d.extension.animation.skeletal.AnimationManager;
import com.ardor3d.extension.animation.skeletal.clip.AnimationClip;
import com.ardor3d.extension.animation.skeletal.clip.JointChannel;
import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
/**
* Similar to a ClipSource, this class samples and returns values from the channels of an AnimationClip.
@@ -28,7 +28,7 @@ import com.google.common.collect.Maps;
public class InclusiveClipSource extends ClipSource {
/** Our List of channels to include by name. */
- private final List<String> _enabledChannels = Lists.newArrayList();
+ private final List<String> _enabledChannels = new ArrayList<String>();
/**
* Construct a new source. Clip and Manager must be set separately before use.
@@ -92,7 +92,7 @@ public class InclusiveClipSource extends ClipSource {
final Map<String, ? extends Object> orig = super.getSourceData(manager);
// make a copy, only bringing across specific channels
- final Map<String, Object> data = Maps.newHashMap();
+ final Map<String, Object> data = new HashMap<String, Object>();
if (_enabledChannels != null) {
for (final String key : _enabledChannels) {
if (orig.containsKey(key)) {
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/ManagedTransformSource.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/ManagedTransformSource.java
index c2eae12..3b7e9ff 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/ManagedTransformSource.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/ManagedTransformSource.java
@@ -10,6 +10,7 @@
package com.ardor3d.extension.animation.skeletal.blendtree;
+import java.util.HashMap;
import java.util.Map;
import com.ardor3d.extension.animation.skeletal.AnimationManager;
@@ -20,7 +21,6 @@ import com.ardor3d.extension.animation.skeletal.clip.JointData;
import com.ardor3d.math.type.ReadOnlyQuaternion;
import com.ardor3d.math.type.ReadOnlyVector3;
import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Maps;
/**
* This tree source maintains its own source data, which can be modified directly using setJointXXX. This source is
@@ -29,7 +29,7 @@ import com.google.common.collect.Maps;
public class ManagedTransformSource implements BlendTreeSource {
/** Our local source data. */
- private final Map<String, JointData> data = Maps.newHashMap();
+ private final Map<String, JointData> data = new HashMap<String, JointData>();
/** optional: name of source we were initialized from, if given. */
private String sourceName;
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/AnimationClip.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/AnimationClip.java
index cc89913..39ca36e 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/AnimationClip.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/AnimationClip.java
@@ -12,6 +12,7 @@ package com.ardor3d.extension.animation.skeletal.clip;
import java.io.IOException;
import java.lang.reflect.Field;
+import java.util.ArrayList;
import java.util.List;
import com.ardor3d.annotation.SavableFactory;
@@ -19,7 +20,6 @@ import com.ardor3d.util.export.InputCapsule;
import com.ardor3d.util.export.OutputCapsule;
import com.ardor3d.util.export.Savable;
import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Lists;
/**
* AnimationClip manages a set of animation channels as a single clip entity.
@@ -41,7 +41,7 @@ public class AnimationClip implements Savable {
*/
public AnimationClip(final String name) {
_name = name;
- _channels = Lists.newArrayList();
+ _channels = new ArrayList<AbstractAnimationChannel>();
}
/**
@@ -52,7 +52,7 @@ public class AnimationClip implements Savable {
*/
public AnimationClip(final String name, final List<AbstractAnimationChannel> channels) {
_name = name;
- _channels = Lists.newArrayList(channels);
+ _channels = new ArrayList<AbstractAnimationChannel>(channels);
updateMaxTimeIndex();
}
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/AnimationClipInstance.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/AnimationClipInstance.java
index 14f8816..35bd687 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/AnimationClipInstance.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/AnimationClipInstance.java
@@ -10,13 +10,13 @@
package com.ardor3d.extension.animation.skeletal.clip;
+import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.ardor3d.extension.animation.skeletal.AnimationListener;
import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
/**
* Maintains state information about an instance of a specific animation clip, such as time scaling applied, active
@@ -40,7 +40,7 @@ public class AnimationClipInstance {
private double _startTime = 0.0;
/** Map of channel name -> state tracking objects. */
- private final Map<String, Object> _clipStateObjects = Maps.newHashMap();
+ private final Map<String, Object> _clipStateObjects = new HashMap<String, Object>();
/** List of callbacks for animation events. */
private List<AnimationListener> animationListeners = null;
@@ -53,7 +53,7 @@ public class AnimationClipInstance {
*/
public void addAnimationListener(final AnimationListener animationListener) {
if (animationListeners == null) {
- animationListeners = Lists.newArrayList();
+ animationListeners = new ArrayList<AnimationListener>();
}
animationListeners.add(animationListener);
}
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/GuaranteedTriggerChannel.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/GuaranteedTriggerChannel.java
index 394a585..c76aeba 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/GuaranteedTriggerChannel.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/GuaranteedTriggerChannel.java
@@ -10,10 +10,10 @@
package com.ardor3d.extension.animation.skeletal.clip;
+import java.util.ArrayList;
import java.util.List;
import com.ardor3d.annotation.SavableFactory;
-import com.google.common.collect.Lists;
/**
* An animation source channel consisting of keyword samples indicating when a specific trigger condition is met. Each
@@ -49,7 +49,7 @@ public class GuaranteedTriggerChannel extends TriggerChannel {
if (oldIndex == newIndex) {
triggerData.arm(newIndex, _keys[newIndex]);
} else {
- final List<String> triggers = Lists.newArrayList();
+ final List<String> triggers = new ArrayList<String>();
for (int i = oldIndex + 1; i <= newIndex; i++) {
if (_keys[i] != null) {
triggers.add(_keys[i]);
@@ -85,8 +85,8 @@ public class GuaranteedTriggerChannel extends TriggerChannel {
if (startTime > endTime) {
throw new IllegalArgumentException("startTime > endTime");
}
- final List<Float> times = Lists.newArrayList();
- final List<String> keys = Lists.newArrayList();
+ final List<Float> times = new ArrayList<Float>();
+ final List<String> keys = new ArrayList<String>();
final TriggerData tData = new TriggerData();
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/InterpolatedDoubleChannel.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/InterpolatedDoubleChannel.java
index d2efc88..a8e8f4e 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/InterpolatedDoubleChannel.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/InterpolatedDoubleChannel.java
@@ -12,12 +12,12 @@ package com.ardor3d.extension.animation.skeletal.clip;
import java.io.IOException;
import java.lang.reflect.Field;
+import java.util.ArrayList;
import java.util.List;
import com.ardor3d.math.MathUtils;
import com.ardor3d.util.export.InputCapsule;
import com.ardor3d.util.export.OutputCapsule;
-import com.google.common.collect.Lists;
/**
* An animation source channel consisting of double value samples. These samples are interpolated between key frames.
@@ -90,8 +90,8 @@ public class InterpolatedDoubleChannel extends AbstractAnimationChannel {
if (startTime > endTime) {
throw new IllegalArgumentException("startTime > endTime");
}
- final List<Float> times = Lists.newArrayList();
- final List<Double> keys = Lists.newArrayList();
+ final List<Float> times = new ArrayList<Float>();
+ final List<Double> keys = new ArrayList<Double>();
final double[] data = new double[1];
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/InterpolatedFloatChannel.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/InterpolatedFloatChannel.java
index d1b4cd2..71f0c40 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/InterpolatedFloatChannel.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/InterpolatedFloatChannel.java
@@ -12,12 +12,12 @@ package com.ardor3d.extension.animation.skeletal.clip;
import java.io.IOException;
import java.lang.reflect.Field;
+import java.util.ArrayList;
import java.util.List;
import com.ardor3d.math.MathUtils;
import com.ardor3d.util.export.InputCapsule;
import com.ardor3d.util.export.OutputCapsule;
-import com.google.common.collect.Lists;
/**
* An animation source channel consisting of float value samples. These samples are interpolated between key frames.
@@ -90,8 +90,8 @@ public class InterpolatedFloatChannel extends AbstractAnimationChannel {
if (startTime > endTime) {
throw new IllegalArgumentException("startTime > endTime");
}
- final List<Float> times = Lists.newArrayList();
- final List<Float> keys = Lists.newArrayList();
+ final List<Float> times = new ArrayList<Float>();
+ final List<Float> keys = new ArrayList<Float>();
final float[] data = new float[1];
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/TransformChannel.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/TransformChannel.java
index 9738dcb..2af0042 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/TransformChannel.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/TransformChannel.java
@@ -12,6 +12,7 @@ package com.ardor3d.extension.animation.skeletal.clip;
import java.io.IOException;
import java.lang.reflect.Field;
+import java.util.ArrayList;
import java.util.List;
import java.util.logging.Logger;
@@ -25,7 +26,6 @@ import com.ardor3d.util.export.CapsuleUtils;
import com.ardor3d.util.export.InputCapsule;
import com.ardor3d.util.export.OutputCapsule;
import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Lists;
/**
* An animation channel consisting of a series of transforms interpolated over time.
@@ -200,10 +200,10 @@ public class TransformChannel extends AbstractAnimationChannel {
if (startTime > endTime) {
throw new IllegalArgumentException("startTime > endTime");
}
- final List<Float> times = Lists.newArrayList();
- final List<ReadOnlyQuaternion> rotations = Lists.newArrayList();
- final List<ReadOnlyVector3> translations = Lists.newArrayList();
- final List<ReadOnlyVector3> scales = Lists.newArrayList();
+ final List<Float> times = new ArrayList<Float>();
+ final List<ReadOnlyQuaternion> rotations = new ArrayList<ReadOnlyQuaternion>();
+ final List<ReadOnlyVector3> translations = new ArrayList<ReadOnlyVector3>();
+ final List<ReadOnlyVector3> scales = new ArrayList<ReadOnlyVector3>();
final TransformData tData = new TransformData();
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/TriggerChannel.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/TriggerChannel.java
index 47eabd9..0a48964 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/TriggerChannel.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/TriggerChannel.java
@@ -12,12 +12,12 @@ package com.ardor3d.extension.animation.skeletal.clip;
import java.io.IOException;
import java.lang.reflect.Field;
+import java.util.ArrayList;
import java.util.List;
import com.ardor3d.annotation.SavableFactory;
import com.ardor3d.util.export.InputCapsule;
import com.ardor3d.util.export.OutputCapsule;
-import com.google.common.collect.Lists;
/**
* An animation source channel consisting of keyword samples indicating when a specific trigger condition is met. Each
@@ -94,8 +94,8 @@ public class TriggerChannel extends AbstractAnimationChannel {
if (startTime > endTime) {
throw new IllegalArgumentException("startTime > endTime");
}
- final List<Float> times = Lists.newArrayList();
- final List<String> keys = Lists.newArrayList();
+ final List<Float> times = new ArrayList<Float>();
+ final List<String> keys = new ArrayList<String>();
final TriggerData tData = new TriggerData();
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/TriggerData.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/TriggerData.java
index 7c0220f..5c62785 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/TriggerData.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/TriggerData.java
@@ -10,17 +10,16 @@
package com.ardor3d.extension.animation.skeletal.clip;
+import java.util.ArrayList;
import java.util.List;
-import com.google.common.collect.Lists;
-
/**
* Transient class that maintains the current triggers and armed status for a TriggerChannel.
*/
public class TriggerData {
/** The current trigger name. */
- private final List<String> _currentTriggers = Lists.newArrayList();
+ private final List<String> _currentTriggers = new ArrayList<String>();
/**
* The current channel sample index. We keep this to make sure we don't miss two channels in a row with the same
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/layer/AnimationLayer.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/layer/AnimationLayer.java
index eebf755..242d1f8 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/layer/AnimationLayer.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/layer/AnimationLayer.java
@@ -10,6 +10,7 @@
package com.ardor3d.extension.animation.skeletal.layer;
+import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.logging.Logger;
@@ -19,7 +20,6 @@ import com.ardor3d.extension.animation.skeletal.state.AbstractFiniteState;
import com.ardor3d.extension.animation.skeletal.state.AbstractTransitionState;
import com.ardor3d.extension.animation.skeletal.state.StateOwner;
import com.ardor3d.extension.animation.skeletal.state.SteadyState;
-import com.google.common.collect.Maps;
/**
* Animation layers are essentially independent state machines, managed by a single AnimationManager. Each maintains a
@@ -36,7 +36,7 @@ public class AnimationLayer implements StateOwner {
private static final Logger logger = Logger.getLogger(AnimationLayer.class.getName());
/** Our animation states */
- private final Map<String, SteadyState> _steadyStates = Maps.newHashMap();
+ private final Map<String, SteadyState> _steadyStates = new HashMap<String, SteadyState>();
/** Our current animation state */
private AbstractFiniteState _currentState;
@@ -51,7 +51,7 @@ public class AnimationLayer implements StateOwner {
private final String _name;
/** A map of general transitions for moving from the current state to another. */
- private final Map<String, AbstractTransitionState> _transitions = Maps.newHashMap();
+ private final Map<String, AbstractTransitionState> _transitions = new HashMap<String, AbstractTransitionState>();
/**
* Construct a new AnimationLayer.
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/state/AbstractTwoStateLerpTransition.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/state/AbstractTwoStateLerpTransition.java
index a838755..8efbcbe 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/state/AbstractTwoStateLerpTransition.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/state/AbstractTwoStateLerpTransition.java
@@ -10,13 +10,13 @@
package com.ardor3d.extension.animation.skeletal.state;
+import java.util.HashMap;
import java.util.Map;
import com.ardor3d.extension.animation.skeletal.AnimationManager;
import com.ardor3d.extension.animation.skeletal.blendtree.BinaryLERPSource;
import com.ardor3d.extension.animation.skeletal.layer.AnimationLayer;
import com.ardor3d.math.MathUtils;
-import com.google.common.collect.Maps;
/**
* An abstract transition state that blends between two other states.
@@ -195,7 +195,7 @@ public abstract class AbstractTwoStateLerpTransition extends AbstractTransitionS
// too many new transform data objects. This assumes that a
// same state always returns the same transform data objects.
if (_sourceData == null) {
- _sourceData = Maps.newHashMap();
+ _sourceData = new HashMap<String, Object>();
}
return BinaryLERPSource.combineSourceData(sourceAData, sourceBData, getPercent(), _sourceData);
}
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/state/ImmediateTransitionState.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/state/ImmediateTransitionState.java
index 58b8ccd..3145509 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/state/ImmediateTransitionState.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/state/ImmediateTransitionState.java
@@ -10,11 +10,11 @@
package com.ardor3d.extension.animation.skeletal.state;
+import java.util.HashMap;
import java.util.Map;
import com.ardor3d.extension.animation.skeletal.AnimationManager;
import com.ardor3d.extension.animation.skeletal.layer.AnimationLayer;
-import com.google.common.collect.Maps;
/**
* Cuts directly to the set target state, without any intermediate transition action.
@@ -49,7 +49,7 @@ public class ImmediateTransitionState extends AbstractTransitionState {
*/
@Override
public Map<String, ? extends Object> getCurrentSourceData(final AnimationManager manager) {
- return Maps.newHashMap();
+ return new HashMap<String, Object>();
}
/**
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/state/SteadyState.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/state/SteadyState.java
index 992d83d..325fb4a 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/state/SteadyState.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/state/SteadyState.java
@@ -10,13 +10,13 @@
package com.ardor3d.extension.animation.skeletal.state;
+import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import com.ardor3d.extension.animation.skeletal.AnimationManager;
import com.ardor3d.extension.animation.skeletal.blendtree.BlendTreeSource;
import com.ardor3d.extension.animation.skeletal.layer.AnimationLayer;
-import com.google.common.collect.Maps;
/**
* A "steady" state is an animation state that is concrete and stand-alone (vs. a state that handles transitioning
@@ -28,7 +28,7 @@ public class SteadyState extends AbstractFiniteState {
private final String _name;
/** A map of possible transitions for moving from this state to another. */
- private final Map<String, AbstractTransitionState> _transitions = Maps.newHashMap();
+ private final Map<String, AbstractTransitionState> _transitions = new HashMap<String, AbstractTransitionState>();
/** A transition to use if we reach the end of this state. May be null. */
private AbstractTransitionState _endTransition;
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/state/loader/OutputStore.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/state/loader/OutputStore.java
index b72b548..8a0e34f 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/state/loader/OutputStore.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/state/loader/OutputStore.java
@@ -10,10 +10,10 @@
package com.ardor3d.extension.animation.skeletal.state.loader;
+import java.util.ArrayList;
import java.util.List;
import com.ardor3d.extension.animation.skeletal.AttachmentPoint;
-import com.google.common.collect.Lists;
/**
* Storage class for items created during Layer import.
@@ -21,7 +21,7 @@ import com.google.common.collect.Lists;
public class OutputStore {
/** List of attachment points created during layer import. */
- private final List<AttachmentPoint> _attachments = Lists.newArrayList();
+ private final List<AttachmentPoint> _attachments = new ArrayList<AttachmentPoint>();
/** List of animation clip sources encountered during layer import. */
private final OutputClipSourceMap _usedClipSources = new OutputClipSourceMap();
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/util/LoggingMap.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/util/LoggingMap.java
index ab7ea19..95eb5db 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/util/LoggingMap.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/util/LoggingMap.java
@@ -11,12 +11,11 @@
package com.ardor3d.extension.animation.skeletal.util;
import java.util.Collection;
+import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.logging.Logger;
-import com.google.common.collect.Maps;
-
/**
* This class essentially just wraps a KEY->VALUE HashMap, providing extra logging when a VALUE is not found, or
* duplicate VALUE objects are added. An optional callback may be provided to try to load values not present in this
@@ -29,7 +28,7 @@ public class LoggingMap<KEY, VALUE> {
private static final Logger logger = Logger.getLogger(LoggingMap.class.getName());
/** Our map of values. */
- protected final Map<KEY, VALUE> _wrappedMap = Maps.newHashMap();
+ protected final Map<KEY, VALUE> _wrappedMap = new HashMap<KEY, VALUE>();
/** If not null, this callback is asked to load the missing value using the key. */
private MissingCallback<KEY, VALUE> _missCallback = null;
diff --git a/ardor3d-awt/src/main/java/com/ardor3d/image/util/awt/AWTImageLoader.java b/ardor3d-awt/src/main/java/com/ardor3d/image/util/awt/AWTImageLoader.java
index 9835bb4..34f0991 100644
--- a/ardor3d-awt/src/main/java/com/ardor3d/image/util/awt/AWTImageLoader.java
+++ b/ardor3d-awt/src/main/java/com/ardor3d/image/util/awt/AWTImageLoader.java
@@ -19,6 +19,7 @@ import java.awt.image.renderable.RenderableImage;
import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
+import java.util.ArrayList;
import java.util.List;
import java.util.logging.Logger;
@@ -31,7 +32,6 @@ import com.ardor3d.image.util.ImageLoader;
import com.ardor3d.image.util.ImageLoaderUtil;
import com.ardor3d.renderer.state.TextureState;
import com.ardor3d.util.geom.BufferUtils;
-import com.google.common.collect.Lists;
/**
* Image loader that makes use of AWT's ImageIO to load image file data.
@@ -49,7 +49,7 @@ public class AWTImageLoader implements ImageLoader {
public static void registerLoader() {
if (supportedFormats == null) {
- final List<String> formats = Lists.newArrayList();
+ final List<String> formats = new ArrayList<String>();
for (String format : ImageIO.getReaderFormatNames()) {
format = "." + format.toUpperCase();
if (!formats.contains(format)) {
diff --git a/ardor3d-awt/src/main/java/com/ardor3d/image/util/awt/AWTImageUtil.java b/ardor3d-awt/src/main/java/com/ardor3d/image/util/awt/AWTImageUtil.java
index ef417be..076def2 100644
--- a/ardor3d-awt/src/main/java/com/ardor3d/image/util/awt/AWTImageUtil.java
+++ b/ardor3d-awt/src/main/java/com/ardor3d/image/util/awt/AWTImageUtil.java
@@ -13,11 +13,11 @@ package com.ardor3d.image.util.awt;
import java.awt.Color;
import java.awt.image.BufferedImage;
import java.nio.ByteBuffer;
+import java.util.ArrayList;
import java.util.List;
import com.ardor3d.image.Image;
import com.ardor3d.image.PixelDataType;
-import com.google.common.collect.Lists;
/**
* Utility methods for converting Ardor3D Images to AWT BufferedImages.
@@ -63,7 +63,7 @@ public abstract class AWTImageUtil {
final int width = input.getWidth(), height = input.getHeight();
// create our return list
- final List<BufferedImage> rVal = Lists.newArrayList();
+ final List<BufferedImage> rVal = new ArrayList<BufferedImage>();
// Calculate our modulation or "tint" values per channel
final double tRed = tint != null ? tint.getRed() / 255. : 1.0;
diff --git a/ardor3d-awt/src/main/java/com/ardor3d/input/awt/AwtMouseWrapper.java b/ardor3d-awt/src/main/java/com/ardor3d/input/awt/AwtMouseWrapper.java
index c2c2a91..fac2cba 100644
--- a/ardor3d-awt/src/main/java/com/ardor3d/input/awt/AwtMouseWrapper.java
+++ b/ardor3d-awt/src/main/java/com/ardor3d/input/awt/AwtMouseWrapper.java
@@ -32,8 +32,6 @@ import com.ardor3d.input.MouseState;
import com.ardor3d.input.MouseWrapper;
import com.google.common.collect.AbstractIterator;
import com.google.common.collect.EnumMultiset;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
import com.google.common.collect.Multiset;
import com.google.common.collect.PeekingIterator;
@@ -42,7 +40,7 @@ import com.google.common.collect.PeekingIterator;
*/
public class AwtMouseWrapper implements MouseWrapper, MouseListener, MouseWheelListener, MouseMotionListener {
@GuardedBy("this")
- protected final LinkedList<MouseState> _upcomingEvents = Lists.newLinkedList();
+ protected final LinkedList<MouseState> _upcomingEvents = new LinkedList<MouseState>();
@GuardedBy("this")
protected AwtMouseIterator _currentIterator = null;
@@ -57,7 +55,7 @@ public class AwtMouseWrapper implements MouseWrapper, MouseListener, MouseWheelL
protected final MouseManager _manager;
protected final Multiset<MouseButton> _clicks = EnumMultiset.create(MouseButton.class);
- protected final EnumMap<MouseButton, Long> _lastClickTime = Maps.newEnumMap(MouseButton.class);
+ protected final EnumMap<MouseButton, Long> _lastClickTime = new EnumMap<MouseButton, Long>(MouseButton.class);
protected final EnumSet<MouseButton> _clickArmed = EnumSet.noneOf(MouseButton.class);
protected int _ignoreX = Integer.MAX_VALUE;
diff --git a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaAnimUtils.java b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaAnimUtils.java
index 03173d8..e3f39fd 100644
--- a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaAnimUtils.java
+++ b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaAnimUtils.java
@@ -19,6 +19,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.EnumMap;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;
@@ -65,8 +66,6 @@ import com.ardor3d.util.export.binary.BinaryImporter;
import com.ardor3d.util.geom.BufferUtils;
import com.ardor3d.util.geom.VertMap;
import com.google.common.collect.ArrayListMultimap;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
import com.google.common.collect.Multimap;
/**
@@ -196,7 +195,7 @@ public class ColladaAnimUtils {
final Node meshNode = _colladaMeshUtils.buildMesh(geometry);
if (meshNode != null) {
// Look for skeleton entries in the original <instance_controller> element
- final List<Element> skeletonRoots = Lists.newArrayList();
+ final List<Element> skeletonRoots = new ArrayList<Element>();
for (final Element sk : instanceController.getChildren("skeleton")) {
final Element skroot = _colladaDOMUtil.findTargetWithId(sk.getText());
if (skroot != null) {
@@ -215,9 +214,9 @@ public class ColladaAnimUtils {
}
// Pull out our joint names and bind matrices
- final List<String> jointNames = Lists.newArrayList();
- final List<Transform> bindMatrices = Lists.newArrayList();
- final List<ColladaInputPipe.ParamType> paramTypes = Lists.newArrayList();
+ final List<String> jointNames = new ArrayList<String>();
+ final List<Transform> bindMatrices = new ArrayList<Transform>();
+ final List<ColladaInputPipe.ParamType> paramTypes = new ArrayList<ColladaInputPipe.ParamType>();
for (final Element inputEL : jointsEL.getChildren("input")) {
final ColladaInputPipe pipe = new ColladaInputPipe(_colladaDOMUtil, inputEL);
@@ -324,8 +323,8 @@ public class ColladaAnimUtils {
}
// Pull out our per vertex joint indices and weights
- final List<Short> jointIndices = Lists.newArrayList();
- final List<Float> jointWeights = Lists.newArrayList();
+ final List<Short> jointIndices = new ArrayList<Short>();
+ final List<Float> jointWeights = new ArrayList<Float>();
int indOff = 0, weightOff = 0;
int maxOffset = 0;
@@ -670,7 +669,7 @@ public class ColladaAnimUtils {
+ targetNode.getName() + "(" + targetIndex + ")");
}
- final EnumMap<Type, ColladaInputPipe> pipes = Maps.newEnumMap(Type.class);
+ final EnumMap<Type, ColladaInputPipe> pipes = new EnumMap<Type, ColladaInputPipe>(Type.class);
final Element samplerElement = _colladaDOMUtil.findTargetWithId(source);
for (final Element inputElement : samplerElement.getChildren("input")) {
@@ -709,9 +708,9 @@ public class ColladaAnimUtils {
targetChannel.currentPos = 0;
}
- final List<Float> finalTimeList = Lists.newArrayList();
- final List<Transform> finalTransformList = Lists.newArrayList();
- final List<TargetChannel> workingChannels = Lists.newArrayList();
+ final List<Float> finalTimeList = new ArrayList<Float>();
+ final List<Transform> finalTransformList = new ArrayList<Transform>();
+ final List<TargetChannel> workingChannels = new ArrayList<TargetChannel>();
for (;;) {
float lowestTime = Float.MAX_VALUE;
boolean found = false;
@@ -926,7 +925,7 @@ public class ColladaAnimUtils {
return currentElement;
}
- private static final Map<String, Integer> symbolMap = Maps.newHashMap();
+ private static final Map<String, Integer> symbolMap = new HashMap<String, Integer>();
static {
symbolMap.put("ANGLE", 3);
symbolMap.put("TIME", 0);
@@ -1024,7 +1023,7 @@ public class ColladaAnimUtils {
* @return
*/
private List<TransformElement> getNodeTransformList(final List<Element> transforms) {
- final List<TransformElement> transformList = Lists.newArrayList();
+ final List<TransformElement> transformList = new ArrayList<TransformElement>();
for (final Element transform : transforms) {
final double[] array = _colladaDOMUtil.parseDoubleArray(transform);
@@ -1173,7 +1172,7 @@ public class ColladaAnimUtils {
private static class Target {
public String id;
- public List<String> sids = Lists.newArrayList();
+ public List<String> sids = new ArrayList<String>();
public AccessorType accessorType = AccessorType.None;
public int accessorIndexX = -1, accessorIndexY = -1;
diff --git a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaImporter.java b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaImporter.java
index b1e885e..cf0e4b5 100644
--- a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaImporter.java
+++ b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaImporter.java
@@ -50,7 +50,6 @@ import com.ardor3d.util.resource.ResourceLocatorTool;
import com.ardor3d.util.resource.ResourceSource;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Lists;
import com.google.common.collect.Multimap;
/**
@@ -72,7 +71,7 @@ public class ColladaImporter {
private final EnumSet<MatchCondition> _optimizeSettings = EnumSet.of(MatchCondition.UVs, MatchCondition.Normal,
MatchCondition.Color);
private Map<String, Joint> _externalJointMapping;
- private final List<ColladaExtraPlugin> _extraPlugins = Lists.newArrayList();
+ private final List<ColladaExtraPlugin> _extraPlugins = new ArrayList<ColladaExtraPlugin>();
public boolean isLoadTextures() {
return _loadTextures;
@@ -246,8 +245,8 @@ public class ColladaImporter {
_optimizeMeshes, _optimizeSettings, geometryTool);
final ColladaAnimUtils colladaAnimUtils = new ColladaAnimUtils(colladaStorage, dataCache, colladaDOMUtil,
colladaMeshUtils);
- final ColladaNodeUtils colladaNodeUtils = new ColladaNodeUtils(this, dataCache, colladaDOMUtil, colladaMaterialUtils,
- colladaMeshUtils, colladaAnimUtils);
+ final ColladaNodeUtils colladaNodeUtils = new ColladaNodeUtils(this, dataCache, colladaDOMUtil,
+ colladaMaterialUtils, colladaMeshUtils, colladaAnimUtils);
try {
// Pull in the DOM tree of the Collada resource.
diff --git a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaNodeUtils.java b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaNodeUtils.java
index b51515f..d67347f 100644
--- a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaNodeUtils.java
+++ b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaNodeUtils.java
@@ -33,7 +33,6 @@ import com.ardor3d.math.Vector3;
import com.ardor3d.math.Vector4;
import com.ardor3d.scenegraph.Node;
import com.ardor3d.scenegraph.Spatial;
-import com.google.common.collect.Lists;
/**
* Methods for parsing Collada data related to scenes and node hierarchy.
@@ -48,9 +47,9 @@ public class ColladaNodeUtils {
private final ColladaMeshUtils _colladaMeshUtils;
private final ColladaAnimUtils _colladaAnimUtils;
- public ColladaNodeUtils(final ColladaImporter importer, final DataCache dataCache, final ColladaDOMUtil colladaDOMUtil,
- final ColladaMaterialUtils colladaMaterialUtils, final ColladaMeshUtils colladaMeshUtils,
- final ColladaAnimUtils colladaAnimUtils) {
+ public ColladaNodeUtils(final ColladaImporter importer, final DataCache dataCache,
+ final ColladaDOMUtil colladaDOMUtil, final ColladaMaterialUtils colladaMaterialUtils,
+ final ColladaMeshUtils colladaMeshUtils, final ColladaAnimUtils colladaAnimUtils) {
_importer = importer;
_dataCache = dataCache;
_colladaDOMUtil = colladaDOMUtil;
@@ -97,7 +96,7 @@ public class ColladaNodeUtils {
// build a list of joints - one list per skeleton - and build a skeleton for each joint list.
for (final JointNode jointChildNode : _dataCache.getRootJointNode().getChildren()) {
- final List<Joint> jointList = Lists.newArrayList();
+ final List<Joint> jointList = new ArrayList<Joint>();
buildJointLists(jointChildNode, jointList);
final Joint[] joints = jointList.toArray(new Joint[jointList.size()]);
final Skeleton skeleton = new Skeleton(joints[0].getName() + "_skeleton", joints);
diff --git a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/data/AnimationItem.java b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/data/AnimationItem.java
index 400384c..2829e0e 100644
--- a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/data/AnimationItem.java
+++ b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/data/AnimationItem.java
@@ -20,12 +20,11 @@ import com.ardor3d.extension.animation.skeletal.clip.AnimationClip;
import com.ardor3d.util.export.InputCapsule;
import com.ardor3d.util.export.OutputCapsule;
import com.ardor3d.util.export.Savable;
-import com.google.common.collect.Lists;
@SavableFactory(factoryMethod = "initSavable")
public class AnimationItem implements Savable {
private final String _name;
- private final List<AnimationItem> _children = Lists.newArrayList();
+ private final List<AnimationItem> _children = new ArrayList<AnimationItem>();
private AnimationClip _animationClip;
public AnimationItem(final String name) {
diff --git a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/data/ColladaStorage.java b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/data/ColladaStorage.java
index 8eafa20..2d430b6 100644
--- a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/data/ColladaStorage.java
+++ b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/data/ColladaStorage.java
@@ -12,6 +12,7 @@ package com.ardor3d.extension.model.collada.jdom.data;
import java.io.IOException;
import java.nio.FloatBuffer;
+import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
@@ -25,7 +26,6 @@ import com.ardor3d.scenegraph.Node;
import com.ardor3d.util.export.InputCapsule;
import com.ardor3d.util.export.OutputCapsule;
import com.ardor3d.util.export.Savable;
-import com.google.common.collect.Lists;
import com.google.common.collect.Multimap;
/**
@@ -34,10 +34,10 @@ import com.google.common.collect.Multimap;
public class ColladaStorage implements Savable {
private Node _scene;
- private final List<SkinData> _skins = Lists.newArrayList();
+ private final List<SkinData> _skins = new ArrayList<SkinData>();
private AssetData _assetData;
- private final List<AbstractAnimationChannel> _transformChannels = Lists.newArrayList();
+ private final List<AbstractAnimationChannel> _transformChannels = new ArrayList<AbstractAnimationChannel>();
private AnimationItem _animationItemRoot;
// List of parsed color buffers, useful if collada includes multiple color channels per meshdata object
diff --git a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/data/DataCache.java b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/data/DataCache.java
index 0288777..5674e8f 100644
--- a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/data/DataCache.java
+++ b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/data/DataCache.java
@@ -11,7 +11,11 @@
package com.ardor3d.extension.model.collada.jdom.data;
import java.nio.FloatBuffer;
+import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collections;
+import java.util.HashMap;
+import java.util.IdentityHashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
@@ -29,8 +33,6 @@ import com.ardor3d.scenegraph.MeshData;
import com.ardor3d.scenegraph.Spatial;
import com.ardor3d.util.geom.VertMap;
import com.google.common.collect.ArrayListMultimap;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
import com.google.common.collect.Multimap;
/**
@@ -68,35 +70,35 @@ public class DataCache {
private final Multimap<Joint, AttachmentPoint> _attachmentPoints = ArrayListMultimap.create();
public DataCache() {
- _boundMaterials = Maps.newHashMap();
- _textures = Maps.newHashMap();
- _idCache = Maps.newHashMap();
- _sidCache = Maps.newHashMap();
- _xPathExpressions = Maps.newHashMap();
+ _boundMaterials = new HashMap<String, Element>();
+ _textures = new HashMap<String, Texture>();
+ _idCache = new HashMap<String, Element>();
+ _sidCache = new HashMap<String, Element>();
+ _xPathExpressions = new HashMap<String, XPath>();
_pattern = Pattern.compile("\\s");
- _transformTypes = Collections.unmodifiableList(Lists.newArrayList("lookat", "matrix", "rotate", "scale",
- "scew", "translate"));
+ _transformTypes = Collections.unmodifiableList(Arrays.asList(new String[] { "lookat", "matrix", "rotate",
+ "scale", "scew", "translate" }));
- _floatArrays = Maps.newHashMap();
- _doubleArrays = Maps.newHashMap();
- _booleanArrays = Maps.newHashMap();
- _intArrays = Maps.newHashMap();
- _stringArrays = Maps.newHashMap();
+ _floatArrays = new HashMap<Element, float[]>();
+ _doubleArrays = new HashMap<Element, double[]>();
+ _booleanArrays = new HashMap<Element, boolean[]>();
+ _intArrays = new HashMap<Element, int[]>();
+ _stringArrays = new HashMap<Element, String[]>();
_vertMappings = ArrayListMultimap.create();
- _meshVertMap = Maps.newIdentityHashMap();
+ _meshVertMap = new IdentityHashMap<Mesh, VertMap>();
_parsedVertexColors = ArrayListMultimap.create();
- _materialInfoMap = Maps.newHashMap();
- _meshMaterialMap = Maps.newIdentityHashMap();
+ _materialInfoMap = new HashMap<String, MaterialInfo>();
+ _meshMaterialMap = new IdentityHashMap<Mesh, String>();
- _elementSpatialMapping = Maps.newHashMap();
+ _elementSpatialMapping = new HashMap<Element, Spatial>();
- _elementJointMapping = Maps.newHashMap();
- _externalJointMapping = Maps.newHashMap();
- _skeletons = Lists.newArrayList();
- _jointSkeletonMapping = Maps.newHashMap();
- _skeletonPoseMapping = Maps.newHashMap();
- _controllers = Lists.newArrayList();
+ _elementJointMapping = new HashMap<Element, Joint>();
+ _externalJointMapping = new HashMap<String, Joint>();
+ _skeletons = new ArrayList<Skeleton>();
+ _jointSkeletonMapping = new HashMap<Joint, Skeleton>();
+ _skeletonPoseMapping = new HashMap<Skeleton, SkeletonPose>();
+ _controllers = new ArrayList<ControllerStore>();
}
public void bindMaterial(final String ref, final Element material) {
diff --git a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/data/JointNode.java b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/data/JointNode.java
index 66a8c75..892f206 100644
--- a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/data/JointNode.java
+++ b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/data/JointNode.java
@@ -10,15 +10,15 @@
package com.ardor3d.extension.model.collada.jdom.data;
+import java.util.ArrayList;
import java.util.List;
import com.ardor3d.extension.animation.skeletal.Joint;
import com.ardor3d.scenegraph.Node;
-import com.google.common.collect.Lists;
public class JointNode {
private JointNode parent;
- private final List<JointNode> children = Lists.newArrayList();
+ private final List<JointNode> children = new ArrayList<JointNode>();
private final Joint joint;
/** Scene node associated with the Joint. */
diff --git a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/data/MaterialInfo.java b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/data/MaterialInfo.java
index 91c918d..05c29ba 100644
--- a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/data/MaterialInfo.java
+++ b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/data/MaterialInfo.java
@@ -10,20 +10,20 @@
package com.ardor3d.extension.model.collada.jdom.data;
+import java.util.HashMap;
import java.util.Map;
import com.ardor3d.image.Texture;
import com.ardor3d.renderer.state.MaterialState;
-import com.google.common.collect.Maps;
public class MaterialInfo {
private String _materialName;
private String _profile;
private String _technique;
- private final Map<String, String> _textureReferences = Maps.newHashMap();
- private final Map<String, Texture> _textures = Maps.newHashMap();
- private final Map<String, String> _textureFileNames = Maps.newHashMap();
+ private final Map<String, String> _textureReferences = new HashMap<String, String>();
+ private final Map<String, Texture> _textures = new HashMap<String, Texture>();
+ private final Map<String, String> _textureFileNames = new HashMap<String, String>();
private boolean _useTransparency;
private float _transparency = 1.0f;
diff --git a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/data/SkinData.java b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/data/SkinData.java
index 7fea027..c583e96 100644
--- a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/data/SkinData.java
+++ b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/data/SkinData.java
@@ -22,7 +22,6 @@ import com.ardor3d.scenegraph.Node;
import com.ardor3d.util.export.InputCapsule;
import com.ardor3d.util.export.OutputCapsule;
import com.ardor3d.util.export.Savable;
-import com.google.common.collect.Lists;
/**
* Data class used to hold references to useful objects created during parsing of a single Collada <skin> tag.
@@ -32,7 +31,7 @@ public class SkinData implements Savable {
private SkeletonPose _pose;
private Node _skinBaseNode;
- private final List<SkinnedMesh> _skins = Lists.newArrayList();
+ private final List<SkinnedMesh> _skins = new ArrayList<SkinnedMesh>();
private final String _name;
/**
diff --git a/ardor3d-core/src/main/java/com/ardor3d/image/Image.java b/ardor3d-core/src/main/java/com/ardor3d/image/Image.java
index 9acc762..b6b07ca 100644
--- a/ardor3d-core/src/main/java/com/ardor3d/image/Image.java
+++ b/ardor3d-core/src/main/java/com/ardor3d/image/Image.java
@@ -20,7 +20,6 @@ import java.util.List;
import com.ardor3d.util.export.InputCapsule;
import com.ardor3d.util.export.OutputCapsule;
import com.ardor3d.util.export.Savable;
-import com.google.common.collect.Lists;
/**
* <code>Image</code> defines a data format for a graphical image. The image is defined by a format, a height and width,
@@ -98,7 +97,7 @@ public class Image implements Serializable, Savable {
*/
public Image(final ImageDataFormat format, final PixelDataType type, final int width, final int height,
final ByteBuffer data, final int[] mipMapSizes) {
- this(format, type, width, height, Lists.newArrayList(data), mipMapSizes);
+ this(format, type, width, height, new ArrayList<ByteBuffer>(Arrays.asList(data)), mipMapSizes);
}
/**
@@ -123,7 +122,7 @@ public class Image implements Serializable, Savable {
* the data that contains the image information.
*/
public void setData(final ByteBuffer data) {
- _data = Lists.newArrayList(data);
+ _data = new ArrayList<ByteBuffer>(Arrays.asList(data));
}
/**
diff --git a/ardor3d-core/src/main/java/com/ardor3d/image/util/dds/DdsLoader.java b/ardor3d-core/src/main/java/com/ardor3d/image/util/dds/DdsLoader.java
index 494c76c..3c28364 100644
--- a/ardor3d-core/src/main/java/com/ardor3d/image/util/dds/DdsLoader.java
+++ b/ardor3d-core/src/main/java/com/ardor3d/image/util/dds/DdsLoader.java
@@ -18,6 +18,7 @@ import static com.ardor3d.image.util.dds.DdsUtils.shiftCount;
import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
+import java.util.ArrayList;
import java.util.List;
import java.util.logging.Logger;
@@ -28,7 +29,6 @@ import com.ardor3d.image.util.ImageLoader;
import com.ardor3d.image.util.ImageUtils;
import com.ardor3d.util.LittleEndianDataInput;
import com.ardor3d.util.geom.BufferUtils;
-import com.google.common.collect.Lists;
/**
* <p>
@@ -254,7 +254,7 @@ public class DdsLoader implements ImageLoader {
}
// Go through and load in image data
- final List<ByteBuffer> imageData = Lists.newArrayList();
+ final List<ByteBuffer> imageData = new ArrayList<ByteBuffer>();
for (int i = 0; i < image.getDepth(); i++) {
// read in compressed data
if (compressedFormat) {
diff --git a/ardor3d-core/src/main/java/com/ardor3d/input/ControllerInfo.java b/ardor3d-core/src/main/java/com/ardor3d/input/ControllerInfo.java
index a7e7c92..e9175bf 100644
--- a/ardor3d-core/src/main/java/com/ardor3d/input/ControllerInfo.java
+++ b/ardor3d-core/src/main/java/com/ardor3d/input/ControllerInfo.java
@@ -13,8 +13,6 @@ package com.ardor3d.input;
import java.util.ArrayList;
import java.util.List;
-import com.google.common.collect.Lists;
-
public class ControllerInfo {
private final String _controllerName;
@@ -23,8 +21,8 @@ public class ControllerInfo {
public ControllerInfo(final String controllerName, final List<String> axisNames, final List<String> buttonNames) {
_controllerName = controllerName;
- _axisNames = Lists.newArrayList(axisNames);
- _buttonNames = Lists.newArrayList(buttonNames);
+ _axisNames = new ArrayList<String>(axisNames);
+ _buttonNames = new ArrayList<String>(buttonNames);
}
public String getControllerName() {
diff --git a/ardor3d-core/src/main/java/com/ardor3d/input/ControllerState.java b/ardor3d-core/src/main/java/com/ardor3d/input/ControllerState.java
index 28f4c6d..bd3ed45 100644
--- a/ardor3d-core/src/main/java/com/ardor3d/input/ControllerState.java
+++ b/ardor3d-core/src/main/java/com/ardor3d/input/ControllerState.java
@@ -19,16 +19,14 @@ import java.util.Map;
import java.util.Map.Entry;
import com.ardor3d.annotation.Immutable;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
@Immutable
public class ControllerState {
public static final ControllerState NOTHING = new ControllerState(0);
- protected final Map<String, Map<String, Float>> _controllerStates = Maps.newLinkedHashMap();
- protected final List<ControllerEvent> _eventsSinceLastState = Lists.newArrayList();
+ protected final Map<String, Map<String, Float>> _controllerStates = new LinkedHashMap<String, Map<String, Float>>();
+ protected final List<ControllerEvent> _eventsSinceLastState = new ArrayList<ControllerEvent>();
protected ControllerState(final int ignore) {}
@@ -96,7 +94,7 @@ public class ControllerState {
private void duplicateStates(final Map<String, Map<String, Float>> store) {
store.clear();
for (final Entry<String, Map<String, Float>> entry : _controllerStates.entrySet()) {
- store.put(entry.getKey(), Maps.newLinkedHashMap(entry.getValue()));
+ store.put(entry.getKey(), new LinkedHashMap<String, Float>(entry.getValue()));
}
}
diff --git a/ardor3d-core/src/main/java/com/ardor3d/input/MouseButton.java b/ardor3d-core/src/main/java/com/ardor3d/input/MouseButton.java
index 6d2e378..8b49757 100644
--- a/ardor3d-core/src/main/java/com/ardor3d/input/MouseButton.java
+++ b/ardor3d-core/src/main/java/com/ardor3d/input/MouseButton.java
@@ -12,8 +12,6 @@ package com.ardor3d.input;
import java.util.EnumMap;
-import com.google.common.collect.Maps;
-
public enum MouseButton {
LEFT, RIGHT, MIDDLE, FOUR, FIVE, SIX, SEVEN, EIGHT, NINE;
@@ -28,7 +26,7 @@ public enum MouseButton {
if (middle == null) {
throw new NullPointerException("middle");
}
- final EnumMap<MouseButton, ButtonState> map = Maps.newEnumMap(MouseButton.class);
+ final EnumMap<MouseButton, ButtonState> map = new EnumMap<MouseButton, ButtonState>(MouseButton.class);
map.put(LEFT, left);
map.put(RIGHT, right);
map.put(MIDDLE, middle);
diff --git a/ardor3d-core/src/main/java/com/ardor3d/input/MouseState.java b/ardor3d-core/src/main/java/com/ardor3d/input/MouseState.java
index 8ee44ce..b1f4faa 100644
--- a/ardor3d-core/src/main/java/com/ardor3d/input/MouseState.java
+++ b/ardor3d-core/src/main/java/com/ardor3d/input/MouseState.java
@@ -17,9 +17,8 @@ import com.ardor3d.annotation.Immutable;
import com.google.common.collect.EnumMultiset;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableMultiset;
-import com.google.common.collect.Maps;
-import com.google.common.collect.Multiset;
import com.google.common.collect.ImmutableMultiset.Builder;
+import com.google.common.collect.Multiset;
/**
* Describes the mouse state at some point in time.
@@ -139,7 +138,7 @@ public class MouseState {
public EnumMap<MouseButton, ButtonState> getButtonStates(final EnumMap<MouseButton, ButtonState> store) {
EnumMap<MouseButton, ButtonState> rVal = store;
if (store == null) {
- rVal = Maps.newEnumMap(MouseButton.class);
+ rVal = new EnumMap<MouseButton, ButtonState>(MouseButton.class);
}
rVal.clear();
rVal.putAll(_buttonStates);
diff --git a/ardor3d-core/src/main/java/com/ardor3d/input/logical/MouseButtonCondition.java b/ardor3d-core/src/main/java/com/ardor3d/input/logical/MouseButtonCondition.java
index 54625ae..880765e 100644
--- a/ardor3d-core/src/main/java/com/ardor3d/input/logical/MouseButtonCondition.java
+++ b/ardor3d-core/src/main/java/com/ardor3d/input/logical/MouseButtonCondition.java
@@ -17,14 +17,13 @@ import com.ardor3d.input.ButtonState;
import com.ardor3d.input.InputState;
import com.ardor3d.input.MouseButton;
import com.google.common.base.Predicate;
-import com.google.common.collect.Maps;
/**
* A condition that checks the state of the two most commonly used mouse buttons.
*/
@Immutable
public final class MouseButtonCondition implements Predicate<TwoInputStates> {
- private final EnumMap<MouseButton, ButtonState> _states = Maps.newEnumMap(MouseButton.class);
+ private final EnumMap<MouseButton, ButtonState> _states = new EnumMap<MouseButton, ButtonState>(MouseButton.class);
public MouseButtonCondition(final EnumMap<MouseButton, ButtonState> states) {
_states.putAll(states);
diff --git a/ardor3d-core/src/main/java/com/ardor3d/renderer/ContextManager.java b/ardor3d-core/src/main/java/com/ardor3d/renderer/ContextManager.java
index a72ffd5..efcd33a 100644
--- a/ardor3d-core/src/main/java/com/ardor3d/renderer/ContextManager.java
+++ b/ardor3d-core/src/main/java/com/ardor3d/renderer/ContextManager.java
@@ -10,17 +10,17 @@
package com.ardor3d.renderer;
+import java.util.ArrayList;
import java.util.List;
import java.util.Map;
-import com.google.common.collect.Lists;
import com.google.common.collect.MapMaker;
public class ContextManager {
protected static RenderContext currentContext = null;
- private static List<ContextCleanListener> _cleanListeners = Lists.newArrayList();
+ private static List<ContextCleanListener> _cleanListeners = new ArrayList<ContextCleanListener>();
protected static final Map<Object, RenderContext> contextStore = new MapMaker().weakKeys().makeMap();
diff --git a/ardor3d-core/src/main/java/com/ardor3d/renderer/effect/EffectManager.java b/ardor3d-core/src/main/java/com/ardor3d/renderer/effect/EffectManager.java
index c5780bd..bc40f1d 100644
--- a/ardor3d-core/src/main/java/com/ardor3d/renderer/effect/EffectManager.java
+++ b/ardor3d-core/src/main/java/com/ardor3d/renderer/effect/EffectManager.java
@@ -10,7 +10,9 @@
package com.ardor3d.renderer.effect;
+import java.util.ArrayList;
import java.util.EnumMap;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -27,14 +29,12 @@ import com.ardor3d.scenegraph.Mesh;
import com.ardor3d.scenegraph.hint.CullHint;
import com.ardor3d.scenegraph.hint.LightCombineMode;
import com.ardor3d.util.geom.BufferUtils;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
public class EffectManager {
protected final DisplaySettings _canvasSettings;
- protected final List<RenderEffect> _effects = Lists.newArrayList();
- protected final Map<String, RenderTarget> _renderTargetMap = Maps.newHashMap();
+ protected final List<RenderEffect> _effects = new ArrayList<RenderEffect>();
+ protected final Map<String, RenderTarget> _renderTargetMap = new HashMap<String, RenderTarget>();
protected Renderer _currentRenderer = null;
protected RenderTarget _currentRenderTarget = null;
protected Camera _fsqCamera, _sceneCamera;
diff --git a/ardor3d-core/src/main/java/com/ardor3d/renderer/effect/EffectStep_RenderScreenOverlay.java b/ardor3d-core/src/main/java/com/ardor3d/renderer/effect/EffectStep_RenderScreenOverlay.java
index 777daee..588b95a 100644
--- a/ardor3d-core/src/main/java/com/ardor3d/renderer/effect/EffectStep_RenderScreenOverlay.java
+++ b/ardor3d-core/src/main/java/com/ardor3d/renderer/effect/EffectStep_RenderScreenOverlay.java
@@ -11,18 +11,18 @@
package com.ardor3d.renderer.effect;
import java.util.EnumMap;
+import java.util.HashMap;
import java.util.Map;
import com.ardor3d.renderer.state.RenderState;
-import com.ardor3d.renderer.state.TextureState;
import com.ardor3d.renderer.state.RenderState.StateType;
-import com.google.common.collect.Maps;
+import com.ardor3d.renderer.state.TextureState;
public class EffectStep_RenderScreenOverlay implements EffectStep {
- private final EnumMap<StateType, RenderState> _states = Maps.newEnumMap(StateType.class);
+ private final EnumMap<StateType, RenderState> _states = new EnumMap<StateType, RenderState>(StateType.class);
private final TextureState _texState = new TextureState();
- private final Map<String, Integer> _targetMap = Maps.newHashMap();
+ private final Map<String, Integer> _targetMap = new HashMap<String, Integer>();
public EffectStep_RenderScreenOverlay() {
_states.put(StateType.Texture, _texState);
diff --git a/ardor3d-core/src/main/java/com/ardor3d/renderer/effect/EffectStep_RenderSpatials.java b/ardor3d-core/src/main/java/com/ardor3d/renderer/effect/EffectStep_RenderSpatials.java
index ee03266..a07df8b 100644
--- a/ardor3d-core/src/main/java/com/ardor3d/renderer/effect/EffectStep_RenderSpatials.java
+++ b/ardor3d-core/src/main/java/com/ardor3d/renderer/effect/EffectStep_RenderSpatials.java
@@ -10,6 +10,7 @@
package com.ardor3d.renderer.effect;
+import java.util.ArrayList;
import java.util.EnumMap;
import java.util.List;
@@ -17,12 +18,10 @@ import com.ardor3d.renderer.Camera;
import com.ardor3d.renderer.state.RenderState;
import com.ardor3d.renderer.state.RenderState.StateType;
import com.ardor3d.scenegraph.Spatial;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
public class EffectStep_RenderSpatials implements EffectStep {
- private final EnumMap<StateType, RenderState> _states = Maps.newEnumMap(StateType.class);
- private final List<Spatial> _spatials = Lists.newArrayList();
+ private final EnumMap<StateType, RenderState> _states = new EnumMap<StateType, RenderState>(StateType.class);
+ private final List<Spatial> _spatials = new ArrayList<Spatial>();
private final Camera _trackedCamera;
public EffectStep_RenderSpatials(final Camera trackedCamera) {
diff --git a/ardor3d-core/src/main/java/com/ardor3d/renderer/effect/RenderEffect.java b/ardor3d-core/src/main/java/com/ardor3d/renderer/effect/RenderEffect.java
index 6fda5a9..409e443 100644
--- a/ardor3d-core/src/main/java/com/ardor3d/renderer/effect/RenderEffect.java
+++ b/ardor3d-core/src/main/java/com/ardor3d/renderer/effect/RenderEffect.java
@@ -10,10 +10,9 @@
package com.ardor3d.renderer.effect;
+import java.util.ArrayList;
import java.util.List;
-import com.google.common.collect.Lists;
-
/**
* A RenderEffect object represents a complete set of instructions necessary for applying a specific effect to our
* render output. Each effect is comprised of a set of 1 or more steps (EffectStep).
@@ -21,7 +20,7 @@ import com.google.common.collect.Lists;
public abstract class RenderEffect {
/** A list of logical steps that comprise our effect. */
- protected final List<EffectStep> _steps = Lists.newArrayList();
+ protected final List<EffectStep> _steps = new ArrayList<EffectStep>();
/** Is this render effect active? */
protected boolean _enabled = true;
diff --git a/ardor3d-core/src/main/java/com/ardor3d/renderer/effect/TextureRendererPool.java b/ardor3d-core/src/main/java/com/ardor3d/renderer/effect/TextureRendererPool.java
index 4f42df3..82af301 100644
--- a/ardor3d-core/src/main/java/com/ardor3d/renderer/effect/TextureRendererPool.java
+++ b/ardor3d-core/src/main/java/com/ardor3d/renderer/effect/TextureRendererPool.java
@@ -11,18 +11,18 @@
package com.ardor3d.renderer.effect;
import java.util.Iterator;
+import java.util.LinkedList;
import java.util.List;
import com.ardor3d.renderer.ContextManager;
import com.ardor3d.renderer.Renderer;
import com.ardor3d.renderer.TextureRenderer;
import com.ardor3d.renderer.TextureRendererFactory;
-import com.google.common.collect.Lists;
public enum TextureRendererPool {
INSTANCE;
- private final List<TextureRenderer> renderers = Lists.newLinkedList();
+ private final List<TextureRenderer> renderers = new LinkedList<TextureRenderer>();
public static TextureRenderer fetch(final int width, final int height, final Renderer renderer) {
for (final Iterator<TextureRenderer> it = INSTANCE.renderers.iterator(); it.hasNext();) {
diff --git a/ardor3d-core/src/main/java/com/ardor3d/renderer/queue/RenderQueue.java b/ardor3d-core/src/main/java/com/ardor3d/renderer/queue/RenderQueue.java
index facd51c..34a28ba 100644
--- a/ardor3d-core/src/main/java/com/ardor3d/renderer/queue/RenderQueue.java
+++ b/ardor3d-core/src/main/java/com/ardor3d/renderer/queue/RenderQueue.java
@@ -10,6 +10,7 @@
package com.ardor3d.renderer.queue;
+import java.util.LinkedHashMap;
import java.util.Map;
import com.ardor3d.renderer.Renderer;
@@ -18,11 +19,10 @@ import com.ardor3d.scenegraph.Mesh;
import com.ardor3d.scenegraph.Spatial;
import com.ardor3d.util.Ardor3dException;
import com.ardor3d.util.Constants;
-import com.google.common.collect.Maps;
public class RenderQueue {
- private final Map<RenderBucketType, RenderBucket> renderBuckets = Maps.newLinkedHashMap();
+ private final Map<RenderBucketType, RenderBucket> renderBuckets = new LinkedHashMap<RenderBucketType, RenderBucket>();
public RenderQueue() {
setupDefaultBuckets();
diff --git a/ardor3d-core/src/main/java/com/ardor3d/renderer/state/RenderState.java b/ardor3d-core/src/main/java/com/ardor3d/renderer/state/RenderState.java
index 4f4bef5..bbe1b64 100644
--- a/ardor3d-core/src/main/java/com/ardor3d/renderer/state/RenderState.java
+++ b/ardor3d-core/src/main/java/com/ardor3d/renderer/state/RenderState.java
@@ -24,7 +24,6 @@ import com.ardor3d.util.Constants;
import com.ardor3d.util.export.InputCapsule;
import com.ardor3d.util.export.OutputCapsule;
import com.ardor3d.util.export.Savable;
-import com.google.common.collect.Maps;
/**
* <code>RenderState</code> is the base class for all states that affect the rendering of a piece of geometry. They
@@ -96,8 +95,8 @@ public abstract class RenderState implements Savable {
static public class StateStack implements Poolable {
- private final EnumMap<RenderState.StateType, Stack<RenderState>> stacks = Maps
- .newEnumMap(RenderState.StateType.class);
+ private final EnumMap<RenderState.StateType, Stack<RenderState>> stacks = new EnumMap<StateType, Stack<RenderState>>(
+ RenderState.StateType.class);
public StateStack() {}
diff --git a/ardor3d-core/src/main/java/com/ardor3d/renderer/state/record/ShaderObjectsStateRecord.java b/ardor3d-core/src/main/java/com/ardor3d/renderer/state/record/ShaderObjectsStateRecord.java
index b542051..2fa77e4 100644
--- a/ardor3d-core/src/main/java/com/ardor3d/renderer/state/record/ShaderObjectsStateRecord.java
+++ b/ardor3d-core/src/main/java/com/ardor3d/renderer/state/record/ShaderObjectsStateRecord.java
@@ -10,11 +10,11 @@
package com.ardor3d.renderer.state.record;
+import java.util.ArrayList;
import java.util.List;
import com.ardor3d.renderer.state.GLSLShaderObjectsState;
import com.ardor3d.util.shader.ShaderVariable;
-import com.google.common.collect.Lists;
public class ShaderObjectsStateRecord extends StateRecord {
// XXX NOTE: This is non-standard. Due to the fact that shader implementations
@@ -22,7 +22,7 @@ public class ShaderObjectsStateRecord extends StateRecord {
// XXX checking system.
GLSLShaderObjectsState reference = null;
- public List<ShaderVariable> enabledAttributes = Lists.newArrayList();
+ public List<ShaderVariable> enabledAttributes = new ArrayList<ShaderVariable>();
public int shaderId = -1;
diff --git a/ardor3d-core/src/main/java/com/ardor3d/renderer/state/record/TextureStateRecord.java b/ardor3d-core/src/main/java/com/ardor3d/renderer/state/record/TextureStateRecord.java
index 062c555..3e63a6b 100644
--- a/ardor3d-core/src/main/java/com/ardor3d/renderer/state/record/TextureStateRecord.java
+++ b/ardor3d-core/src/main/java/com/ardor3d/renderer/state/record/TextureStateRecord.java
@@ -20,7 +20,6 @@ import com.ardor3d.math.Vector3;
import com.ardor3d.math.type.ReadOnlyVector4;
import com.ardor3d.renderer.state.TextureState;
import com.ardor3d.util.geom.BufferUtils;
-import com.google.common.collect.Maps;
public class TextureStateRecord extends StateRecord {
@@ -47,7 +46,7 @@ public class TextureStateRecord extends StateRecord {
public final DoubleBuffer tmp_matrixBuffer = BufferUtils.createDoubleBuffer(16);
public TextureStateRecord() {
- textures = Maps.newHashMap();
+ textures = new HashMap<Integer, TextureRecord>();
units = new TextureUnitRecord[TextureState.MAX_TEXTURES];
for (int i = 0; i < units.length; i++) {
units[i] = new TextureUnitRecord();
diff --git a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/InstancingManager.java b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/InstancingManager.java
index e6673a5..320e4e4 100644
--- a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/InstancingManager.java
+++ b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/InstancingManager.java
@@ -11,6 +11,7 @@
package com.ardor3d.scenegraph;
import java.nio.FloatBuffer;
+import java.util.ArrayList;
import java.util.List;
import com.ardor3d.math.Matrix4;
@@ -21,12 +22,11 @@ import com.ardor3d.renderer.Renderer;
import com.ardor3d.renderer.state.GLSLShaderObjectsState;
import com.ardor3d.util.Ardor3dException;
import com.ardor3d.util.geom.BufferUtils;
-import com.google.common.collect.Lists;
public class InstancingManager {
private int _maxBatchSize = 30;
- private final List<Mesh> _visibleMeshes = Lists.newArrayListWithCapacity(_maxBatchSize);
+ private final List<Mesh> _visibleMeshes = new ArrayList<Mesh>(_maxBatchSize);
private FloatBuffer _transformBuffer;
private int _primCount;
private int _meshesToDraw = 0;
diff --git a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/Mesh.java b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/Mesh.java
index f238cb4..bc3882d 100644
--- a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/Mesh.java
+++ b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/Mesh.java
@@ -12,6 +12,7 @@ package com.ardor3d.scenegraph;
import java.io.IOException;
import java.nio.FloatBuffer;
+import java.util.ArrayList;
import java.util.EnumMap;
import java.util.List;
@@ -47,7 +48,6 @@ import com.ardor3d.util.geom.BufferUtils;
import com.ardor3d.util.scenegraph.RenderDelegate;
import com.ardor3d.util.stat.StatCollector;
import com.ardor3d.util.stat.StatType;
-import com.google.common.collect.Lists;
/**
* A Mesh is a spatial describing a renderable geometric object. Data about the mesh is stored locally using MeshData.
@@ -559,7 +559,7 @@ public class Mesh extends Spatial implements Renderable, Pickable {
@Override
public IntersectionRecord intersectsPrimitivesWhere(final Ray3 ray) {
- final List<PrimitiveKey> primitives = Lists.newArrayList();
+ final List<PrimitiveKey> primitives = new ArrayList<PrimitiveKey>();
// What about Lines and Points?
final CollisionTree ct = CollisionTreeManager.getInstance().getCollisionTree(this);
diff --git a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/MeshData.java b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/MeshData.java
index 3c02967..9b13518 100644
--- a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/MeshData.java
+++ b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/MeshData.java
@@ -32,7 +32,6 @@ import com.ardor3d.util.export.InputCapsule;
import com.ardor3d.util.export.OutputCapsule;
import com.ardor3d.util.export.Savable;
import com.ardor3d.util.geom.BufferUtils;
-import com.google.common.collect.Lists;
import com.google.common.collect.MapMaker;
/**
@@ -58,7 +57,7 @@ public class MeshData implements Savable {
protected FloatBufferData _colorCoords;
protected FloatBufferData _fogCoords;
protected FloatBufferData _tangentCoords;
- protected List<FloatBufferData> _textureCoords = Lists.newArrayListWithCapacity(1);
+ protected List<FloatBufferData> _textureCoords = new ArrayList<FloatBufferData>(1);
/** Interleaved data (for VBO id use). */
protected FloatBufferData _interleaved;
diff --git a/ardor3d-core/src/main/java/com/ardor3d/ui/text/BMFont.java b/ardor3d-core/src/main/java/com/ardor3d/ui/text/BMFont.java
index c9cb42e..657f56d 100644
--- a/ardor3d-core/src/main/java/com/ardor3d/ui/text/BMFont.java
+++ b/ardor3d-core/src/main/java/com/ardor3d/ui/text/BMFont.java
@@ -14,6 +14,7 @@ import java.io.IOException;
import java.io.OutputStream;
import java.net.MalformedURLException;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -42,8 +43,6 @@ import com.ardor3d.util.export.InputCapsule;
import com.ardor3d.util.export.OutputCapsule;
import com.ardor3d.util.export.Savable;
import com.ardor3d.util.resource.ResourceSource;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
/**
* Loads a font generated by BMFont (http://www.angelcode.com/products/bmfont/).
@@ -56,8 +55,8 @@ import com.google.common.collect.Maps;
public class BMFont implements Savable {
private static Logger logger = Logger.getLogger(BMFont.class.getName());
- private final Map<Integer, Char> _charMap = Maps.newHashMap();
- private final Map<Integer, Map<Integer, Integer>> _kernMap = Maps.newHashMap();
+ private final Map<Integer, Char> _charMap = new HashMap<Integer, Char>();
+ private final Map<Integer, Map<Integer, Integer>> _kernMap = new HashMap<Integer, Map<Integer, Integer>>();
private String _styleName; // e.g. "Courier-12-bold"
private final ArrayList<Page> _pages = new ArrayList<Page>();
@@ -425,7 +424,7 @@ public class BMFont implements Savable {
}
public List<Integer> getMappedChars() {
- return Lists.newArrayList(_charMap.keySet());
+ return new ArrayList<Integer>(_charMap.keySet());
}
public Map<Integer, Integer> getKerningsForCharacter(final int val) {
@@ -557,7 +556,7 @@ public class BMFont implements Savable {
Map<Integer, Integer> amtHash;
amtHash = _kernMap.get(first);
if (amtHash == null) {
- amtHash = Maps.newHashMap();
+ amtHash = new HashMap<Integer, Integer>();
_kernMap.put(first, amtHash);
}
amtHash.put(second, amount);
@@ -939,7 +938,7 @@ public class BMFont implements Savable {
Map<Integer, Integer> amtHash;
amtHash = _kernMap.get(k.first);
if (amtHash == null) {
- amtHash = Maps.newHashMap();
+ amtHash = new HashMap<Integer, Integer>();
_kernMap.put(k.first, amtHash);
}
amtHash.put(k.second, k.amount);
diff --git a/ardor3d-core/src/main/java/com/ardor3d/util/ContextIdReference.java b/ardor3d-core/src/main/java/com/ardor3d/util/ContextIdReference.java
index 427b6cd..e2517fb 100644
--- a/ardor3d-core/src/main/java/com/ardor3d/util/ContextIdReference.java
+++ b/ardor3d-core/src/main/java/com/ardor3d/util/ContextIdReference.java
@@ -12,11 +12,11 @@ package com.ardor3d.util;
import java.lang.ref.PhantomReference;
import java.lang.ref.ReferenceQueue;
+import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
-import com.google.common.collect.Lists;
import com.google.common.collect.MapMaker;
public class ContextIdReference<T> extends PhantomReference<T> {
@@ -24,7 +24,7 @@ public class ContextIdReference<T> extends PhantomReference<T> {
/**
* Keep a strong reference to these objects until their reference is cleared.
*/
- private static final List<ContextIdReference<?>> REFS = Lists.newLinkedList();
+ private static final List<ContextIdReference<?>> REFS = new LinkedList<ContextIdReference<?>>();
private final Map<Object, Integer> _idCache;
private Integer _singleContextId;
diff --git a/ardor3d-core/src/main/java/com/ardor3d/util/SimpleContextIdReference.java b/ardor3d-core/src/main/java/com/ardor3d/util/SimpleContextIdReference.java
index 74adc79..21ff6e3 100644
--- a/ardor3d-core/src/main/java/com/ardor3d/util/SimpleContextIdReference.java
+++ b/ardor3d-core/src/main/java/com/ardor3d/util/SimpleContextIdReference.java
@@ -12,16 +12,15 @@ package com.ardor3d.util;
import java.lang.ref.PhantomReference;
import java.lang.ref.ReferenceQueue;
+import java.util.LinkedList;
import java.util.List;
-import com.google.common.collect.Lists;
-
public class SimpleContextIdReference<T> extends PhantomReference<T> {
/**
* Keep a string reference to these objects until their reference is cleared.
*/
- private static final List<SimpleContextIdReference<?>> REFS = Lists.newLinkedList();
+ private static final List<SimpleContextIdReference<?>> REFS = new LinkedList<SimpleContextIdReference<?>>();
private final int _id;
private final Object _glContext;
diff --git a/ardor3d-core/src/main/java/com/ardor3d/util/TextureKey.java b/ardor3d-core/src/main/java/com/ardor3d/util/TextureKey.java
index fe0274b..b0d83ce 100644
--- a/ardor3d-core/src/main/java/com/ardor3d/util/TextureKey.java
+++ b/ardor3d-core/src/main/java/com/ardor3d/util/TextureKey.java
@@ -12,7 +12,9 @@ package com.ardor3d.util;
import java.io.IOException;
import java.lang.ref.WeakReference;
+import java.util.ArrayList;
import java.util.Iterator;
+import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger;
@@ -26,7 +28,6 @@ import com.ardor3d.util.export.InputCapsule;
import com.ardor3d.util.export.OutputCapsule;
import com.ardor3d.util.export.Savable;
import com.ardor3d.util.resource.ResourceSource;
-import com.google.common.collect.Lists;
/**
* <code>TextureKey</code> provides a way for the TextureManager to cache and retrieve <code>Texture</code> objects.
@@ -73,7 +74,7 @@ final public class TextureKey implements Savable {
protected transient int _code = Integer.MAX_VALUE;
/** cache of texturekey objects allowing us to find an existing texture key. */
- protected static final List<WeakReference<TextureKey>> _keyCache = Lists.newLinkedList();
+ protected static final List<WeakReference<TextureKey>> _keyCache = new LinkedList<WeakReference<TextureKey>>();
private static final Integer ZERO = new Integer(0);
@@ -83,7 +84,7 @@ final public class TextureKey implements Savable {
/** DO NOT USE. FOR INTERNAL USE ONLY */
protected TextureKey() {
if (Constants.useMultipleContexts) {
- _dirtyContexts = Lists.newArrayList();
+ _dirtyContexts = new ArrayList<WeakReference<Object>>();
} else {
_dirtyContexts = null;
}
diff --git a/ardor3d-core/src/main/java/com/ardor3d/util/export/binary/BinaryExporter.java b/ardor3d-core/src/main/java/com/ardor3d/util/export/binary/BinaryExporter.java
index 471e053..61090b2 100644
--- a/ardor3d-core/src/main/java/com/ardor3d/util/export/binary/BinaryExporter.java
+++ b/ardor3d-core/src/main/java/com/ardor3d/util/export/binary/BinaryExporter.java
@@ -17,6 +17,7 @@ import java.io.IOException;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.IdentityHashMap;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;
@@ -28,8 +29,6 @@ import com.ardor3d.math.MathUtils;
import com.ardor3d.util.export.Ardor3dExporter;
import com.ardor3d.util.export.ByteUtils;
import com.ardor3d.util.export.Savable;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
/**
* Exports to the ardor3d Binary Format. Format descriptor: (each numbered item denotes a series of bytes that follows
@@ -124,14 +123,14 @@ public class BinaryExporter implements Ardor3dExporter {
protected int _aliasCount = 1;
protected int _idCount = 1;
- protected final Map<Savable, BinaryIdContentPair> _contentTable = Maps.newIdentityHashMap();
+ protected final Map<Savable, BinaryIdContentPair> _contentTable = new IdentityHashMap<Savable, BinaryIdContentPair>();
- protected final Map<Integer, Integer> _locationTable = Maps.newHashMap();
+ protected final Map<Integer, Integer> _locationTable = new HashMap<Integer, Integer>();
// key - class name, value = bco
- protected final Map<String, BinaryClassObject> _classes = Maps.newHashMap();
+ protected final Map<String, BinaryClassObject> _classes = new HashMap<String, BinaryClassObject>();
- protected final List<Savable> _contentKeys = Lists.newArrayList();
+ protected final List<Savable> _contentKeys = new ArrayList<Savable>();
public BinaryExporter() {
this(DEFAULT_COMPRESSION);
diff --git a/ardor3d-core/src/main/java/com/ardor3d/util/export/binary/BinaryImporter.java b/ardor3d-core/src/main/java/com/ardor3d/util/export/binary/BinaryImporter.java
index 3c0a4d2..c9944a2 100644
--- a/ardor3d-core/src/main/java/com/ardor3d/util/export/binary/BinaryImporter.java
+++ b/ardor3d-core/src/main/java/com/ardor3d/util/export/binary/BinaryImporter.java
@@ -19,6 +19,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.HashMap;
+import java.util.IdentityHashMap;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -31,19 +32,18 @@ import com.ardor3d.util.export.Ardor3dImporter;
import com.ardor3d.util.export.ByteUtils;
import com.ardor3d.util.export.ReadListener;
import com.ardor3d.util.export.Savable;
-import com.google.common.collect.Maps;
public class BinaryImporter implements Ardor3dImporter {
private static final Logger logger = Logger.getLogger(BinaryImporter.class.getName());
// Key - alias, object - bco
- protected final Map<String, BinaryClassObject> _classes = Maps.newHashMap();
+ protected final Map<String, BinaryClassObject> _classes = new HashMap<String, BinaryClassObject>();
// Key - id, object - the savable
- protected final Map<Integer, Savable> _contentTable = Maps.newHashMap();
+ protected final Map<Integer, Savable> _contentTable = new HashMap<Integer, Savable>();
// Key - savable, object - capsule
- protected final Map<Savable, BinaryInputCapsule> _capsuleTable = Maps.newIdentityHashMap();
+ protected final Map<Savable, BinaryInputCapsule> _capsuleTable = new IdentityHashMap<Savable, BinaryInputCapsule>();
// Key - id, opject - location in the file
- protected final Map<Integer, Integer> _locationTable = Maps.newHashMap();
+ protected final Map<Integer, Integer> _locationTable = new HashMap<Integer, Integer>();
protected byte[] _dataArray = null;
protected int _aliasWidth = 0;
diff --git a/ardor3d-core/src/main/java/com/ardor3d/util/export/xml/DOMInputCapsule.java b/ardor3d-core/src/main/java/com/ardor3d/util/export/xml/DOMInputCapsule.java
index 2a92b9e..54de7e4 100644
--- a/ardor3d-core/src/main/java/com/ardor3d/util/export/xml/DOMInputCapsule.java
+++ b/ardor3d-core/src/main/java/com/ardor3d/util/export/xml/DOMInputCapsule.java
@@ -39,7 +39,6 @@ import com.ardor3d.util.TextureManager;
import com.ardor3d.util.export.InputCapsule;
import com.ardor3d.util.export.Savable;
import com.ardor3d.util.geom.BufferUtils;
-import com.google.common.collect.Lists;
/**
* Part of the ardor3d XML IO system
@@ -985,7 +984,7 @@ public class DOMInputCapsule implements InputCapsule {
final String s = tmpEl.getAttribute("size");
final int size = Integer.parseInt(s);
@SuppressWarnings("rawtypes")
- final List tmp = Lists.newArrayList();
+ final List tmp = new ArrayList();
_currentElem = findFirstChildElement(tmpEl);
for (int i = 0; i < size; i++) {
tmp.add(readSavableFromCurrentElem(null));
diff --git a/ardor3d-core/src/main/java/com/ardor3d/util/geom/GeometryTool.java b/ardor3d-core/src/main/java/com/ardor3d/util/geom/GeometryTool.java
index a9f4f3f..709318b 100644
--- a/ardor3d-core/src/main/java/com/ardor3d/util/geom/GeometryTool.java
+++ b/ardor3d-core/src/main/java/com/ardor3d/util/geom/GeometryTool.java
@@ -11,6 +11,7 @@
package com.ardor3d.util.geom;
import java.util.EnumSet;
+import java.util.HashMap;
import java.util.Map;
import java.util.logging.Logger;
@@ -21,7 +22,6 @@ import com.ardor3d.scenegraph.IndexBufferData;
import com.ardor3d.scenegraph.Mesh;
import com.ardor3d.scenegraph.Node;
import com.ardor3d.scenegraph.Spatial;
-import com.google.common.collect.Maps;
/**
* This tool assists in reducing geometry information.<br>
@@ -111,8 +111,8 @@ public class GeometryTool {
}
}
- final Map<VertKey, Integer> store = Maps.newHashMap();
- final Map<Integer, Integer> indexRemap = Maps.newHashMap();
+ final Map<VertKey, Integer> store = new HashMap<VertKey, Integer>();
+ final Map<Integer, Integer> indexRemap = new HashMap<Integer, Integer>();
int good = 0;
long group;
for (int x = 0, max = verts.length; x < max; x++) {
diff --git a/ardor3d-core/src/main/java/com/ardor3d/util/geom/MeshCombiner.java b/ardor3d-core/src/main/java/com/ardor3d/util/geom/MeshCombiner.java
index fdc3f7c..369afb6 100644
--- a/ardor3d-core/src/main/java/com/ardor3d/util/geom/MeshCombiner.java
+++ b/ardor3d-core/src/main/java/com/ardor3d/util/geom/MeshCombiner.java
@@ -12,6 +12,8 @@ package com.ardor3d.util.geom;
import java.nio.FloatBuffer;
import java.nio.IntBuffer;
+import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collection;
import java.util.EnumMap;
import java.util.List;
@@ -28,7 +30,6 @@ import com.ardor3d.scenegraph.Node;
import com.ardor3d.scenegraph.Spatial;
import com.ardor3d.scenegraph.visitor.Visitor;
import com.google.common.collect.ArrayListMultimap;
-import com.google.common.collect.Lists;
import com.google.common.collect.Multimap;
/**
@@ -62,7 +63,7 @@ public class MeshCombiner {
}
public final static Mesh combine(final Spatial source, final MeshCombineLogic logic) {
- final List<Mesh> sources = Lists.newArrayList();
+ final List<Mesh> sources = new ArrayList<Mesh>();
source.acceptVisitor(new Visitor() {
@Override
public void visit(final Spatial spatial) {
@@ -85,7 +86,7 @@ public class MeshCombiner {
* @return the combined Mesh.
*/
public final static Mesh combine(final Mesh... sources) {
- return combine(Lists.newArrayList(sources));
+ return combine(new ArrayList<Mesh>(Arrays.asList(sources)));
}
/**
@@ -128,7 +129,7 @@ public class MeshCombiner {
protected EnumMap<StateType, RenderState> states = null;
protected MeshData data = new MeshData();
protected BoundingVolume volumeType = null;
- protected List<Mesh> sources = Lists.newArrayList();
+ protected List<Mesh> sources = new ArrayList<Mesh>();
private FloatBufferData vertices;
private FloatBufferData colors;
private FloatBufferData normals;
@@ -236,7 +237,7 @@ public class MeshCombiner {
normals = useNormals ? new FloatBufferData(totalVertices * 3, 3) : null;
data.setNormalCoords(normals);
- texCoordsList = Lists.newArrayListWithCapacity(maxTextures);
+ texCoordsList = new ArrayList<FloatBufferData>(maxTextures);
for (int i = 0; i < maxTextures; i++) {
texCoordsList.add(new FloatBufferData(totalVertices * texCoords, texCoords));
}
@@ -358,8 +359,8 @@ class IndexCombiner {
}
public void saveTo(final MeshData data) {
- final List<IntBuffer> sections = Lists.newArrayList();
- final List<IndexMode> modes = Lists.newArrayList();
+ final List<IntBuffer> sections = new ArrayList<IntBuffer>();
+ final List<IndexMode> modes = new ArrayList<IndexMode>();
int max = 0;
// walk through index modes and combine those we can.
for (final IndexMode mode : sectionMap.keySet()) {
diff --git a/ardor3d-core/src/main/java/com/ardor3d/util/geom/VertGroupData.java b/ardor3d-core/src/main/java/com/ardor3d/util/geom/VertGroupData.java
index 91bc14a..429fece 100644
--- a/ardor3d-core/src/main/java/com/ardor3d/util/geom/VertGroupData.java
+++ b/ardor3d-core/src/main/java/com/ardor3d/util/geom/VertGroupData.java
@@ -11,16 +11,16 @@
package com.ardor3d.util.geom;
import java.util.EnumSet;
+import java.util.HashMap;
import java.util.Map;
import com.ardor3d.util.geom.GeometryTool.MatchCondition;
-import com.google.common.collect.Maps;
public class VertGroupData {
public static final int DEFAULT_GROUP = 0;
- private final Map<Long, EnumSet<MatchCondition>> _groupConditions = Maps.newHashMap();
+ private final Map<Long, EnumSet<MatchCondition>> _groupConditions = new HashMap<Long, EnumSet<MatchCondition>>();
private long[] _vertGroups = null;
public VertGroupData() {}
diff --git a/ardor3d-core/src/main/java/com/ardor3d/util/resource/ResourceLocatorTool.java b/ardor3d-core/src/main/java/com/ardor3d/util/resource/ResourceLocatorTool.java
index 93b6597..353c45a 100644
--- a/ardor3d-core/src/main/java/com/ardor3d/util/resource/ResourceLocatorTool.java
+++ b/ardor3d-core/src/main/java/com/ardor3d/util/resource/ResourceLocatorTool.java
@@ -18,14 +18,13 @@ import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
-import com.google.common.collect.Sets;
-
/**
* Manager class for locator utility classes used to find various assets. (XXX: Needs more documentation)
*/
@@ -163,7 +162,7 @@ public class ResourceLocatorTool {
* @return a set containing the located URLs of the named resource.
*/
public static Set<URL> getClassPathResources(final Class<?> clazz, final String name) {
- final Set<URL> results = Sets.newHashSet();
+ final Set<URL> results = new HashSet<URL>();
Enumeration<URL> urls = null;
try {
urls = Thread.currentThread().getContextClassLoader().getResources(name);
diff --git a/ardor3d-core/src/main/java/com/ardor3d/util/stat/MultiStatSample.java b/ardor3d-core/src/main/java/com/ardor3d/util/stat/MultiStatSample.java
index 1674c86..0b85ad2 100644
--- a/ardor3d-core/src/main/java/com/ardor3d/util/stat/MultiStatSample.java
+++ b/ardor3d-core/src/main/java/com/ardor3d/util/stat/MultiStatSample.java
@@ -13,10 +13,8 @@ package com.ardor3d.util.stat;
import java.util.HashMap;
import java.util.Set;
-import com.google.common.collect.Maps;
-
public class MultiStatSample {
- private final HashMap<StatType, StatValue> _values = Maps.newHashMap();
+ private final HashMap<StatType, StatValue> _values = new HashMap<StatType, StatValue>();
private double _elapsedTime = 0.0;
public static MultiStatSample createNew(final HashMap<StatType, StatValue> current) {
diff --git a/ardor3d-core/src/main/java/com/ardor3d/util/stat/StatCollector.java b/ardor3d-core/src/main/java/com/ardor3d/util/stat/StatCollector.java
index 51e3432..0c54a43 100644
--- a/ardor3d-core/src/main/java/com/ardor3d/util/stat/StatCollector.java
+++ b/ardor3d-core/src/main/java/com/ardor3d/util/stat/StatCollector.java
@@ -10,6 +10,7 @@
package com.ardor3d.util.stat;
+import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
@@ -19,7 +20,6 @@ import java.util.Stack;
import java.util.logging.Logger;
import com.ardor3d.util.Timer;
-import com.google.common.collect.Lists;
/**
* This class acts as a centralized data store for statistics. As data is added to the collector, a sum total is kept as
@@ -51,7 +51,7 @@ public abstract class StatCollector {
protected static double lastTimeCheckMS = 0;
- protected static List<StatListener> listeners = Lists.newArrayList();
+ protected static List<StatListener> listeners = new ArrayList<StatListener>();
protected static double startOffset = 0;
diff --git a/ardor3d-effects/src/main/java/com/ardor3d/extension/effect/SimpleBloomEffect.java b/ardor3d-effects/src/main/java/com/ardor3d/extension/effect/SimpleBloomEffect.java
index bca0512..c71b14f 100644
--- a/ardor3d-effects/src/main/java/com/ardor3d/extension/effect/SimpleBloomEffect.java
+++ b/ardor3d-effects/src/main/java/com/ardor3d/extension/effect/SimpleBloomEffect.java
@@ -10,6 +10,7 @@
package com.ardor3d.extension.effect;
+import java.util.ArrayList;
import java.util.List;
import com.ardor3d.extension.effect.bloom.BloomRenderPass;
@@ -25,14 +26,13 @@ import com.ardor3d.renderer.state.GLSLShaderObjectsState;
import com.ardor3d.renderer.state.RenderState.StateType;
import com.ardor3d.scenegraph.Spatial;
import com.ardor3d.util.resource.ResourceLocatorTool;
-import com.google.common.collect.Lists;
public class SimpleBloomEffect extends RenderEffect {
protected static final String RT_MAIN = "LDRBloomEffect.MAIN";
protected static final String RT_SECONDARY = "LDRBloomEffect.SECONDARY";
protected String shaderDirectory = "com/ardor3d/extension/effect/";
- protected final List<Spatial> _bloomItems = Lists.newArrayList();
+ protected final List<Spatial> _bloomItems = new ArrayList<Spatial>();
protected float _downsampleRatio = .33f;
private final GLSLShaderObjectsState _extractionShader, _blurHorizShader, _blurVertShader;
@@ -102,8 +102,8 @@ public class SimpleBloomEffect extends RenderEffect {
final int downsampledHeight = Math.round(canvas.getHeight() * _downsampleRatio);
final int downsampledWidth = Math.round(canvas.getWidth() * _downsampleRatio);
- final RenderTarget_Texture2D main = new RenderTarget_Texture2D(downsampledWidth, downsampledHeight, manager
- .getOutputFormat());
+ final RenderTarget_Texture2D main = new RenderTarget_Texture2D(downsampledWidth, downsampledHeight,
+ manager.getOutputFormat());
main.getTexture().setWrap(WrapMode.Clamp);
manager.getRenderTargetMap().put(RT_MAIN, main);
diff --git a/ardor3d-effects/src/main/java/com/ardor3d/extension/effect/water/WaterNode.java b/ardor3d-effects/src/main/java/com/ardor3d/extension/effect/water/WaterNode.java
index 3d82ca9..3605f0c 100644
--- a/ardor3d-effects/src/main/java/com/ardor3d/extension/effect/water/WaterNode.java
+++ b/ardor3d-effects/src/main/java/com/ardor3d/extension/effect/water/WaterNode.java
@@ -12,6 +12,7 @@ package com.ardor3d.extension.effect.water;
import java.io.IOException;
import java.util.ArrayList;
+import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -47,7 +48,6 @@ import com.ardor3d.scenegraph.hint.TextureCombineMode;
import com.ardor3d.scenegraph.shape.Quad;
import com.ardor3d.util.TextureManager;
import com.ardor3d.util.resource.ResourceLocatorTool;
-import com.google.common.collect.Lists;
/**
* The WaterNode handles rendering of a water effect on all of it's children. What is reflected in the water is
@@ -70,8 +70,8 @@ public class WaterNode extends Node {
protected Texture2D textureRefract;
protected Texture2D textureDepth;
- protected ArrayList<Spatial> renderList = Lists.newArrayList();
- protected ArrayList<Texture> texArray = Lists.newArrayList();
+ protected List<Spatial> renderList = new ArrayList<Spatial>();
+ protected List<Texture> texArray = new ArrayList<Texture>();
protected Node skyBox;
protected GLSLShaderObjectsState waterShader;
diff --git a/ardor3d-effects/src/main/java/com/ardor3d/extension/shadow/map/ParallelSplitShadowMapPass.java b/ardor3d-effects/src/main/java/com/ardor3d/extension/shadow/map/ParallelSplitShadowMapPass.java
index 1c983fa..7674ced 100644
--- a/ardor3d-effects/src/main/java/com/ardor3d/extension/shadow/map/ParallelSplitShadowMapPass.java
+++ b/ardor3d-effects/src/main/java/com/ardor3d/extension/shadow/map/ParallelSplitShadowMapPass.java
@@ -12,6 +12,7 @@ package com.ardor3d.extension.shadow.map;
import java.io.IOException;
import java.nio.FloatBuffer;
+import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -72,7 +73,6 @@ import com.ardor3d.scenegraph.hint.LightCombineMode;
import com.ardor3d.scenegraph.shape.Sphere;
import com.ardor3d.util.geom.BufferUtils;
import com.ardor3d.util.resource.ResourceLocatorTool;
-import com.google.common.collect.Lists;
/**
* A pass providing a parallel split shadow mapping (PSSM) layer across the top of an existing scene.
@@ -99,10 +99,10 @@ public class ParallelSplitShadowMapPass extends Pass {
private Texture2D _shadowMapTexture[];
/** The list of occluding nodes. */
- private final List<Spatial> _occluderNodes = Lists.newArrayList();
+ private final List<Spatial> _occluderNodes = new ArrayList<Spatial>();
/** Extra bounds receivers, when rendering shadows other ways than through overlay */
- private final List<Spatial> _boundsReceiver = Lists.newArrayList();
+ private final List<Spatial> _boundsReceiver = new ArrayList<Spatial>();
// Various optimizations for rendering shadow maps...
/** Culling front faces when rendering shadow maps. */
diff --git a/ardor3d-examples/src/main/java/com/ardor3d/example/ExampleRunner.java b/ardor3d-examples/src/main/java/com/ardor3d/example/ExampleRunner.java
index 5025e1c..ad65b8b 100644
--- a/ardor3d-examples/src/main/java/com/ardor3d/example/ExampleRunner.java
+++ b/ardor3d-examples/src/main/java/com/ardor3d/example/ExampleRunner.java
@@ -29,6 +29,7 @@ import java.net.URI;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLDecoder;
+import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Enumeration;
@@ -84,7 +85,6 @@ import javax.swing.tree.TreePath;
import javax.swing.tree.TreeSelectionModel;
import com.ardor3d.util.resource.ResourceLocatorTool;
-import com.google.common.collect.Lists;
/**
* starter for Ardor3D examples
@@ -449,7 +449,7 @@ public class ExampleRunner extends JFrame {
final Class<?> clazz = (Class<?>) selected;
final boolean isWindows = System.getProperty("os.name").contains("Windows");
- final List<String> args = Lists.newArrayList();
+ final List<String> args = new ArrayList<String>();
args.add(isWindows ? "javaw" : "java");
args.add("-Xmx" + maxHeapMemory + "M");
args.add("-cp");
diff --git a/ardor3d-examples/src/main/java/com/ardor3d/example/effect/ExtrusionExample.java b/ardor3d-examples/src/main/java/com/ardor3d/example/effect/ExtrusionExample.java
index deb199f..05ab024 100644
--- a/ardor3d-examples/src/main/java/com/ardor3d/example/effect/ExtrusionExample.java
+++ b/ardor3d-examples/src/main/java/com/ardor3d/example/effect/ExtrusionExample.java
@@ -10,6 +10,7 @@
package com.ardor3d.example.effect;
+import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -22,7 +23,6 @@ import com.ardor3d.scenegraph.Line;
import com.ardor3d.scenegraph.shape.Extrusion;
import com.ardor3d.spline.CatmullRomSpline;
import com.ardor3d.spline.Curve;
-import com.google.common.collect.Lists;
/**
* A demonstration of the Extrusion class - showing how a set of point can be converted into a 3d shape.
@@ -42,7 +42,7 @@ public class ExtrusionExample extends ExampleBase {
_canvas.getCanvasRenderer().getCamera().setLocation(new Vector3(0, 0, 80));
_canvas.getCanvasRenderer().getCamera().lookAt(new Vector3(), Vector3.UNIT_Y);
- final List<ReadOnlyVector3> path = Lists.newArrayList();
+ final List<ReadOnlyVector3> path = new ArrayList<ReadOnlyVector3>();
path.add(new Vector3(0, 0, 0));
path.add(new Vector3(0, 0, 4));
path.add(new Vector3(1, 0, 8));
@@ -97,7 +97,7 @@ public class ExtrusionExample extends ExampleBase {
private Line createLineStrip(final boolean loop) {
// Create a line with our example "makeLine" method. See method below.
- final ReadOnlyVector3[] vectors = { //
+ final ReadOnlyVector3[] vectors = { //
new Vector3(0, 0, 0), //
new Vector3(5, 0, 0), //
new Vector3(5, 5, 0), //
diff --git a/ardor3d-examples/src/main/java/com/ardor3d/example/pipeline/AnimationDemoExample.java b/ardor3d-examples/src/main/java/com/ardor3d/example/pipeline/AnimationDemoExample.java
index 73d7d03..0912b12 100644
--- a/ardor3d-examples/src/main/java/com/ardor3d/example/pipeline/AnimationDemoExample.java
+++ b/ardor3d-examples/src/main/java/com/ardor3d/example/pipeline/AnimationDemoExample.java
@@ -11,6 +11,9 @@
package com.ardor3d.example.pipeline;
import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.IdentityHashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Callable;
@@ -51,8 +54,6 @@ import com.ardor3d.util.geom.MeshCombiner;
import com.ardor3d.util.resource.ResourceLocatorTool;
import com.ardor3d.util.resource.ResourceSource;
import com.ardor3d.util.resource.URLResourceSource;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
/**
* Illustrates loading several animations from Collada and arranging them in an animation state machine.
@@ -66,9 +67,9 @@ public class AnimationDemoExample extends ExampleBase {
static AnimationDemoExample instance;
- private final List<AnimationManager> managers = Lists.newArrayList();
- private final List<AnimationInfo> animInfo = Lists.newArrayList();
- private final Map<SkeletonPose, SkinnedMesh> poseToMesh = Maps.newIdentityHashMap();
+ private final List<AnimationManager> managers = new ArrayList<AnimationManager>();
+ private final List<AnimationInfo> animInfo = new ArrayList<AnimationInfo>();
+ private final Map<SkeletonPose, SkinnedMesh> poseToMesh = new IdentityHashMap<SkeletonPose, SkinnedMesh>();
public static void main(final String[] args) {
ExampleBase.start(AnimationDemoExample.class);
@@ -196,7 +197,7 @@ public class AnimationDemoExample extends ExampleBase {
return skeleton;
}
- private final Map<String, AnimationClip> animationStore = Maps.newHashMap();
+ private final Map<String, AnimationClip> animationStore = new HashMap<String, AnimationClip>();
private AnimationManager createAnimationManager(final SkeletonPose pose) {
// Make our manager
diff --git a/ardor3d-examples/src/main/java/com/ardor3d/example/renderer/Texture3DExample.java b/ardor3d-examples/src/main/java/com/ardor3d/example/renderer/Texture3DExample.java
index b9d862f..8a7ce03 100644
--- a/ardor3d-examples/src/main/java/com/ardor3d/example/renderer/Texture3DExample.java
+++ b/ardor3d-examples/src/main/java/com/ardor3d/example/renderer/Texture3DExample.java
@@ -11,6 +11,7 @@
package com.ardor3d.example.renderer;
import java.nio.ByteBuffer;
+import java.util.ArrayList;
import java.util.List;
import com.ardor3d.example.ExampleBase;
@@ -31,7 +32,6 @@ import com.ardor3d.math.ColorRGBA;
import com.ardor3d.renderer.state.TextureState;
import com.ardor3d.scenegraph.shape.Sphere;
import com.ardor3d.util.TextureKey;
-import com.google.common.collect.Lists;
/**
* Very simple example showing use of a Texture3D texture.
@@ -78,7 +78,7 @@ public class Texture3DExample extends ExampleBase {
img.setHeight(32);
img.setDepth(32);
- final List<ByteBuffer> data = Lists.newArrayList();
+ final List<ByteBuffer> data = new ArrayList<ByteBuffer>();
for (int i = 0; i < 32; i++) {
final Image colorImage = GeneratedImageFactory
.createSolidColorImage(ColorRGBA.randomColor(null), false, 32);
diff --git a/ardor3d-examples/src/main/java/com/ardor3d/example/renderer/utils/atlas/AtlasExample.java b/ardor3d-examples/src/main/java/com/ardor3d/example/renderer/utils/atlas/AtlasExample.java
index 1b74add..f18ff48 100644
--- a/ardor3d-examples/src/main/java/com/ardor3d/example/renderer/utils/atlas/AtlasExample.java
+++ b/ardor3d-examples/src/main/java/com/ardor3d/example/renderer/utils/atlas/AtlasExample.java
@@ -13,6 +13,7 @@ package com.ardor3d.example.renderer.utils.atlas;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
+import java.util.ArrayList;
import java.util.List;
import javax.imageio.ImageIO;
@@ -48,7 +49,6 @@ import com.ardor3d.ui.text.BasicText;
import com.ardor3d.util.ReadOnlyTimer;
import com.ardor3d.util.TextureManager;
import com.ardor3d.util.geom.MeshCombiner;
-import com.google.common.collect.Lists;
/**
* Example showing how to use the TexturePacker to create a texture atlas. Also shows the benefits of using it together
@@ -158,7 +158,7 @@ public class AtlasExample extends ExampleBase {
private void packIntoAtlas(final Spatial spatial) {
// Gather up all meshes to do the atlas operation on
- final List<Mesh> meshes = Lists.newArrayList();
+ final List<Mesh> meshes = new ArrayList<Mesh>();
final Visitor visitor = new Visitor() {
@Override
public void visit(final Spatial spatial) {
diff --git a/ardor3d-examples/src/main/java/com/ardor3d/example/renderer/utils/atlas/AtlasExampleMultiTextured.java b/ardor3d-examples/src/main/java/com/ardor3d/example/renderer/utils/atlas/AtlasExampleMultiTextured.java
index 356238a..1132d9d 100644
--- a/ardor3d-examples/src/main/java/com/ardor3d/example/renderer/utils/atlas/AtlasExampleMultiTextured.java
+++ b/ardor3d-examples/src/main/java/com/ardor3d/example/renderer/utils/atlas/AtlasExampleMultiTextured.java
@@ -13,6 +13,7 @@ package com.ardor3d.example.renderer.utils.atlas;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
+import java.util.ArrayList;
import java.util.List;
import javax.imageio.ImageIO;
@@ -49,7 +50,6 @@ import com.ardor3d.ui.text.BasicText;
import com.ardor3d.util.ReadOnlyTimer;
import com.ardor3d.util.TextureManager;
import com.ardor3d.util.geom.MeshCombiner;
-import com.google.common.collect.Lists;
/**
* Example showing how to use the TexturePacker to create a texture atlas. Also shows the benefits of using it together
@@ -159,7 +159,7 @@ public class AtlasExampleMultiTextured extends ExampleBase {
private void packIntoAtlas(final Spatial spatial) {
// Gather up all meshes to do the atlas operation on
- final List<Mesh> meshes = Lists.newArrayList();
+ final List<Mesh> meshes = new ArrayList<Mesh>();
final Visitor visitor = new Visitor() {
@Override
public void visit(final Spatial spatial) {
diff --git a/ardor3d-extras/src/main/java/com/ardor3d/extension/atlas/TexturePacker.java b/ardor3d-extras/src/main/java/com/ardor3d/extension/atlas/TexturePacker.java
index 0e6771c..4bf47b5 100644
--- a/ardor3d-extras/src/main/java/com/ardor3d/extension/atlas/TexturePacker.java
+++ b/ardor3d-extras/src/main/java/com/ardor3d/extension/atlas/TexturePacker.java
@@ -12,6 +12,8 @@ package com.ardor3d.extension.atlas;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer;
+import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.logging.Logger;
@@ -31,8 +33,6 @@ import com.ardor3d.renderer.state.TextureState;
import com.ardor3d.scenegraph.Mesh;
import com.ardor3d.util.TextureManager;
import com.ardor3d.util.geom.BufferUtils;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
/**
* A tool that uses the AtlasNode/AtlasPacker algorithm to pack textures into texture atlases. It modifies the uv
@@ -69,15 +69,15 @@ public class TexturePacker {
private final List<AtlasPacker> packers;
private final List<ByteBuffer> dataBuffers;
- private final List<Texture> textures = Lists.newArrayList();
+ private final List<Texture> textures = new ArrayList<Texture>();
public TexturePacker(final int atlasWidth, final int atlasHeight) {
this.atlasWidth = atlasWidth;
this.atlasHeight = atlasHeight;
- cachedAtlases = Maps.newHashMap();
- packers = Lists.newArrayList();
- dataBuffers = Lists.newArrayList();
+ cachedAtlases = new HashMap<TextureParameter, List<TextureParameter>>();
+ packers = new ArrayList<AtlasPacker>();
+ dataBuffers = new ArrayList<ByteBuffer>();
addPacker();
}
@@ -168,7 +168,7 @@ public class TexturePacker {
return;
}
- list = Lists.newArrayList();
+ list = new ArrayList<TextureParameter>();
cachedAtlases.put(parameterObject, list);
list.add(parameterObject);
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 bfb1f63..23931c9 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
@@ -10,6 +10,7 @@
package com.ardor3d.extension.interact;
+import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -28,14 +29,13 @@ import com.ardor3d.renderer.Renderer;
import com.ardor3d.scenegraph.Spatial;
import com.ardor3d.util.ReadOnlyTimer;
import com.google.common.base.Predicate;
-import com.google.common.collect.Lists;
public class InteractManager {
/**
* List of widgets currently managed by this manager.
*/
- protected final List<AbstractInteractWidget> _widgets = Lists.newArrayList();
+ protected final List<AbstractInteractWidget> _widgets = new ArrayList<AbstractInteractWidget>();
/**
* The logical layer used by this manager to receive input events prior to forwarding them to the scene.
@@ -66,7 +66,7 @@ public class InteractManager {
/**
* List of filters to modify state prior to applying to a Spatial target.
*/
- protected List<UpdateFilter> _filters = Lists.newArrayList();
+ protected List<UpdateFilter> _filters = new ArrayList<UpdateFilter>();
public InteractManager() {
setupLogicalLayer();
diff --git a/ardor3d-extras/src/main/java/com/ardor3d/extension/interact/widget/AbstractInteractWidget.java b/ardor3d-extras/src/main/java/com/ardor3d/extension/interact/widget/AbstractInteractWidget.java
index af00b28..0e97fac 100644
--- a/ardor3d-extras/src/main/java/com/ardor3d/extension/interact/widget/AbstractInteractWidget.java
+++ b/ardor3d-extras/src/main/java/com/ardor3d/extension/interact/widget/AbstractInteractWidget.java
@@ -10,6 +10,7 @@
package com.ardor3d.extension.interact.widget;
+import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -27,7 +28,6 @@ import com.ardor3d.renderer.Camera;
import com.ardor3d.renderer.Renderer;
import com.ardor3d.scenegraph.Node;
import com.ardor3d.util.ReadOnlyTimer;
-import com.google.common.collect.Lists;
public abstract class AbstractInteractWidget {
@@ -51,7 +51,7 @@ public abstract class AbstractInteractWidget {
/**
* List of filters to modify state after applying input.
*/
- protected List<UpdateFilter> _filters = Lists.newArrayList();
+ protected List<UpdateFilter> _filters = new ArrayList<UpdateFilter>();
public AbstractInteractWidget() {
_results.setCheckDistance(true);
diff --git a/ardor3d-extras/src/main/java/com/ardor3d/extension/interact/widget/CompoundInteractWidget.java b/ardor3d-extras/src/main/java/com/ardor3d/extension/interact/widget/CompoundInteractWidget.java
index ea41735..00d64ac 100644
--- a/ardor3d-extras/src/main/java/com/ardor3d/extension/interact/widget/CompoundInteractWidget.java
+++ b/ardor3d-extras/src/main/java/com/ardor3d/extension/interact/widget/CompoundInteractWidget.java
@@ -10,6 +10,7 @@
package com.ardor3d.extension.interact.widget;
+import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -28,7 +29,6 @@ import com.ardor3d.renderer.Renderer;
import com.ardor3d.scenegraph.Node;
import com.ardor3d.scenegraph.Spatial;
import com.ardor3d.util.ReadOnlyTimer;
-import com.google.common.collect.Maps;
public class CompoundInteractWidget extends AbstractInteractWidget {
private static final String MOVE_KEY = "Move";
@@ -38,7 +38,7 @@ public class CompoundInteractWidget extends AbstractInteractWidget {
public static double MIN_SCALE = 0.000001;
- protected Map<String, AbstractInteractWidget> _widgets = Maps.newHashMap();
+ protected Map<String, AbstractInteractWidget> _widgets = new HashMap<String, AbstractInteractWidget>();
protected AbstractInteractWidget _lastInputWidget = null;
@@ -50,7 +50,7 @@ public class CompoundInteractWidget extends AbstractInteractWidget {
@Override
public void addFilter(final UpdateFilter filter) {
- for(final AbstractInteractWidget widget : _widgets.values()) {
+ for (final AbstractInteractWidget widget : _widgets.values()) {
widget.addFilter(filter);
}
super.addFilter(filter);
@@ -58,7 +58,7 @@ public class CompoundInteractWidget extends AbstractInteractWidget {
@Override
public void removeFilter(final UpdateFilter filter) {
- for(final AbstractInteractWidget widget : _widgets.values()) {
+ for (final AbstractInteractWidget widget : _widgets.values()) {
widget.removeFilter(filter);
}
super.removeFilter(filter);
@@ -66,7 +66,7 @@ public class CompoundInteractWidget extends AbstractInteractWidget {
@Override
public void clearFilters() {
- for(final AbstractInteractWidget widget : _widgets.values()) {
+ for (final AbstractInteractWidget widget : _widgets.values()) {
widget.clearFilters();
}
super.clearFilters();
diff --git a/ardor3d-extras/src/main/java/com/ardor3d/extension/model/md2/Md2DataStore.java b/ardor3d-extras/src/main/java/com/ardor3d/extension/model/md2/Md2DataStore.java
index a2c12b1..2a4be59 100644
--- a/ardor3d-extras/src/main/java/com/ardor3d/extension/model/md2/Md2DataStore.java
+++ b/ardor3d-extras/src/main/java/com/ardor3d/extension/model/md2/Md2DataStore.java
@@ -10,20 +10,20 @@
package com.ardor3d.extension.model.md2;
+import java.util.ArrayList;
import java.util.List;
import com.ardor3d.extension.model.util.KeyframeController;
import com.ardor3d.scenegraph.Mesh;
-import com.google.common.collect.Lists;
public class Md2DataStore {
private final Mesh _mainMesh;
private final KeyframeController<Mesh> _controller;
- private final List<String> _frameNames = Lists.newArrayList();
+ private final List<String> _frameNames = new ArrayList<String>();
- private final List<String> _skinNames = Lists.newArrayList();
+ private final List<String> _skinNames = new ArrayList<String>();
public Md2DataStore(final Mesh mainMesh, final KeyframeController<Mesh> controller) {
_mainMesh = mainMesh;
diff --git a/ardor3d-extras/src/main/java/com/ardor3d/extension/model/md2/Md2Importer.java b/ardor3d-extras/src/main/java/com/ardor3d/extension/model/md2/Md2Importer.java
index 23b14f1..6f0e762 100644
--- a/ardor3d-extras/src/main/java/com/ardor3d/extension/model/md2/Md2Importer.java
+++ b/ardor3d-extras/src/main/java/com/ardor3d/extension/model/md2/Md2Importer.java
@@ -11,6 +11,7 @@
package com.ardor3d.extension.model.md2;
import java.io.InputStream;
+import java.util.ArrayList;
import java.util.List;
import com.ardor3d.bounding.BoundingBox;
@@ -30,7 +31,6 @@ import com.ardor3d.util.TextureManager;
import com.ardor3d.util.resource.ResourceLocator;
import com.ardor3d.util.resource.ResourceLocatorTool;
import com.ardor3d.util.resource.ResourceSource;
-import com.google.common.collect.Lists;
public class Md2Importer {
@@ -159,8 +159,8 @@ public class Md2Importer {
bis.seek(header.offsetGlCommands);
int length, absLength;
Md2GlCommand cmd;
- final List<Integer> fanIndices = Lists.newArrayList();
- final List<Integer> stripIndices = Lists.newArrayList();
+ final List<Integer> fanIndices = new ArrayList<Integer>();
+ final List<Integer> stripIndices = new ArrayList<Integer>();
for (int i = 0; i < header.numGlCommands; i++) {
length = bis.readInt();
if (length == 0) {
diff --git a/ardor3d-extras/src/main/java/com/ardor3d/extension/model/md3/Md3DataStore.java b/ardor3d-extras/src/main/java/com/ardor3d/extension/model/md3/Md3DataStore.java
index 3e1f985..3ca598a 100644
--- a/ardor3d-extras/src/main/java/com/ardor3d/extension/model/md3/Md3DataStore.java
+++ b/ardor3d-extras/src/main/java/com/ardor3d/extension/model/md3/Md3DataStore.java
@@ -10,18 +10,18 @@
package com.ardor3d.extension.model.md3;
+import java.util.ArrayList;
import java.util.List;
import com.ardor3d.scenegraph.Node;
-import com.google.common.collect.Lists;
public class Md3DataStore {
private final Node _mainNode;
- private final List<String> _frameNames = Lists.newArrayList();
+ private final List<String> _frameNames = new ArrayList<String>();
- private final List<String> _skinNames = Lists.newArrayList();
+ private final List<String> _skinNames = new ArrayList<String>();
public Md3DataStore(final Node mainNode) {
super();
diff --git a/ardor3d-extras/src/main/java/com/ardor3d/extension/model/obj/ObjDataStore.java b/ardor3d-extras/src/main/java/com/ardor3d/extension/model/obj/ObjDataStore.java
index 0c9fa91..bad7afe 100644
--- a/ardor3d-extras/src/main/java/com/ardor3d/extension/model/obj/ObjDataStore.java
+++ b/ardor3d-extras/src/main/java/com/ardor3d/extension/model/obj/ObjDataStore.java
@@ -10,16 +10,16 @@
package com.ardor3d.extension.model.obj;
+import java.util.ArrayList;
import java.util.List;
import com.ardor3d.math.Vector3;
-import com.google.common.collect.Lists;
public class ObjDataStore {
- private final List<Vector3> _vertices = Lists.newArrayList();
- private final List<Vector3> _normals = Lists.newArrayList();
- private final List<Vector3> _generatedNormals = Lists.newArrayList();
- private final List<Vector3> _uvs = Lists.newArrayList();
+ private final List<Vector3> _vertices = new ArrayList<Vector3>();
+ private final List<Vector3> _normals = new ArrayList<Vector3>();
+ private final List<Vector3> _generatedNormals = new ArrayList<Vector3>();
+ private final List<Vector3> _uvs = new ArrayList<Vector3>();
public List<Vector3> getVertices() {
return _vertices;
diff --git a/ardor3d-extras/src/main/java/com/ardor3d/extension/model/obj/ObjGeometryStore.java b/ardor3d-extras/src/main/java/com/ardor3d/extension/model/obj/ObjGeometryStore.java
index cac72f6..42b1f98 100644
--- a/ardor3d-extras/src/main/java/com/ardor3d/extension/model/obj/ObjGeometryStore.java
+++ b/ardor3d-extras/src/main/java/com/ardor3d/extension/model/obj/ObjGeometryStore.java
@@ -12,7 +12,9 @@ package com.ardor3d.extension.model.obj;
import java.nio.Buffer;
import java.nio.FloatBuffer;
+import java.util.ArrayList;
import java.util.EnumSet;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -33,8 +35,6 @@ import com.ardor3d.util.geom.BufferUtils;
import com.ardor3d.util.geom.GeometryTool;
import com.ardor3d.util.geom.GeometryTool.MatchCondition;
import com.ardor3d.util.geom.VertGroupData;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
public class ObjGeometryStore {
private static final String DEFAULT_GROUP = "_default_";
@@ -45,7 +45,7 @@ public class ObjGeometryStore {
private int _totalLines = 0;
private int _totalMeshes = 0;
private final Node _root = new Node();
- private final Map<String, Spatial> _groupMap = Maps.newHashMap();
+ private final Map<String, Spatial> _groupMap = new HashMap<String, Spatial>();
private ObjMaterial _currentMaterial = new ObjMaterial("default");
private String _currentObjectName;
@@ -55,8 +55,8 @@ public class ObjGeometryStore {
private ObjSetManager _lineManager;
private ObjSetManager _pointManager;
- private final Map<String, ObjMaterial> materialLibrary = Maps.newHashMap();
- private final Map<Spatial, String> _materialMap = Maps.newHashMap();
+ private final Map<String, ObjMaterial> materialLibrary = new HashMap<String, ObjMaterial>();
+ private final Map<Spatial, String> _materialMap = new HashMap<Spatial, String>();
private final GeometryTool _geometryTool;
@@ -274,7 +274,7 @@ public class ObjGeometryStore {
int j = 0;
final long[] vertGroups = new long[_meshManager.getStore().size()];
- final List<Long> groups = Lists.newArrayList();
+ final List<Long> groups = new ArrayList<Long>();
Vector3 vector;
for (final ObjIndexSet set : _meshManager.getStore().keySet()) {
vertGroups[j] = set.getSmoothGroup();
diff --git a/ardor3d-extras/src/main/java/com/ardor3d/extension/model/obj/ObjImporter.java b/ardor3d-extras/src/main/java/com/ardor3d/extension/model/obj/ObjImporter.java
index c42564a..8e0107f 100644
--- a/ardor3d-extras/src/main/java/com/ardor3d/extension/model/obj/ObjImporter.java
+++ b/ardor3d-extras/src/main/java/com/ardor3d/extension/model/obj/ObjImporter.java
@@ -12,6 +12,7 @@ package com.ardor3d.extension.model.obj;
import java.io.BufferedReader;
import java.io.InputStreamReader;
+import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.logging.Logger;
@@ -25,7 +26,6 @@ import com.ardor3d.util.geom.GeometryTool;
import com.ardor3d.util.resource.ResourceLocator;
import com.ardor3d.util.resource.ResourceLocatorTool;
import com.ardor3d.util.resource.ResourceSource;
-import com.google.common.collect.Lists;
/**
* Wavefront OBJ importer. See <a href="http://local.wasp.uwa.edu.au/~pbourke/dataformats/obj/">the format spec</a>
@@ -332,7 +332,7 @@ public class ObjImporter {
}
// Each token corresponds to 1 vertex entry
- final List<ObjIndexSet> indices = Lists.newArrayList();
+ final List<ObjIndexSet> indices = new ArrayList<ObjIndexSet>();
for (int i = 1; i < tokens.length; i++) {
indices.add(new ObjIndexSet(tokens[i], store.getDataStore(), currentSmoothGroup));
}
@@ -347,7 +347,7 @@ public class ObjImporter {
}
// Each token corresponds to 1 vertex entry and possibly one texture entry
- final List<ObjIndexSet> indices = Lists.newArrayList();
+ final List<ObjIndexSet> indices = new ArrayList<ObjIndexSet>();
for (int i = 1; i < tokens.length; i++) {
indices.add(new ObjIndexSet(tokens[i], store.getDataStore(), currentSmoothGroup));
}
@@ -362,7 +362,7 @@ public class ObjImporter {
}
// Each token corresponds to 1 vertex entry and possibly one texture entry and normal entry.
- final List<ObjIndexSet> indices = Lists.newArrayList();
+ final List<ObjIndexSet> indices = new ArrayList<ObjIndexSet>();
for (int i = 1; i < tokens.length; i++) {
indices.add(new ObjIndexSet(tokens[i], store.getDataStore(), currentSmoothGroup));
}
diff --git a/ardor3d-extras/src/main/java/com/ardor3d/extension/model/obj/ObjSetManager.java b/ardor3d-extras/src/main/java/com/ardor3d/extension/model/obj/ObjSetManager.java
index 116371d..e070e0b 100644
--- a/ardor3d-extras/src/main/java/com/ardor3d/extension/model/obj/ObjSetManager.java
+++ b/ardor3d-extras/src/main/java/com/ardor3d/extension/model/obj/ObjSetManager.java
@@ -10,16 +10,15 @@
package com.ardor3d.extension.model.obj;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-
public class ObjSetManager {
- private final Map<ObjIndexSet, Integer> _store = Maps.newLinkedHashMap();
- private final List<Integer> _indices = Lists.newArrayList();
- private final List<Integer> _lengths = Lists.newArrayList();
+ private final Map<ObjIndexSet, Integer> _store = new LinkedHashMap<ObjIndexSet, Integer>();
+ private final List<Integer> _indices = new ArrayList<Integer>();
+ private final List<Integer> _lengths = new ArrayList<Integer>();
public int findSet(final ObjIndexSet set) {
if (_store.containsKey(set)) {
diff --git a/ardor3d-extras/src/main/java/com/ardor3d/extension/model/util/nvtristrip/NvStripInfo.java b/ardor3d-extras/src/main/java/com/ardor3d/extension/model/util/nvtristrip/NvStripInfo.java
index 2cf0e18..dd341ca 100644
--- a/ardor3d-extras/src/main/java/com/ardor3d/extension/model/util/nvtristrip/NvStripInfo.java
+++ b/ardor3d-extras/src/main/java/com/ardor3d/extension/model/util/nvtristrip/NvStripInfo.java
@@ -10,13 +10,12 @@
package com.ardor3d.extension.model.util.nvtristrip;
+import java.util.ArrayList;
import java.util.List;
-import com.google.common.collect.Lists;
-
final class NvStripInfo {
NvStripStartInfo _startInfo;
- List<NvFaceInfo> _faces = Lists.newArrayList();
+ List<NvFaceInfo> _faces = new ArrayList<NvFaceInfo>();
int _stripId;
int _experimentId;
@@ -177,11 +176,11 @@ final class NvStripInfo {
*/
void build(final List<NvEdgeInfo> edgeInfos, final List<NvFaceInfo> faceInfos) {
// used in building the strips forward and backward
- final List<Integer> scratchIndices = Lists.newArrayList();
+ final List<Integer> scratchIndices = new ArrayList<Integer>();
// build forward... start with the initial face
- final List<NvFaceInfo> forwardFaces = Lists.newArrayList();
- final List<NvFaceInfo> backwardFaces = Lists.newArrayList();
+ final List<NvFaceInfo> forwardFaces = new ArrayList<NvFaceInfo>();
+ final List<NvFaceInfo> backwardFaces = new ArrayList<NvFaceInfo>();
forwardFaces.add(_startInfo._startFace);
markTriangle(_startInfo._startFace);
@@ -251,7 +250,7 @@ final class NvStripInfo {
// tempAllFaces is going to be forwardFaces + backwardFaces
// it's used for Unique()
- final List<NvFaceInfo> tempAllFaces = Lists.newArrayList();
+ final List<NvFaceInfo> tempAllFaces = new ArrayList<NvFaceInfo>();
for (int i = 0; i < forwardFaces.size(); i++) {
tempAllFaces.add(forwardFaces.get(i));
}
diff --git a/ardor3d-extras/src/main/java/com/ardor3d/extension/model/util/nvtristrip/NvStripifier.java b/ardor3d-extras/src/main/java/com/ardor3d/extension/model/util/nvtristrip/NvStripifier.java
index 8779e5e..a872493 100644
--- a/ardor3d-extras/src/main/java/com/ardor3d/extension/model/util/nvtristrip/NvStripifier.java
+++ b/ardor3d-extras/src/main/java/com/ardor3d/extension/model/util/nvtristrip/NvStripifier.java
@@ -10,13 +10,12 @@
package com.ardor3d.extension.model.util.nvtristrip;
+import java.util.ArrayList;
+import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.logging.Logger;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Sets;
-
/**
* Ported from <a href="http://developer.nvidia.com/object/nvtristrip_library.html">NVIDIA's NvTriStrip Library</a>
*/
@@ -25,7 +24,7 @@ final class NvStripifier {
public static int CACHE_INEFFICIENCY = 6;
- protected List<Integer> _indices = Lists.newArrayList();
+ protected List<Integer> _indices = new ArrayList<Integer>();
protected int _cacheSize;
protected int _minStripLength;
protected float _meshJump;
@@ -59,12 +58,12 @@ final class NvStripifier {
_indices = in_indices;
// build the stripification info
- final List<NvFaceInfo> allFaceInfos = Lists.newArrayList();
- final List<NvEdgeInfo> allEdgeInfos = Lists.newArrayList();
+ final List<NvFaceInfo> allFaceInfos = new ArrayList<NvFaceInfo>();
+ final List<NvEdgeInfo> allEdgeInfos = new ArrayList<NvEdgeInfo>();
buildStripifyInfo(allFaceInfos, allEdgeInfos, maxIndex);
- final List<NvStripInfo> allStrips = Lists.newArrayList();
+ final List<NvStripInfo> allStrips = new ArrayList<NvStripInfo>();
// stripify
findAllStrips(allStrips, allFaceInfos, allEdgeInfos, numSamples);
@@ -519,11 +518,11 @@ final class NvStripifier {
//
final List<NvStripInfo>[] experiments = new List[numSamples * 6];
for (int i = 0; i < experiments.length; i++) {
- experiments[i] = Lists.newArrayList();
+ experiments[i] = new ArrayList<NvStripInfo>();
}
int experimentIndex = 0;
- final Set<NvFaceInfo> resetPoints = Sets.newHashSet();
+ final Set<NvFaceInfo> resetPoints = new HashSet<NvFaceInfo>();
for (int i = 0; i < numSamples; i++) {
// Try to find another good reset point.
@@ -650,7 +649,7 @@ final class NvStripifier {
void splitUpStripsAndOptimize(final List<NvStripInfo> allStrips, final List<NvStripInfo> outStrips,
final List<NvEdgeInfo> edgeInfos, final List<NvFaceInfo> outFaceList) {
final int threshold = _cacheSize;
- final List<NvStripInfo> tempStrips = Lists.newArrayList();
+ final List<NvStripInfo> tempStrips = new ArrayList<NvStripInfo>();
// split up strips into threshold-sized pieces
for (int i = 0; i < allStrips.size(); i++) {
@@ -747,7 +746,7 @@ final class NvStripifier {
}
// add small strips to face list
- final List<NvStripInfo> tempStrips2 = Lists.newArrayList();
+ final List<NvStripInfo> tempStrips2 = new ArrayList<NvStripInfo>();
removeSmallStrips(tempStrips, tempStrips2, outFaceList);
outStrips.clear();
@@ -868,7 +867,7 @@ final class NvStripifier {
final List<NvFaceInfo> faceList) {
faceList.clear();
allBigStrips.clear(); // make sure these are empty
- final List<NvFaceInfo> tempFaceList = Lists.newArrayList();
+ final List<NvFaceInfo> tempFaceList = new ArrayList<NvFaceInfo>();
for (int i = 0; i < allStrips.size(); i++) {
final NvStripInfo allStripI = allStrips.get(i);
diff --git a/ardor3d-extras/src/main/java/com/ardor3d/extension/model/util/nvtristrip/NvTriangleStripper.java b/ardor3d-extras/src/main/java/com/ardor3d/extension/model/util/nvtristrip/NvTriangleStripper.java
index c12d86d..2ae9059 100644
--- a/ardor3d-extras/src/main/java/com/ardor3d/extension/model/util/nvtristrip/NvTriangleStripper.java
+++ b/ardor3d-extras/src/main/java/com/ardor3d/extension/model/util/nvtristrip/NvTriangleStripper.java
@@ -10,6 +10,7 @@
package com.ardor3d.extension.model.util.nvtristrip;
+import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
@@ -22,7 +23,6 @@ import com.ardor3d.scenegraph.MeshData;
import com.ardor3d.scenegraph.Spatial;
import com.ardor3d.scenegraph.visitor.Visitor;
import com.ardor3d.util.geom.BufferUtils;
-import com.google.common.collect.Lists;
/**
* Ported from <a href="http://developer.nvidia.com/object/nvtristrip_library.html">NVIDIA's NvTriStrip Library</a>
@@ -241,7 +241,7 @@ public class NvTriangleStripper implements Visitor {
PrimitiveGroup[] primGroups;
// put data in format that the stripifier likes
- final List<Integer> tempIndices = Lists.newArrayList();
+ final List<Integer> tempIndices = new ArrayList<Integer>();
int maxIndex = 0;
for (int i = 0; i < in_indices.length; i++) {
tempIndices.add(in_indices[i]);
@@ -249,8 +249,8 @@ public class NvTriangleStripper implements Visitor {
maxIndex = in_indices[i];
}
}
- final List<NvStripInfo> tempStrips = Lists.newArrayList();
- final List<NvFaceInfo> tempFaces = Lists.newArrayList();
+ final List<NvStripInfo> tempStrips = new ArrayList<NvStripInfo>();
+ final List<NvFaceInfo> tempFaces = new ArrayList<NvFaceInfo>();
final NvStripifier stripifier = new NvStripifier();
@@ -258,7 +258,7 @@ public class NvTriangleStripper implements Visitor {
stripifier.stripify(tempIndices, _cacheSize, _minStripSize, maxIndex, tempStrips, tempFaces);
// stitch strips together
- final List<Integer> stripIndices = Lists.newArrayList();
+ final List<Integer> stripIndices = new ArrayList<Integer>();
int numSeparateStrips = 0;
if (_listsOnly) {
@@ -374,7 +374,7 @@ public class NvTriangleStripper implements Visitor {
final List<NvFaceInfo> in_bins[] = new List[NUMBINS];
for (int i = 0; i < NUMBINS; i++) {
- in_bins[i] = Lists.newArrayList();
+ in_bins[i] = new ArrayList<NvFaceInfo>();
}
// hash input indices on first index
diff --git a/ardor3d-jogl/src/main/java/com/ardor3d/image/util/jogl/JoglImageUtil.java b/ardor3d-jogl/src/main/java/com/ardor3d/image/util/jogl/JoglImageUtil.java
index 0e9a2de..6cb21a7 100644
--- a/ardor3d-jogl/src/main/java/com/ardor3d/image/util/jogl/JoglImageUtil.java
+++ b/ardor3d-jogl/src/main/java/com/ardor3d/image/util/jogl/JoglImageUtil.java
@@ -11,6 +11,7 @@
package com.ardor3d.image.util.jogl;
import java.nio.ByteBuffer;
+import java.util.ArrayList;
import java.util.List;
import javax.media.nativewindow.util.PixelFormat;
@@ -18,7 +19,6 @@ import javax.media.nativewindow.util.PixelFormat;
import com.ardor3d.framework.jogl.CapsUtil;
import com.ardor3d.image.Image;
import com.ardor3d.scene.state.jogl.util.JoglTextureUtil;
-import com.google.common.collect.Lists;
import com.jogamp.common.nio.Buffers;
import com.jogamp.opengl.util.GLPixelBuffer.GLPixelAttributes;
import com.jogamp.opengl.util.texture.TextureData;
@@ -57,7 +57,7 @@ public class JoglImageUtil {
final int width = input.getWidth(), height = input.getHeight();
// create our return list
- final List<TextureData> rVal = Lists.newArrayList();
+ final List<TextureData> rVal = new ArrayList<TextureData>();
// go through each layer
for (int i = 0; i < size; i++) {
diff --git a/ardor3d-jogl/src/main/java/com/ardor3d/input/jinput/JInputControllerWrapper.java b/ardor3d-jogl/src/main/java/com/ardor3d/input/jinput/JInputControllerWrapper.java
index 45e062a..52ab50a 100644
--- a/ardor3d-jogl/src/main/java/com/ardor3d/input/jinput/JInputControllerWrapper.java
+++ b/ardor3d-jogl/src/main/java/com/ardor3d/input/jinput/JInputControllerWrapper.java
@@ -26,7 +26,6 @@ import com.ardor3d.input.ControllerInfo;
import com.ardor3d.input.ControllerState;
import com.ardor3d.input.ControllerWrapper;
import com.google.common.collect.AbstractIterator;
-import com.google.common.collect.Lists;
import com.google.common.collect.PeekingIterator;
public class JInputControllerWrapper implements ControllerWrapper {
@@ -34,7 +33,7 @@ public class JInputControllerWrapper implements ControllerWrapper {
protected final Event _event = new Event();
protected final List<ControllerEvent> _events = Collections.synchronizedList(new ArrayList<ControllerEvent>());
protected JInputControllerEventIterator _eventsIt = new JInputControllerEventIterator();
- protected final List<ControllerInfo> _controllers = Lists.newArrayList();
+ protected final List<ControllerInfo> _controllers = new ArrayList<ControllerInfo>();
protected static boolean _inited = false;
@Override
@@ -92,8 +91,8 @@ public class JInputControllerWrapper implements ControllerWrapper {
}
protected ControllerInfo getControllerInfo(final Controller controller) {
- final List<String> axisNames = Lists.newArrayList();
- final List<String> buttonNames = Lists.newArrayList();
+ final List<String> axisNames = new ArrayList<String>();
+ final List<String> buttonNames = new ArrayList<String>();
for (final Component comp : controller.getComponents()) {
if (comp.getIdentifier() instanceof Identifier.Axis) {
diff --git a/ardor3d-jogl/src/main/java/com/ardor3d/input/jogl/JoglNewtMouseWrapper.java b/ardor3d-jogl/src/main/java/com/ardor3d/input/jogl/JoglNewtMouseWrapper.java
index a82bb1a..5f64b46 100644
--- a/ardor3d-jogl/src/main/java/com/ardor3d/input/jogl/JoglNewtMouseWrapper.java
+++ b/ardor3d-jogl/src/main/java/com/ardor3d/input/jogl/JoglNewtMouseWrapper.java
@@ -26,8 +26,6 @@ import com.ardor3d.input.MouseState;
import com.ardor3d.input.MouseWrapper;
import com.google.common.collect.AbstractIterator;
import com.google.common.collect.EnumMultiset;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
import com.google.common.collect.Multiset;
import com.google.common.collect.PeekingIterator;
import com.jogamp.newt.event.MouseEvent;
@@ -38,7 +36,7 @@ import com.jogamp.newt.opengl.GLWindow;
public class JoglNewtMouseWrapper implements MouseWrapper, MouseListener {
@GuardedBy("this")
- protected final LinkedList<MouseState> _upcomingEvents = Lists.newLinkedList();
+ protected final LinkedList<MouseState> _upcomingEvents = new LinkedList<MouseState>();
@GuardedBy("this")
protected JoglNewtMouseIterator _currentIterator = null;
@@ -55,7 +53,7 @@ public class JoglNewtMouseWrapper implements MouseWrapper, MouseListener {
protected boolean _skipAutoRepeatEvents = false;
protected final Multiset<MouseButton> _clicks = EnumMultiset.create(MouseButton.class);
- protected final EnumMap<MouseButton, Long> _lastClickTime = Maps.newEnumMap(MouseButton.class);
+ protected final EnumMap<MouseButton, Long> _lastClickTime = new EnumMap<MouseButton, Long>(MouseButton.class);
protected final EnumSet<MouseButton> _clickArmed = EnumSet.noneOf(MouseButton.class);
protected int _ignoreX = Integer.MAX_VALUE;
diff --git a/ardor3d-swt/src/main/java/com/ardor3d/image/util/SWTImageUtil.java b/ardor3d-swt/src/main/java/com/ardor3d/image/util/SWTImageUtil.java
index cb6348e..7ac9068 100644
--- a/ardor3d-swt/src/main/java/com/ardor3d/image/util/SWTImageUtil.java
+++ b/ardor3d-swt/src/main/java/com/ardor3d/image/util/SWTImageUtil.java
@@ -11,6 +11,7 @@
package com.ardor3d.image.util;
import java.nio.ByteBuffer;
+import java.util.ArrayList;
import java.util.List;
import org.eclipse.swt.graphics.Color;
@@ -19,7 +20,6 @@ import org.eclipse.swt.graphics.PaletteData;
import com.ardor3d.image.Image;
import com.ardor3d.image.PixelDataType;
-import com.google.common.collect.Lists;
/**
* Utility methods for converting Ardor3D Images to SWT ImageData.
@@ -65,7 +65,7 @@ public abstract class SWTImageUtil {
final int width = input.getWidth(), height = input.getHeight();
// create our return list
- final List<ImageData> rVal = Lists.newArrayList();
+ final List<ImageData> rVal = new ArrayList<ImageData>();
// Calculate our modulation or "tint" values per channel
final double tRed = tint != null ? tint.getRed() / 255. : 1.0;
diff --git a/ardor3d-swt/src/main/java/com/ardor3d/input/swt/SwtMouseWrapper.java b/ardor3d-swt/src/main/java/com/ardor3d/input/swt/SwtMouseWrapper.java
index 4067060..3b735eb 100644
--- a/ardor3d-swt/src/main/java/com/ardor3d/input/swt/SwtMouseWrapper.java
+++ b/ardor3d-swt/src/main/java/com/ardor3d/input/swt/SwtMouseWrapper.java
@@ -30,7 +30,6 @@ import com.ardor3d.input.MouseState;
import com.ardor3d.input.MouseWrapper;
import com.google.common.collect.AbstractIterator;
import com.google.common.collect.EnumMultiset;
-import com.google.common.collect.Maps;
import com.google.common.collect.Multiset;
import com.google.common.collect.PeekingIterator;
@@ -51,7 +50,7 @@ public class SwtMouseWrapper implements MouseWrapper, MouseListener, MouseMoveLi
private MouseState _lastState = null;
private final Multiset<MouseButton> _clicks = EnumMultiset.create(MouseButton.class);
- private final EnumMap<MouseButton, Long> _lastClickTime = Maps.newEnumMap(MouseButton.class);
+ private final EnumMap<MouseButton, Long> _lastClickTime = new EnumMap<MouseButton, Long>(MouseButton.class);
private final EnumSet<MouseButton> _clickArmed = EnumSet.noneOf(MouseButton.class);
public SwtMouseWrapper(final Control control) {
@@ -91,7 +90,7 @@ public class SwtMouseWrapper implements MouseWrapper, MouseListener, MouseMoveLi
@Override
public synchronized void mouseDoubleClick(final MouseEvent mouseEvent) {
- // ignoring this. We'll handle (multi)click in a uniform way
+ // ignoring this. We'll handle (multi)click in a uniform way
}
@Override
diff --git a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/client/Terrain.java b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/client/Terrain.java
index 09f3d44..4debbd9 100644
--- a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/client/Terrain.java
+++ b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/client/Terrain.java
@@ -47,7 +47,6 @@ import com.ardor3d.scenegraph.Node;
import com.ardor3d.scenegraph.event.DirtyType;
import com.ardor3d.scenegraph.hint.DataMode;
import com.ardor3d.util.resource.ResourceLocatorTool;
-import com.google.common.collect.Lists;
import com.google.common.io.ByteSource;
/**
@@ -74,7 +73,7 @@ public class Terrain extends Node implements Pickable {
private GLSLShaderObjectsState _geometryClipmapShader;
/** Reference to the texture clipmap */
- private final List<TextureClipmap> _textureClipmaps = Lists.newArrayList();
+ private final List<TextureClipmap> _textureClipmaps = new ArrayList<TextureClipmap>();
/** Reference to normal map */
private TextureClipmap _normalClipmap;
@@ -168,7 +167,7 @@ public class Terrain extends Node implements Pickable {
setHeightRange(terrainConfiguration.getHeightRangeMin(), terrainConfiguration.getHeightRangeMax());
}
- private final List<Long> timers = Lists.newArrayList();
+ private final List<Long> timers = new ArrayList<Long>();
@Override
protected void updateChildren(final double time) {
diff --git a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/client/TerrainBuilder.java b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/client/TerrainBuilder.java
index 0a132d5..c4c228c 100644
--- a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/client/TerrainBuilder.java
+++ b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/client/TerrainBuilder.java
@@ -10,6 +10,7 @@
package com.ardor3d.extension.terrain.client;
+import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
@@ -26,7 +27,6 @@ import com.ardor3d.extension.terrain.util.TerrainGridCachePanel;
import com.ardor3d.extension.terrain.util.TextureGridCachePanel;
import com.ardor3d.math.Vector3;
import com.ardor3d.renderer.Camera;
-import com.google.common.collect.Lists;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
public class TerrainBuilder {
@@ -51,7 +51,7 @@ public class TerrainBuilder {
private boolean showDebugPanels = false;
- private final List<TextureSource> extraTextureSources = Lists.newArrayList();
+ private final List<TextureSource> extraTextureSources = new ArrayList<TextureSource>();
public TerrainBuilder(final TerrainDataProvider terrainDataProvider, final Camera camera) {
this.terrainDataProvider = terrainDataProvider;
@@ -112,7 +112,7 @@ public class TerrainBuilder {
logger.info("server clipmapLevels: " + clipmapLevels);
- final List<TerrainCache> cacheList = Lists.newArrayList();
+ final List<TerrainCache> cacheList = new ArrayList<TerrainCache>();
TerrainCache parentCache = null;
final int baseLevel = Math.max(clipmapLevels - clipLevelCount, 0);
@@ -167,7 +167,7 @@ public class TerrainBuilder {
logger.info("server clipmapLevels: " + clipmapLevels);
- final List<TextureCache> cacheList = Lists.newArrayList();
+ final List<TextureCache> cacheList = new ArrayList<TextureCache>();
TextureCache parentCache = null;
final int baseLevel = Math.max(clipmapLevels - textureClipLevelCount, 0);
int level = textureClipLevelCount - 1;
diff --git a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/client/TerrainGridCache.java b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/client/TerrainGridCache.java
index 680a3dc..8a02f85 100644
--- a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/client/TerrainGridCache.java
+++ b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/client/TerrainGridCache.java
@@ -11,6 +11,7 @@
package com.ardor3d.extension.terrain.client;
import java.nio.FloatBuffer;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import java.util.concurrent.Callable;
@@ -24,7 +25,6 @@ import com.ardor3d.extension.terrain.util.Region;
import com.ardor3d.extension.terrain.util.Tile;
import com.ardor3d.math.MathUtils;
import com.ardor3d.math.type.ReadOnlyVector3;
-import com.google.common.collect.Sets;
/**
* Special tile/grid based cache for terrain data
@@ -48,9 +48,9 @@ public class TerrainGridCache implements TerrainCache, Runnable {
private final int clipmapLevel;
private final int requestedLevel;
- private final Set<TileLoadingData> currentTiles = Sets.newHashSet();
- private Set<TileLoadingData> newThreadTiles = Sets.newHashSet();
- private Set<TileLoadingData> backThreadTiles = Sets.newHashSet();
+ private final Set<TileLoadingData> currentTiles = new HashSet<TileLoadingData>();
+ private Set<TileLoadingData> newThreadTiles = new HashSet<TileLoadingData>();
+ private Set<TileLoadingData> backThreadTiles = new HashSet<TileLoadingData>();
private final Object SWAP_LOCK = new Object();
private int backCurrentTileX = Integer.MAX_VALUE;
private int backCurrentTileY = Integer.MAX_VALUE;
@@ -66,12 +66,12 @@ public class TerrainGridCache implements TerrainCache, Runnable {
private boolean exit = false;
private final boolean enableDebug = true;
- private final Set<TileLoadingData> debugTiles = Sets.newHashSet();
+ private final Set<TileLoadingData> debugTiles = new HashSet<TileLoadingData>();
public Set<TileLoadingData> getDebugTiles() {
Set<TileLoadingData> copyTiles = null;
synchronized (debugTiles) {
- copyTiles = Sets.newHashSet(debugTiles);
+ copyTiles = new HashSet<TileLoadingData>(debugTiles);
}
return copyTiles;
}
@@ -176,7 +176,7 @@ public class TerrainGridCache implements TerrainCache, Runnable {
backCurrentTileX = tileX;
backCurrentTileY = tileY;
- final Set<TileLoadingData> newTiles = Sets.newHashSet();
+ final Set<TileLoadingData> newTiles = new HashSet<TileLoadingData>();
for (int i = 0; i < cacheSize; i++) {
for (int j = 0; j < cacheSize; j++) {
final int sourceX = tileX + j - cacheSize / 2;
diff --git a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/client/TextureClipmap.java b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/client/TextureClipmap.java
index be2461f..645d79d 100644
--- a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/client/TextureClipmap.java
+++ b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/client/TextureClipmap.java
@@ -13,8 +13,10 @@ package com.ardor3d.extension.terrain.client;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer;
+import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
+import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.logging.Level;
@@ -28,9 +30,9 @@ import com.ardor3d.image.Image;
import com.ardor3d.image.ImageDataFormat;
import com.ardor3d.image.PixelDataType;
import com.ardor3d.image.Texture;
-import com.ardor3d.image.Texture3D;
import com.ardor3d.image.Texture.MagnificationFilter;
import com.ardor3d.image.Texture.MinificationFilter;
+import com.ardor3d.image.Texture3D;
import com.ardor3d.math.MathUtils;
import com.ardor3d.math.Vector3;
import com.ardor3d.math.type.ReadOnlyVector3;
@@ -39,8 +41,6 @@ import com.ardor3d.renderer.state.GLSLShaderObjectsState;
import com.ardor3d.util.TextureKey;
import com.ardor3d.util.geom.BufferUtils;
import com.ardor3d.util.resource.ResourceLocatorTool;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Sets;
/**
* An implementation of texture clipmapping
@@ -60,7 +60,7 @@ public class TextureClipmap {
private Texture3D textureClipmap;
private GLSLShaderObjectsState textureClipmapShader;
- private final List<LevelData> levelDataList = Lists.newArrayList();
+ private final List<LevelData> levelDataList = new ArrayList<LevelData>();
private final FloatBuffer sliceDataBuffer;
@@ -115,7 +115,7 @@ public class TextureClipmap {
createTexture();
}
- private final List<Long> timers = Lists.newArrayList();
+ private final List<Long> timers = new ArrayList<Long>();
public void update(final Renderer renderer, final ReadOnlyVector3 position) {
eyePosition.set(position);
@@ -279,7 +279,7 @@ public class TextureClipmap {
Collections.sort(regionList, regionSorter);
- final Set<Integer> affectedUnits = Sets.newHashSet();
+ final Set<Integer> affectedUnits = new HashSet<Integer>();
for (int i = regionList.size() - 1; i >= 0; i--) {
final Region region = regionList.get(i);
@@ -326,8 +326,8 @@ public class TextureClipmap {
final Region region = new Region(level - 1, x * 2, y * 2, width * 2, height * 2);
if (!regionList.contains(region)) {
regionList.add(region);
- recursiveAddUpdates(regionList, region.getLevel(), region.getX(), region.getY(), region.getWidth(), region
- .getHeight());
+ recursiveAddUpdates(regionList, region.getLevel(), region.getX(), region.getY(), region.getWidth(),
+ region.getHeight());
}
}
diff --git a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/client/TextureGridCache.java b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/client/TextureGridCache.java
index ee8612b..dee86c6 100644
--- a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/client/TextureGridCache.java
+++ b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/client/TextureGridCache.java
@@ -11,6 +11,7 @@
package com.ardor3d.extension.terrain.client;
import java.nio.ByteBuffer;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import java.util.concurrent.Callable;
@@ -27,7 +28,6 @@ import com.ardor3d.extension.terrain.util.Region;
import com.ardor3d.extension.terrain.util.Tile;
import com.ardor3d.image.TextureStoreFormat;
import com.ardor3d.math.MathUtils;
-import com.google.common.collect.Sets;
/**
* Special tile/grid based cache for texture data
@@ -51,9 +51,9 @@ public class TextureGridCache implements TextureCache, Runnable {
private final int clipmapLevel;
private final int requestedLevel;
- private final Set<TileLoadingData> currentTiles = Sets.newHashSet();
- private Set<TileLoadingData> newThreadTiles = Sets.newHashSet();
- private Set<TileLoadingData> backThreadTiles = Sets.newHashSet();
+ private final Set<TileLoadingData> currentTiles = new HashSet<TileLoadingData>();
+ private Set<TileLoadingData> newThreadTiles = new HashSet<TileLoadingData>();
+ private Set<TileLoadingData> backThreadTiles = new HashSet<TileLoadingData>();
private final Object SWAP_LOCK = new Object();
private int backCurrentTileX = Integer.MAX_VALUE;
private int backCurrentTileY = Integer.MAX_VALUE;
@@ -69,12 +69,12 @@ public class TextureGridCache implements TextureCache, Runnable {
// Debug
private final boolean enableDebug = true;
- private final Set<TileLoadingData> debugTiles = Sets.newHashSet();
+ private final Set<TileLoadingData> debugTiles = new HashSet<TileLoadingData>();
public Set<TileLoadingData> getDebugTiles() {
Set<TileLoadingData> copyTiles = null;
synchronized (debugTiles) {
- copyTiles = Sets.newHashSet(debugTiles);
+ copyTiles = new HashSet<TileLoadingData>(debugTiles);
}
return copyTiles;
}
@@ -183,7 +183,7 @@ public class TextureGridCache implements TextureCache, Runnable {
backCurrentTileX = tileX;
backCurrentTileY = tileY;
- final Set<TileLoadingData> newTiles = Sets.newHashSet();
+ final Set<TileLoadingData> newTiles = new HashSet<TileLoadingData>();
for (int i = 0; i < cacheSize; i++) {
for (int j = 0; j < cacheSize; j++) {
final int sourceX = tileX + j - cacheSize / 2;
diff --git a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/array/ArrayTerrainDataProvider.java b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/array/ArrayTerrainDataProvider.java
index 21e9062..76cc052 100644
--- a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/array/ArrayTerrainDataProvider.java
+++ b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/array/ArrayTerrainDataProvider.java
@@ -10,7 +10,9 @@
package com.ardor3d.extension.terrain.providers.array;
+import java.util.ArrayList;
import java.util.Collections;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -21,8 +23,6 @@ import com.ardor3d.extension.terrain.providers.image.ImageTextureSource;
import com.ardor3d.extension.terrain.util.NormalMapUtil;
import com.ardor3d.image.Image;
import com.ardor3d.math.type.ReadOnlyVector3;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
public class ArrayTerrainDataProvider implements TerrainDataProvider {
private static final int tileSize = 128;
@@ -49,8 +49,8 @@ public class ArrayTerrainDataProvider implements TerrainDataProvider {
final int clipLevelCount = 6;
int currentSize = size;
- heightMaps = Lists.newArrayList();
- heightMapSizes = Lists.newArrayList();
+ heightMaps = new ArrayList<float[]>();
+ heightMapSizes = new ArrayList<Integer>();
heightMaps.add(data);
heightMapSizes.add(currentSize);
float[] parentHeightMap = data;
@@ -73,7 +73,7 @@ public class ArrayTerrainDataProvider implements TerrainDataProvider {
@Override
public Map<Integer, String> getAvailableMaps() throws Exception {
- final Map<Integer, String> maps = Maps.newHashMap();
+ final Map<Integer, String> maps = new HashMap<Integer, String>();
maps.put(0, "ArrayBasedMap");
return maps;
diff --git a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/array/ArrayTerrainSource.java b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/array/ArrayTerrainSource.java
index 990570c..a274eee 100644
--- a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/array/ArrayTerrainSource.java
+++ b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/array/ArrayTerrainSource.java
@@ -10,6 +10,7 @@
package com.ardor3d.extension.terrain.providers.array;
+import java.util.HashSet;
import java.util.List;
import java.util.Set;
@@ -17,7 +18,6 @@ import com.ardor3d.extension.terrain.client.TerrainConfiguration;
import com.ardor3d.extension.terrain.client.TerrainSource;
import com.ardor3d.extension.terrain.util.Tile;
import com.ardor3d.math.type.ReadOnlyVector3;
-import com.google.common.collect.Sets;
public class ArrayTerrainSource implements TerrainSource {
private final int tileSize;
@@ -52,7 +52,7 @@ public class ArrayTerrainSource implements TerrainSource {
@Override
public Set<Tile> getValidTiles(final int clipmapLevel, final int tileX, final int tileY, final int numTilesX,
final int numTilesY) throws Exception {
- final Set<Tile> validTiles = Sets.newHashSet();
+ final Set<Tile> validTiles = new HashSet<Tile>();
final int heightMapSize = heightMapSizes.get(clipmapLevel);
for (int y = 0; y < numTilesY; y++) {
diff --git a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/array/ArrayTextureSource.java b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/array/ArrayTextureSource.java
index 218d39a..e69a1b5 100644
--- a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/array/ArrayTextureSource.java
+++ b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/array/ArrayTextureSource.java
@@ -11,6 +11,8 @@
package com.ardor3d.extension.terrain.providers.array;
import java.nio.ByteBuffer;
+import java.util.HashMap;
+import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -20,8 +22,6 @@ import com.ardor3d.extension.terrain.client.TextureSource;
import com.ardor3d.extension.terrain.util.Tile;
import com.ardor3d.image.TextureStoreFormat;
import com.ardor3d.util.geom.BufferUtils;
-import com.google.common.collect.Maps;
-import com.google.common.collect.Sets;
public class ArrayTextureSource implements TextureSource {
private final int tileSize;
@@ -43,7 +43,7 @@ public class ArrayTextureSource implements TextureSource {
@Override
public TextureConfiguration getConfiguration() throws Exception {
- final Map<Integer, TextureStoreFormat> textureStoreFormat = Maps.newHashMap();
+ final Map<Integer, TextureStoreFormat> textureStoreFormat = new HashMap<Integer, TextureStoreFormat>();
textureStoreFormat.put(0, TextureStoreFormat.Luminance8);
return new TextureConfiguration(heightMaps.size(), textureStoreFormat, tileSize, 1f, true, false);
@@ -52,7 +52,7 @@ public class ArrayTextureSource implements TextureSource {
@Override
public Set<Tile> getValidTiles(final int clipmapLevel, final int tileX, final int tileY, final int numTilesX,
final int numTilesY) throws Exception {
- final Set<Tile> validTiles = Sets.newHashSet();
+ final Set<Tile> validTiles = new HashSet<Tile>();
final int heightMapSize = heightMapSizes.get(clipmapLevel);
for (int y = 0; y < numTilesY; y++) {
diff --git a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/awt/AbstractAwtElement.java b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/awt/AbstractAwtElement.java
index a56eacb..31d9e29 100644
--- a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/awt/AbstractAwtElement.java
+++ b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/awt/AbstractAwtElement.java
@@ -13,7 +13,9 @@ package com.ardor3d.extension.terrain.providers.awt;
import java.awt.AlphaComposite;
import java.awt.Composite;
import java.awt.RenderingHints;
+import java.awt.RenderingHints.Key;
import java.awt.image.BufferedImage;
+import java.util.HashMap;
import java.util.Map;
import com.ardor3d.math.Transform;
@@ -21,14 +23,13 @@ import com.ardor3d.math.Vector3;
import com.ardor3d.math.Vector4;
import com.ardor3d.math.type.ReadOnlyTransform;
import com.ardor3d.math.type.ReadOnlyVector4;
-import com.google.common.collect.Maps;
public abstract class AbstractAwtElement {
protected final Transform _transform = new Transform();
protected Composite _compositeOverride;
protected ElementUpdateListener _listener;
- protected Map<RenderingHints.Key, Object> hints = Maps.newHashMap();
+ protected Map<RenderingHints.Key, Object> hints = new HashMap<Key, Object>();
protected Vector4 _awtBounds = new Vector4();
diff --git a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/awt/AwtElementProvider.java b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/awt/AwtElementProvider.java
index c8b5ae4..1a59724 100644
--- a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/awt/AwtElementProvider.java
+++ b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/awt/AwtElementProvider.java
@@ -10,14 +10,14 @@
package com.ardor3d.extension.terrain.providers.awt;
+import java.util.LinkedList;
import java.util.List;
import com.ardor3d.math.type.ReadOnlyVector4;
-import com.google.common.collect.Lists;
public class AwtElementProvider implements ElementUpdateListener {
- private final List<AbstractAwtElement> _elements = Lists.newLinkedList();
- private final List<ElementUpdateListener> _updateListeners = Lists.newLinkedList();
+ private final List<AbstractAwtElement> _elements = new LinkedList<AbstractAwtElement>();
+ private final List<ElementUpdateListener> _updateListeners = new LinkedList<ElementUpdateListener>();
public List<AbstractAwtElement> getElements() {
return _elements;
diff --git a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/awt/AwtShapeElement.java b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/awt/AwtShapeElement.java
index bbfcdc8..7dd594a 100644
--- a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/awt/AwtShapeElement.java
+++ b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/awt/AwtShapeElement.java
@@ -18,13 +18,13 @@ import java.awt.RenderingHints;
import java.awt.Shape;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
+import java.util.HashMap;
import java.util.Map;
import com.ardor3d.math.MathUtils;
import com.ardor3d.math.Transform;
import com.ardor3d.math.Vector4;
import com.ardor3d.math.type.ReadOnlyTransform;
-import com.google.common.collect.Maps;
public class AwtShapeElement extends AbstractAwtElement {
@@ -40,7 +40,7 @@ public class AwtShapeElement extends AbstractAwtElement {
protected Vector4 _margin = new Vector4(1, 1, 1, 1);
- protected final Map<Integer, BasicStroke> _strokes = Maps.newHashMap();
+ protected final Map<Integer, BasicStroke> _strokes = new HashMap<Integer, BasicStroke>();
public AwtShapeElement(final Shape shape) {
this(shape, Transform.IDENTITY, null);
diff --git a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/awt/AwtTextureSource.java b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/awt/AwtTextureSource.java
index e83be4a..eab9105 100644
--- a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/awt/AwtTextureSource.java
+++ b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/awt/AwtTextureSource.java
@@ -16,6 +16,9 @@ import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.awt.image.DataBufferInt;
import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -29,9 +32,6 @@ import com.ardor3d.math.MathUtils;
import com.ardor3d.math.Transform;
import com.ardor3d.math.type.ReadOnlyVector4;
import com.ardor3d.util.geom.BufferUtils;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-import com.google.common.collect.Sets;
public class AwtTextureSource implements TextureSource, ElementUpdateListener {
private static final int tileSize = 128;
@@ -69,7 +69,7 @@ public class AwtTextureSource implements TextureSource, ElementUpdateListener {
for (int i = 0; i < availableClipmapLevels; i++) {
_image[i] = new BufferedImage(tileSize, tileSize, BufferedImage.TYPE_INT_ARGB);
- _updatedTiles[i] = Sets.newHashSet();
+ _updatedTiles[i] = new HashSet<Tile>();
}
}
@@ -79,7 +79,7 @@ public class AwtTextureSource implements TextureSource, ElementUpdateListener {
@Override
public TextureConfiguration getConfiguration() throws Exception {
- final Map<Integer, TextureStoreFormat> textureStoreFormat = Maps.newHashMap();
+ final Map<Integer, TextureStoreFormat> textureStoreFormat = new HashMap<Integer, TextureStoreFormat>();
textureStoreFormat.put(0, format);
return new TextureConfiguration(availableClipmapLevels, textureStoreFormat, tileSize, 1f, false, true);
@@ -100,7 +100,7 @@ public class AwtTextureSource implements TextureSource, ElementUpdateListener {
return null;
}
- final Set<Tile> tiles = Sets.newHashSet();
+ final Set<Tile> tiles = new HashSet<Tile>();
int checkX, checkY;
for (final Iterator<Tile> it = _updatedTiles[baseClipmapLevel].iterator(); it.hasNext();) {
@@ -149,7 +149,7 @@ public class AwtTextureSource implements TextureSource, ElementUpdateListener {
graphics.setComposite(composite);
// get list of elements that intersect the given region
- final List<AbstractAwtElement> elements = Lists.newArrayList(provider.getElements());
+ final List<AbstractAwtElement> elements = new ArrayList<AbstractAwtElement>(provider.getElements());
for (final Iterator<AbstractAwtElement> it = elements.iterator(); it.hasNext();) {
final AbstractAwtElement element = it.next();
diff --git a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/image/ImageTextureSource.java b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/image/ImageTextureSource.java
index 68e0bdc..53e20ac 100644
--- a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/image/ImageTextureSource.java
+++ b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/image/ImageTextureSource.java
@@ -11,7 +11,10 @@
package com.ardor3d.extension.terrain.providers.image;
import java.nio.ByteBuffer;
+import java.util.ArrayList;
import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -22,9 +25,6 @@ import com.ardor3d.extension.terrain.util.Tile;
import com.ardor3d.image.Image;
import com.ardor3d.image.TextureStoreFormat;
import com.ardor3d.util.geom.BufferUtils;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-import com.google.common.collect.Sets;
public class ImageTextureSource implements TextureSource {
private final int tileSize;
@@ -40,8 +40,8 @@ public class ImageTextureSource implements TextureSource {
public ImageTextureSource(final int tileSize, final Image map, final List<Integer> heightMapSizes) {
this.tileSize = tileSize;
- maps = Lists.newArrayListWithExpectedSize(heightMapSizes.size());
- this.heightMapSizes = Lists.newArrayList(heightMapSizes);
+ maps = new ArrayList<byte[]>(heightMapSizes.size());
+ this.heightMapSizes = new ArrayList<Integer>(heightMapSizes);
buildMips(map);
}
@@ -72,7 +72,7 @@ public class ImageTextureSource implements TextureSource {
@Override
public TextureConfiguration getConfiguration() throws Exception {
- final Map<Integer, TextureStoreFormat> textureStoreFormat = Maps.newHashMap();
+ final Map<Integer, TextureStoreFormat> textureStoreFormat = new HashMap<Integer, TextureStoreFormat>();
textureStoreFormat.put(0, TextureStoreFormat.RGB8);
return new TextureConfiguration(maps.size(), textureStoreFormat, tileSize, 1f, true, false);
@@ -81,7 +81,7 @@ public class ImageTextureSource implements TextureSource {
@Override
public Set<Tile> getValidTiles(final int clipmapLevel, final int tileX, final int tileY, final int numTilesX,
final int numTilesY) throws Exception {
- final Set<Tile> validTiles = Sets.newHashSet();
+ final Set<Tile> validTiles = new HashSet<Tile>();
final int heightMapSize = heightMapSizes.get(clipmapLevel);
for (int y = 0; y < numTilesY; y++) {
diff --git a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/inmemory/InMemoryTerrainDataProvider.java b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/inmemory/InMemoryTerrainDataProvider.java
index 4df7c3b..f2511c3 100644
--- a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/inmemory/InMemoryTerrainDataProvider.java
+++ b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/inmemory/InMemoryTerrainDataProvider.java
@@ -10,6 +10,8 @@
package com.ardor3d.extension.terrain.providers.inmemory;
+import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -20,8 +22,6 @@ import com.ardor3d.extension.terrain.providers.image.ImageTextureSource;
import com.ardor3d.extension.terrain.providers.inmemory.data.InMemoryTerrainData;
import com.ardor3d.extension.terrain.util.NormalMapUtil;
import com.ardor3d.image.Image;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
public class InMemoryTerrainDataProvider implements TerrainDataProvider {
private static final int tileSize = 128;
@@ -40,7 +40,7 @@ public class InMemoryTerrainDataProvider implements TerrainDataProvider {
@Override
public Map<Integer, String> getAvailableMaps() throws Exception {
- final Map<Integer, String> maps = Maps.newHashMap();
+ final Map<Integer, String> maps = new HashMap<Integer, String>();
maps.put(0, "InMemoryData");
return maps;
@@ -64,7 +64,7 @@ public class InMemoryTerrainDataProvider implements TerrainDataProvider {
inMemoryTerrainData.getSide(), inMemoryTerrainData.getMaxHeight(), inMemoryTerrainData
.getScale().getX(), inMemoryTerrainData.getScale().getY());
- final List<Integer> heightMapSizes = Lists.newArrayList();
+ final List<Integer> heightMapSizes = new ArrayList<Integer>();
int currentSize = inMemoryTerrainData.getSide();
heightMapSizes.add(currentSize);
for (int i = 0; i < inMemoryTerrainData.getClipmapLevels(); i++) {
diff --git a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/inmemory/InMemoryTerrainSource.java b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/inmemory/InMemoryTerrainSource.java
index 32a0542..ce0e655 100644
--- a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/inmemory/InMemoryTerrainSource.java
+++ b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/inmemory/InMemoryTerrainSource.java
@@ -10,6 +10,7 @@
package com.ardor3d.extension.terrain.providers.inmemory;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
@@ -17,7 +18,6 @@ import com.ardor3d.extension.terrain.client.TerrainConfiguration;
import com.ardor3d.extension.terrain.client.TerrainSource;
import com.ardor3d.extension.terrain.providers.inmemory.data.InMemoryTerrainData;
import com.ardor3d.extension.terrain.util.Tile;
-import com.google.common.collect.Sets;
public class InMemoryTerrainSource implements TerrainSource {
private final int tileSize;
@@ -41,7 +41,7 @@ public class InMemoryTerrainSource implements TerrainSource {
final int numTilesY) throws Exception {
final int baseClipmapLevel = availableClipmapLevels - clipmapLevel - 1;
- final Set<Tile> validTiles = Sets.newHashSet();
+ final Set<Tile> validTiles = new HashSet<Tile>();
final int levelSize = 1 << baseClipmapLevel;
final int size = inMemoryTerrainData.getSide();
@@ -70,7 +70,7 @@ public class InMemoryTerrainSource implements TerrainSource {
final int baseClipmapLevel = availableClipmapLevels - clipmapLevel - 1;
- final Set<Tile> tiles = Sets.newHashSet();
+ final Set<Tile> tiles = new HashSet<Tile>();
synchronized (updatedTiles[baseClipmapLevel]) {
if (updatedTiles[baseClipmapLevel].isEmpty()) {
diff --git a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/inmemory/InMemoryTextureSource.java b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/inmemory/InMemoryTextureSource.java
index 80fdc82..26b9b73 100644
--- a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/inmemory/InMemoryTextureSource.java
+++ b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/inmemory/InMemoryTextureSource.java
@@ -11,6 +11,8 @@
package com.ardor3d.extension.terrain.providers.inmemory;
import java.nio.ByteBuffer;
+import java.util.HashMap;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
@@ -21,8 +23,6 @@ import com.ardor3d.extension.terrain.providers.inmemory.data.InMemoryTerrainData
import com.ardor3d.extension.terrain.util.Tile;
import com.ardor3d.image.TextureStoreFormat;
import com.ardor3d.util.geom.BufferUtils;
-import com.google.common.collect.Maps;
-import com.google.common.collect.Sets;
public class InMemoryTextureSource implements TextureSource {
private final int tileSize;
@@ -37,7 +37,7 @@ public class InMemoryTextureSource implements TextureSource {
@Override
public TextureConfiguration getConfiguration() throws Exception {
- final Map<Integer, TextureStoreFormat> textureStoreFormat = Maps.newHashMap();
+ final Map<Integer, TextureStoreFormat> textureStoreFormat = new HashMap<Integer, TextureStoreFormat>();
textureStoreFormat.put(0, TextureStoreFormat.RGBA8);
return new TextureConfiguration(availableClipmapLevels, textureStoreFormat, tileSize, 1f, true, true);
@@ -48,7 +48,7 @@ public class InMemoryTextureSource implements TextureSource {
final int numTilesY) throws Exception {
final int baseClipmapLevel = availableClipmapLevels - clipmapLevel - 1;
- final Set<Tile> validTiles = Sets.newHashSet();
+ final Set<Tile> validTiles = new HashSet<Tile>();
final int levelSize = 1 << baseClipmapLevel;
final int size = inMemoryTerrainData.getSide();
@@ -77,7 +77,7 @@ public class InMemoryTextureSource implements TextureSource {
final int baseClipmapLevel = availableClipmapLevels - clipmapLevel - 1;
- final Set<Tile> tiles = Sets.newHashSet();
+ final Set<Tile> tiles = new HashSet<Tile>();
synchronized (updatedTiles[baseClipmapLevel]) {
if (updatedTiles[baseClipmapLevel].isEmpty()) {
diff --git a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/inmemory/data/InMemoryTerrainData.java b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/inmemory/data/InMemoryTerrainData.java
index 5418266..f6e6cc0 100644
--- a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/inmemory/data/InMemoryTerrainData.java
+++ b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/inmemory/data/InMemoryTerrainData.java
@@ -10,6 +10,7 @@
package com.ardor3d.extension.terrain.providers.inmemory.data;
+import java.util.HashSet;
import java.util.Set;
import com.ardor3d.extension.terrain.util.Tile;
@@ -20,7 +21,6 @@ import com.ardor3d.math.functions.FbmFunction3D;
import com.ardor3d.math.functions.Function3D;
import com.ardor3d.math.functions.Functions;
import com.ardor3d.math.type.ReadOnlyVector3;
-import com.google.common.collect.Sets;
public class InMemoryTerrainData {
@@ -62,8 +62,8 @@ public class InMemoryTerrainData {
updatedTerrainTiles = new Set[clipmapLevels];
updatedTextureTiles = new Set[clipmapLevels];
for (int i = 0; i < clipmapLevels; i++) {
- updatedTerrainTiles[i] = Sets.newHashSet();
- updatedTextureTiles[i] = Sets.newHashSet();
+ updatedTerrainTiles[i] = new HashSet<Tile>();
+ updatedTextureTiles[i] = new HashSet<Tile>();
}
final double procScale = 1.0 / 4000.0;
@@ -175,10 +175,10 @@ public class InMemoryTerrainData {
dr = (radius - r) / radius;
index = i * side + j;
heightData[index] = Math.max(minHeight, Math.min(heightData[index] + dr * offset, maxHeight));
- red = (byte) ((int) MathUtils.lerp(dr, colorData[index * 4 + 0] & 0xff, (paint.getRed() * 255)) & 0xff);
- green = (byte) ((int) MathUtils.lerp(dr, colorData[index * 4 + 1] & 0xff, (paint.getGreen() * 255)) & 0xff);
- blue = (byte) ((int) MathUtils.lerp(dr, colorData[index * 4 + 2] & 0xff, (paint.getBlue() * 255)) & 0xff);
- alpha = (byte) ((int) MathUtils.lerp(dr, colorData[index * 4 + 3] & 0xff, (paint.getAlpha() * 255)) & 0xff);
+ red = (byte) ((int) MathUtils.lerp(dr, colorData[index * 4 + 0] & 0xff, paint.getRed() * 255) & 0xff);
+ green = (byte) ((int) MathUtils.lerp(dr, colorData[index * 4 + 1] & 0xff, paint.getGreen() * 255) & 0xff);
+ blue = (byte) ((int) MathUtils.lerp(dr, colorData[index * 4 + 2] & 0xff, paint.getBlue() * 255) & 0xff);
+ alpha = (byte) ((int) MathUtils.lerp(dr, colorData[index * 4 + 3] & 0xff, paint.getAlpha() * 255) & 0xff);
colorData[index * 4 + 0] = red;
colorData[index * 4 + 1] = green;
colorData[index * 4 + 2] = blue;
diff --git a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/procedural/ProceduralNormalMapSource.java b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/procedural/ProceduralNormalMapSource.java
index ec4313b..37a5c26 100644
--- a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/procedural/ProceduralNormalMapSource.java
+++ b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/procedural/ProceduralNormalMapSource.java
@@ -11,6 +11,7 @@
package com.ardor3d.extension.terrain.providers.procedural;
import java.nio.ByteBuffer;
+import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.locks.ReentrantLock;
@@ -22,7 +23,6 @@ import com.ardor3d.image.TextureStoreFormat;
import com.ardor3d.math.Vector3;
import com.ardor3d.math.functions.Function3D;
import com.ardor3d.util.geom.BufferUtils;
-import com.google.common.collect.Maps;
public class ProceduralNormalMapSource implements TextureSource {
private final Function3D function;
@@ -44,7 +44,7 @@ public class ProceduralNormalMapSource implements TextureSource {
@Override
public TextureConfiguration getConfiguration() throws Exception {
- final Map<Integer, TextureStoreFormat> textureStoreFormat = Maps.newHashMap();
+ final Map<Integer, TextureStoreFormat> textureStoreFormat = new HashMap<Integer, TextureStoreFormat>();
textureStoreFormat.put(0, TextureStoreFormat.RGB8);
return new TextureConfiguration(availableClipmapLevels, textureStoreFormat, tileSize, 1f, false, false);
diff --git a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/procedural/ProceduralTerrainDataProvider.java b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/procedural/ProceduralTerrainDataProvider.java
index 6d1c8e3..6b94f04 100644
--- a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/procedural/ProceduralTerrainDataProvider.java
+++ b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/procedural/ProceduralTerrainDataProvider.java
@@ -10,6 +10,7 @@
package com.ardor3d.extension.terrain.providers.procedural;
+import java.util.HashMap;
import java.util.Map;
import com.ardor3d.extension.terrain.client.TerrainDataProvider;
@@ -17,7 +18,6 @@ import com.ardor3d.extension.terrain.client.TerrainSource;
import com.ardor3d.extension.terrain.client.TextureSource;
import com.ardor3d.math.functions.Function3D;
import com.ardor3d.math.type.ReadOnlyVector3;
-import com.google.common.collect.Maps;
public class ProceduralTerrainDataProvider implements TerrainDataProvider {
private final Function3D function;
@@ -43,7 +43,7 @@ public class ProceduralTerrainDataProvider implements TerrainDataProvider {
@Override
public Map<Integer, String> getAvailableMaps() throws Exception {
- final Map<Integer, String> maps = Maps.newHashMap();
+ final Map<Integer, String> maps = new HashMap<Integer, String>();
maps.put(0, "ProceduralMap");
return maps;
diff --git a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/procedural/ProceduralTextureSource.java b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/procedural/ProceduralTextureSource.java
index 3b1b4dc..5970070 100644
--- a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/procedural/ProceduralTextureSource.java
+++ b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/procedural/ProceduralTextureSource.java
@@ -11,6 +11,7 @@
package com.ardor3d.extension.terrain.providers.procedural;
import java.nio.ByteBuffer;
+import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.locks.ReentrantLock;
@@ -24,7 +25,6 @@ import com.ardor3d.math.ColorRGBA;
import com.ardor3d.math.functions.Function3D;
import com.ardor3d.math.type.ReadOnlyColorRGBA;
import com.ardor3d.util.geom.BufferUtils;
-import com.google.common.collect.Maps;
public class ProceduralTextureSource implements TextureSource {
private final Function3D function;
@@ -59,7 +59,7 @@ public class ProceduralTextureSource implements TextureSource {
@Override
public TextureConfiguration getConfiguration() throws Exception {
- final Map<Integer, TextureStoreFormat> textureStoreFormat = Maps.newHashMap();
+ final Map<Integer, TextureStoreFormat> textureStoreFormat = new HashMap<Integer, TextureStoreFormat>();
textureStoreFormat.put(0, TextureStoreFormat.RGB8);
return new TextureConfiguration(availableClipmapLevels, textureStoreFormat, tileSize, 1f, false, false);
diff --git a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/simplearray/SimpleArrayTerrainDataProvider.java b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/simplearray/SimpleArrayTerrainDataProvider.java
index c41b4bf..ea98407 100644
--- a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/simplearray/SimpleArrayTerrainDataProvider.java
+++ b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/simplearray/SimpleArrayTerrainDataProvider.java
@@ -10,6 +10,8 @@
package com.ardor3d.extension.terrain.providers.simplearray;
+import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -19,8 +21,6 @@ import com.ardor3d.extension.terrain.client.TextureSource;
import com.ardor3d.extension.terrain.providers.image.ImageTextureSource;
import com.ardor3d.extension.terrain.util.NormalMapUtil;
import com.ardor3d.image.Image;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
public class SimpleArrayTerrainDataProvider implements TerrainDataProvider {
private static final int tileSize = 128;
@@ -45,7 +45,7 @@ public class SimpleArrayTerrainDataProvider implements TerrainDataProvider {
@Override
public Map<Integer, String> getAvailableMaps() throws Exception {
- final Map<Integer, String> maps = Maps.newHashMap();
+ final Map<Integer, String> maps = new HashMap<Integer, String>();
maps.put(0, "InMemoryData");
return maps;
@@ -66,7 +66,7 @@ public class SimpleArrayTerrainDataProvider implements TerrainDataProvider {
if (generateNormalMap) {
try {
final Image normalImage = NormalMapUtil.constructNormalMap(heightData, side, 1, 1, 1);
- final List<Integer> heightMapSizes = Lists.newArrayList();
+ final List<Integer> heightMapSizes = new ArrayList<Integer>();
int currentSize = side;
heightMapSizes.add(currentSize);
for (int i = 0; i < 8; i++) {
diff --git a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/simplearray/SimpleArrayTextureSource.java b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/simplearray/SimpleArrayTextureSource.java
index 924265d..6d52f99 100644
--- a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/simplearray/SimpleArrayTextureSource.java
+++ b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/providers/simplearray/SimpleArrayTextureSource.java
@@ -11,6 +11,8 @@
package com.ardor3d.extension.terrain.providers.simplearray;
import java.nio.ByteBuffer;
+import java.util.HashMap;
+import java.util.HashSet;
import java.util.Map;
import java.util.Set;
@@ -19,8 +21,6 @@ import com.ardor3d.extension.terrain.client.TextureSource;
import com.ardor3d.extension.terrain.util.Tile;
import com.ardor3d.image.TextureStoreFormat;
import com.ardor3d.util.geom.BufferUtils;
-import com.google.common.collect.Maps;
-import com.google.common.collect.Sets;
public class SimpleArrayTextureSource implements TextureSource {
private final int tileSize;
@@ -36,7 +36,7 @@ public class SimpleArrayTextureSource implements TextureSource {
@Override
public TextureConfiguration getConfiguration() throws Exception {
- final Map<Integer, TextureStoreFormat> textureStoreFormat = Maps.newHashMap();
+ final Map<Integer, TextureStoreFormat> textureStoreFormat = new HashMap<Integer, TextureStoreFormat>();
textureStoreFormat.put(0, TextureStoreFormat.RGBA8);
return new TextureConfiguration(availableClipmapLevels, textureStoreFormat, tileSize, 1f, true, true);
@@ -45,7 +45,7 @@ public class SimpleArrayTextureSource implements TextureSource {
@Override
public Set<Tile> getValidTiles(final int clipmapLevel, final int tileX, final int tileY, final int numTilesX,
final int numTilesY) throws Exception {
- final Set<Tile> validTiles = Sets.newHashSet();
+ final Set<Tile> validTiles = new HashSet<Tile>();
final int levelSize = 1 << availableClipmapLevels - clipmapLevel;
diff --git a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/util/ClipmapTerrainPicker.java b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/util/ClipmapTerrainPicker.java
index 7ced2ba..f5a5349 100644
--- a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/util/ClipmapTerrainPicker.java
+++ b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/util/ClipmapTerrainPicker.java
@@ -10,6 +10,7 @@
package com.ardor3d.extension.terrain.util;
+import java.util.ArrayList;
import java.util.List;
import com.ardor3d.extension.terrain.client.ClipmapLevel;
@@ -22,7 +23,6 @@ import com.ardor3d.math.Vector3;
import com.ardor3d.math.type.ReadOnlyRay3;
import com.ardor3d.math.type.ReadOnlyTransform;
import com.ardor3d.math.type.ReadOnlyVector3;
-import com.google.common.collect.Lists;
/**
* A picking assistant to be used with ClipmapLevel and an AbstractBresenhamTracer.
@@ -57,7 +57,7 @@ public class ClipmapTerrainPicker {
final Class<? extends AbstractBresenhamTracer> tracerClass, final int maxChecks,
final Vector3 initialSpacing) throws InstantiationException, IllegalAccessException {
_clipmapLevels = levels;
- _tracers = Lists.newArrayList();
+ _tracers = new ArrayList<AbstractBresenhamTracer>();
for (int i = 0, max = levels.size(); i < max; i++) {
final AbstractBresenhamTracer tracer = tracerClass.newInstance();
final int space = 1 << i;
diff --git a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/util/DoubleBufferedList.java b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/util/DoubleBufferedList.java
index f6c12da..73bcffc 100644
--- a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/util/DoubleBufferedList.java
+++ b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/util/DoubleBufferedList.java
@@ -1,18 +1,17 @@
package com.ardor3d.extension.terrain.util;
+import java.util.ArrayList;
import java.util.List;
-import com.google.common.collect.Lists;
-
/**
* Utility class used by the mailbox update system.
*
* @param <T>
*/
public class DoubleBufferedList<T> {
- private List<T> frontList = Lists.newArrayList();
- private List<T> backList = Lists.newArrayList();
+ private List<T> frontList = new ArrayList<T>();
+ private List<T> backList = new ArrayList<T>();
/**
* The add method can be called at any point.
diff --git a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/UIComboBox.java b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/UIComboBox.java
index df93d7f..bc6c158 100644
--- a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/UIComboBox.java
+++ b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/UIComboBox.java
@@ -10,6 +10,7 @@
package com.ardor3d.extension.ui;
+import java.util.ArrayList;
import java.util.List;
import com.ardor3d.extension.ui.event.ActionEvent;
@@ -24,7 +25,6 @@ import com.ardor3d.extension.ui.text.StyleConstants;
import com.ardor3d.input.InputState;
import com.ardor3d.input.MouseButton;
import com.ardor3d.scenegraph.Spatial;
-import com.google.common.collect.Lists;
/**
* A UI component that contains several possible choices, but shows only the currently selected one. Changing the
@@ -40,7 +40,7 @@ public class UIComboBox extends UIPanel {
protected int _selectedIndex = 0;
- private final List<SelectionListener<UIComboBox>> _listeners = Lists.newArrayList();
+ private final List<SelectionListener<UIComboBox>> _listeners = new ArrayList<SelectionListener<UIComboBox>>();
private SkinningTask _itemSkinCallback;
diff --git a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/UIComponent.java b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/UIComponent.java
index eb74c10..1f417b2 100644
--- a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/UIComponent.java
+++ b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/UIComponent.java
@@ -10,6 +10,7 @@
package com.ardor3d.extension.ui;
+import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.Callable;
import java.util.concurrent.FutureTask;
@@ -46,7 +47,6 @@ import com.ardor3d.renderer.state.RenderState.StateType;
import com.ardor3d.scenegraph.Node;
import com.ardor3d.scenegraph.event.DirtyType;
import com.ardor3d.scenegraph.hint.PickingHint;
-import com.google.common.collect.Maps;
/**
* Base UI class. All UI components/widgets/controls extend this class.
@@ -93,9 +93,9 @@ public abstract class UIComponent extends Node implements UIKeyHandler {
private static int _defaultFontSize = 18;
/** The default font styles to use. */
- private static Map<String, Object> _defaultFontStyles = Maps.newHashMap();
+ private static Map<String, Object> _defaultFontStyles = new HashMap<String, Object>();
/** The font styles to use for text on this component, if needed. */
- private Map<String, Object> _fontStyles = Maps.newHashMap();
+ private Map<String, Object> _fontStyles = new HashMap<String, Object>();
/** Optional information used by a parent container's layout. */
private UILayoutData _layoutData = null;
@@ -232,7 +232,7 @@ public abstract class UIComponent extends Node implements UIKeyHandler {
if (getParent() != null && getParent() instanceof UIComponent) {
styles = ((UIComponent) getParent()).getFontStyles();
} else {
- styles = Maps.newHashMap(UIComponent._defaultFontStyles);
+ styles = new HashMap<String, Object>(UIComponent._defaultFontStyles);
styles.put(StyleConstants.KEY_COLOR, UIComponent.DEFAULT_FOREGROUND_COLOR);
}
styles.putAll(_fontStyles);
@@ -1166,9 +1166,9 @@ public abstract class UIComponent extends Node implements UIKeyHandler {
*/
public static void setDefaultFontStyles(final Map<String, Object> defaultStyles) {
if (defaultStyles == null) {
- UIComponent._defaultFontStyles = Maps.newHashMap();
+ UIComponent._defaultFontStyles = new HashMap<String, Object>();
} else {
- UIComponent._defaultFontStyles = Maps.newHashMap(defaultStyles);
+ UIComponent._defaultFontStyles = new HashMap<String, Object>(defaultStyles);
}
}
diff --git a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/UIHud.java b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/UIHud.java
index 796bcf9..baaafda 100644
--- a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/UIHud.java
+++ b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/UIHud.java
@@ -46,7 +46,6 @@ import com.ardor3d.scenegraph.hint.CullHint;
import com.ardor3d.scenegraph.hint.LightCombineMode;
import com.ardor3d.scenegraph.hint.TextureCombineMode;
import com.google.common.base.Predicate;
-import com.google.common.collect.Lists;
/**
* UIHud represents a "Heads Up Display" or the base of a game UI scenegraph. Various UI Input, dragging, events, etc.
@@ -109,7 +108,7 @@ public class UIHud extends Node {
/**
* List of hud listeners.
*/
- private final List<HudListener> _hudListeners = Lists.newArrayList();
+ private final List<HudListener> _hudListeners = new ArrayList<HudListener>();
/**
* An optional mouseManager, required in order to test mouse is grabbed.
@@ -119,7 +118,7 @@ public class UIHud extends Node {
/**
* The list of currently displayed popup menus, with each entry being a submenu of the one previous.
*/
- private final List<UIPopupMenu> _popupMenus = Lists.newArrayList();
+ private final List<UIPopupMenu> _popupMenus = new ArrayList<UIPopupMenu>();
/**
* Construct a new UIHud
diff --git a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/UISlider.java b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/UISlider.java
index 0cd086e..3fd04cc 100644
--- a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/UISlider.java
+++ b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/UISlider.java
@@ -10,13 +10,13 @@
package com.ardor3d.extension.ui;
+import java.util.ArrayList;
import java.util.List;
import com.ardor3d.extension.ui.event.ActionEvent;
import com.ardor3d.extension.ui.event.ActionListener;
import com.ardor3d.extension.ui.model.DefaultSliderModel;
import com.ardor3d.extension.ui.model.SliderModel;
-import com.google.common.collect.Lists;
/**
* A widget allowing display and control of a choice from a range of values.
@@ -33,7 +33,7 @@ public class UISlider extends UIContainer {
private final UISliderKnob _knob;
/** List of action listeners notified when this slider is changed. */
- private final List<ActionListener> _listeners = Lists.newArrayList();
+ private final List<ActionListener> _listeners = new ArrayList<ActionListener>();
/** The orientation of this slider knob. */
private final Orientation _orientation;
diff --git a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/layout/AnchorLayout.java b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/layout/AnchorLayout.java
index b136420..bf146c5 100644
--- a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/layout/AnchorLayout.java
+++ b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/layout/AnchorLayout.java
@@ -11,6 +11,7 @@
package com.ardor3d.extension.ui.layout;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
@@ -20,7 +21,6 @@ import com.ardor3d.extension.ui.util.Alignment;
import com.ardor3d.math.Rectangle2;
import com.ardor3d.math.Vector2;
import com.ardor3d.scenegraph.Spatial;
-import com.google.common.collect.Maps;
/**
* <p>
@@ -51,7 +51,7 @@ import com.google.common.collect.Maps;
public class AnchorLayout extends UILayout {
/** map used to track anchor relationship during layout. */
- private final Map<UIComponent, AnchorRecord> _records = Maps.newHashMap();
+ private final Map<UIComponent, AnchorRecord> _records = new HashMap<UIComponent, AnchorRecord>();
// Various min/max values set and used during a layout operation.
private int _maxX = 0;
diff --git a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/layout/RowLayout.java b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/layout/RowLayout.java
index 82fb762..29724f5 100644
--- a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/layout/RowLayout.java
+++ b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/layout/RowLayout.java
@@ -10,13 +10,13 @@
package com.ardor3d.extension.ui.layout;
+import java.util.ArrayList;
import java.util.List;
import com.ardor3d.extension.ui.UIComponent;
import com.ardor3d.extension.ui.UIContainer;
import com.ardor3d.math.Rectangle2;
import com.ardor3d.scenegraph.Spatial;
-import com.google.common.collect.Lists;
/**
* This layout places components in either a horizontal or vertical row, ordered as they are placed in their container.
@@ -94,8 +94,8 @@ public class RowLayout extends UILayout {
final Rectangle2 storeB = Rectangle2.fetchTempInstance();
// Grab a list of components, squeezing them down to their min size on the flow axis
- List<UIComponent> comps = Lists.newArrayList();
- List<UIComponent> compsBack = Lists.newArrayList();
+ List<UIComponent> comps = new ArrayList<UIComponent>();
+ List<UIComponent> compsBack = new ArrayList<UIComponent>();
for (int i = 0; i < content.size(); i++) {
final Spatial spat = content.get(i);
if (spat instanceof UIComponent) {
@@ -179,8 +179,8 @@ public class RowLayout extends UILayout {
final Rectangle2 rect = comp.getRelativeComponentBounds(storeA);
if (_horizontal) {
- comp.setLocalXY(x - rect.getX(), Math.max(container.getContentHeight() / 2 - rect.getHeight() / 2
- - rect.getY(), 0));
+ comp.setLocalXY(x - rect.getX(),
+ Math.max(container.getContentHeight() / 2 - rect.getHeight() / 2 - rect.getY(), 0));
x += rect.getWidth();
} else {
comp.setLocalXY(Math.max(container.getContentWidth() / 2 - rect.getWidth() / 2 - rect.getX(), 0), y
diff --git a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/model/DefaultComboBoxModel.java b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/model/DefaultComboBoxModel.java
index e2f4796..ffc3a1f 100644
--- a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/model/DefaultComboBoxModel.java
+++ b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/model/DefaultComboBoxModel.java
@@ -10,16 +10,15 @@
package com.ardor3d.extension.ui.model;
+import java.util.ArrayList;
import java.util.List;
-import com.google.common.collect.Lists;
-
/**
* Default implementation of a ComboBox model.
*/
public class DefaultComboBoxModel implements ComboBoxModel {
- protected List<ModelElement> _elements = Lists.newArrayList();
+ protected List<ModelElement> _elements = new ArrayList<ModelElement>();
public DefaultComboBoxModel() {}
diff --git a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/text/RenderedText.java b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/text/RenderedText.java
index ac75b7a..4250696 100644
--- a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/text/RenderedText.java
+++ b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/text/RenderedText.java
@@ -10,7 +10,9 @@
package com.ardor3d.extension.ui.text;
+import java.util.ArrayList;
import java.util.Collection;
+import java.util.LinkedList;
import java.util.List;
import com.ardor3d.math.Vector2;
@@ -21,12 +23,11 @@ import com.ardor3d.scenegraph.Renderable;
import com.ardor3d.scenegraph.Spatial;
import com.ardor3d.scenegraph.event.DirtyType;
import com.ardor3d.util.scenegraph.RenderDelegate;
-import com.google.common.collect.Lists;
public class RenderedText extends Node implements Renderable {
protected String _plainText = null;
- protected List<StyleSpan> _parsedStyles = Lists.newLinkedList();
+ protected List<StyleSpan> _parsedStyles = new LinkedList<StyleSpan>();
protected float _width;
protected float _height;
@@ -202,11 +203,11 @@ public class RenderedText extends Node implements Renderable {
}
public static class RenderedTextData {
- public List<Integer> _xStarts = Lists.newArrayList();
- public List<Integer> _lineHeights = Lists.newArrayList();
- public List<Integer> _lineEnds = Lists.newArrayList();
- public List<Integer> _fontHeights = Lists.newArrayList();
- public List<CharacterDescriptor> _characters = Lists.newArrayList();
+ public List<Integer> _xStarts = new ArrayList<Integer>();
+ public List<Integer> _lineHeights = new ArrayList<Integer>();
+ public List<Integer> _lineEnds = new ArrayList<Integer>();
+ public List<Integer> _fontHeights = new ArrayList<Integer>();
+ public List<CharacterDescriptor> _characters = new ArrayList<CharacterDescriptor>();
public RenderedTextData() {}
diff --git a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/text/TextFactory.java b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/text/TextFactory.java
index f187d57..dde688c 100644
--- a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/text/TextFactory.java
+++ b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/text/TextFactory.java
@@ -11,8 +11,10 @@
package com.ardor3d.extension.ui.text;
import java.nio.FloatBuffer;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
+import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
@@ -32,8 +34,6 @@ import com.ardor3d.renderer.state.TextureState;
import com.ardor3d.scenegraph.FloatBufferData;
import com.ardor3d.scenegraph.MeshData;
import com.google.common.collect.ArrayListMultimap;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
import com.google.common.collect.Multimap;
public enum TextFactory {
@@ -83,11 +83,11 @@ public enum TextFactory {
rVal.setStyled(styled);
// note: spans must be in order by start index
- final LinkedList<StyleSpan> spans = Lists.newLinkedList();
+ final LinkedList<StyleSpan> spans = new LinkedList<StyleSpan>();
final String plainText;
if (styled && _styleParser != null) {
// parse text for style spans
- final List<StyleSpan> styleStore = Lists.newArrayList();
+ final List<StyleSpan> styleStore = new ArrayList<StyleSpan>();
plainText = _styleParser.parseStyleSpans(text, styleStore);
Collections.sort(styleStore);
if (!styleStore.isEmpty()) {
@@ -110,7 +110,7 @@ public enum TextFactory {
textData.reset();
char prevChar = 0, c = 0;
- final List<StyleSpan> currentStyles = Lists.newLinkedList();
+ final List<StyleSpan> currentStyles = new LinkedList<StyleSpan>();
// indexed by character offset
final List<CharacterDescriptor> descs = textData._characters;
final List<Integer> descXStarts = textData._xStarts;
@@ -123,7 +123,7 @@ public enum TextFactory {
int maxLineHeight = 0, xOffset = 0, maxSizeHeight = 0;
UIFont prevFont = null;
double scale = 1, prevScale = 0;
- final Map<String, Object> stylesMap = Maps.newHashMap();
+ final Map<String, Object> stylesMap = new HashMap<String, Object>();
final char[] chars = plainText.toCharArray();
for (int i = 0; i < chars.length; i++) {
diff --git a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/text/TextSelection.java b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/text/TextSelection.java
index d305b1f..c770582 100644
--- a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/text/TextSelection.java
+++ b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/text/TextSelection.java
@@ -11,6 +11,7 @@
package com.ardor3d.extension.ui.text;
import java.nio.FloatBuffer;
+import java.util.ArrayList;
import java.util.List;
import com.ardor3d.extension.ui.UIComponent;
@@ -25,7 +26,6 @@ import com.ardor3d.renderer.state.BlendState.SourceFunction;
import com.ardor3d.scenegraph.Mesh;
import com.ardor3d.scenegraph.MeshData;
import com.ardor3d.util.geom.BufferUtils;
-import com.google.common.collect.Lists;
public abstract class TextSelection {
@@ -184,7 +184,7 @@ public abstract class TextSelection {
final RenderedTextData data = getTextData();
float xStart = 0, xEnd = 0, height = 0, yOffset = 0;
boolean exit = false;
- final List<Float> verts = Lists.newArrayList();
+ final List<Float> verts = new ArrayList<Float>();
for (int j = 0; !exit && j < data._lineEnds.size(); j++) {
height = data._lineHeights.get(j);
final int end = data._lineEnds.get(j);
diff --git a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/text/font/BMFontProvider.java b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/text/font/BMFontProvider.java
index 6e89361..dfe7ef9 100644
--- a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/text/font/BMFontProvider.java
+++ b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/text/font/BMFontProvider.java
@@ -12,6 +12,8 @@ package com.ardor3d.extension.ui.text.font;
import java.io.IOException;
import java.net.URL;
+import java.util.HashMap;
+import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.atomic.AtomicReference;
@@ -26,8 +28,6 @@ import com.ardor3d.ui.text.BMFont.Char;
import com.ardor3d.util.export.binary.BinaryImporter;
import com.ardor3d.util.resource.ResourceLocatorTool;
import com.ardor3d.util.resource.URLResourceSource;
-import com.google.common.collect.Maps;
-import com.google.common.collect.Sets;
/**
* Provides BMFonts for use in UIFont.
@@ -36,9 +36,9 @@ public class BMFontProvider implements FontProvider {
private static Logger logger = Logger.getLogger(BMFontProvider.class.getName());
- protected Map<UIFont, Integer> _scoreMap = Maps.newHashMap();
+ protected Map<UIFont, Integer> _scoreMap = new HashMap<UIFont, Integer>();
- protected final Set<FontInfo> _fonts = Sets.newHashSet();
+ protected final Set<FontInfo> _fonts = new HashSet<FontInfo>();
public void addFont(final String source, final String family, final int size, final boolean bold,
final boolean italic) {
@@ -128,7 +128,7 @@ public class BMFontProvider implements FontProvider {
}
}
- final Map<Character, CharacterDescriptor> descriptors = Maps.newHashMap();
+ final Map<Character, CharacterDescriptor> descriptors = new HashMap<Character, CharacterDescriptor>();
for (final int val : closest.bmFont.getMappedChars()) {
final Char c = closest.bmFont.getChar(val);
final CharacterDescriptor desc = new CharacterDescriptor(c.x, c.y, c.width, c.height, c.xadvance,
diff --git a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/text/font/UIFont.java b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/text/font/UIFont.java
index f0a191d..9de2ff4 100644
--- a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/text/font/UIFont.java
+++ b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/text/font/UIFont.java
@@ -10,19 +10,19 @@
package com.ardor3d.extension.ui.text.font;
+import java.util.HashMap;
import java.util.Map;
import com.ardor3d.extension.ui.text.CharacterDescriptor;
import com.ardor3d.image.Texture2D;
-import com.google.common.collect.Maps;
/**
* Defines a texture based font for use in the UI system.
*/
public class UIFont {
- private final Map<Character, CharacterDescriptor> _charDescriptors = Maps.newHashMap();
- private final Map<Character, Map<Character, Integer>> _kernMap = Maps.newHashMap();
+ private final Map<Character, CharacterDescriptor> _charDescriptors = new HashMap<Character, CharacterDescriptor>();
+ private final Map<Character, Map<Character, Integer>> _kernMap = new HashMap<Character, Map<Character, Integer>>();
private final Texture2D _fontTexture;
private final int _fontHeight;
private final int _fontSize;
@@ -59,7 +59,7 @@ public class UIFont {
public void addKerning(final char charA, final char charB, final int amount) {
Map<Character, Integer> map = _kernMap.get(charA);
if (map == null) {
- map = Maps.newHashMap();
+ map = new HashMap<Character, Integer>();
_kernMap.put(charA, map);
}
diff --git a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/text/parser/ForumLikeMarkupParser.java b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/text/parser/ForumLikeMarkupParser.java
index eb08795..7fd0629 100644
--- a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/text/parser/ForumLikeMarkupParser.java
+++ b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/text/parser/ForumLikeMarkupParser.java
@@ -10,6 +10,7 @@
package com.ardor3d.extension.ui.text.parser;
+import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Iterator;
@@ -21,7 +22,6 @@ import com.ardor3d.extension.ui.text.StyleConstants;
import com.ardor3d.extension.ui.text.StyleSpan;
import com.ardor3d.math.ColorRGBA;
import com.ardor3d.math.type.ReadOnlyColorRGBA;
-import com.google.common.collect.Lists;
public class ForumLikeMarkupParser implements StyleParser {
@@ -38,7 +38,7 @@ public class ForumLikeMarkupParser implements StyleParser {
int index = 0;
TagStatus tagStatus = TagStatus.NONE;
String currTagText = "";
- final LinkedList<StyleSpan> buildingSpans = Lists.newLinkedList();
+ final LinkedList<StyleSpan> buildingSpans = new LinkedList<StyleSpan>();
final StringTokenizer st = new StringTokenizer(text, "[]\\", true);
String token;
while (st.hasMoreTokens()) {
@@ -184,12 +184,12 @@ public class ForumLikeMarkupParser implements StyleParser {
}
// list of spans, sorted by start index
- final List<StyleSpan> starts = Lists.newArrayList();
+ final List<StyleSpan> starts = new ArrayList<StyleSpan>();
starts.addAll(spans);
Collections.sort(starts);
// list of spans, to be sorted by end index
- final List<StyleSpan> ends = Lists.newLinkedList();
+ final List<StyleSpan> ends = new LinkedList<StyleSpan>();
final StringBuilder builder = new StringBuilder();
diff --git a/ardor3d-ui/src/test/java/com/ardor3d/extension/ui/text/parser/ForumLikeMarkupParserTest.java b/ardor3d-ui/src/test/java/com/ardor3d/extension/ui/text/parser/ForumLikeMarkupParserTest.java
index ccd67cc..da890d9 100644
--- a/ardor3d-ui/src/test/java/com/ardor3d/extension/ui/text/parser/ForumLikeMarkupParserTest.java
+++ b/ardor3d-ui/src/test/java/com/ardor3d/extension/ui/text/parser/ForumLikeMarkupParserTest.java
@@ -10,9 +10,11 @@
package com.ardor3d.extension.ui.text.parser;
+import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.SortedSet;
+import java.util.TreeSet;
import org.junit.Assert;
import org.junit.Before;
@@ -20,8 +22,6 @@ import org.junit.Test;
import com.ardor3d.extension.ui.text.StyleConstants;
import com.ardor3d.extension.ui.text.StyleSpan;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Sets;
public class ForumLikeMarkupParserTest {
@@ -35,7 +35,7 @@ public class ForumLikeMarkupParserTest {
@Test
public void parseWithoutMarkup() {
final String text = "A text without any markup what so ever [13] dum di dum [/23]";
- final List<StyleSpan> spans = Lists.newArrayList();
+ final List<StyleSpan> spans = new ArrayList<StyleSpan>();
final String result = parser.parseStyleSpans(text, spans);
Assert.assertEquals(text, result);
@@ -46,7 +46,7 @@ public class ForumLikeMarkupParserTest {
@Test
public void parseWithSimpleStyle() throws Exception {
final String text = "A text with [size=30]simple markup[/size] dum di dum";
- final List<StyleSpan> spans = Lists.newArrayList();
+ final List<StyleSpan> spans = new ArrayList<StyleSpan>();
final String result = parser.parseStyleSpans(text, spans);
Assert.assertEquals("A text with simple markup dum di dum", result);
@@ -62,13 +62,13 @@ public class ForumLikeMarkupParserTest {
@Test
public void parseWithNestedStyle() throws Exception {
final String text = "A text [size=30]with [f=arial]simple markup[/f][/size] dum di dum";
- final List<StyleSpan> spans = Lists.newArrayList();
+ final List<StyleSpan> spans = new ArrayList<StyleSpan>();
final String result = parser.parseStyleSpans(text, spans);
Assert.assertEquals("A text with simple markup dum di dum", result);
Assert.assertEquals(2, spans.size());
- final SortedSet<StyleSpan> sortedSpans = Sets.newTreeSet(spans);
+ final SortedSet<StyleSpan> sortedSpans = new TreeSet<StyleSpan>(spans);
final Iterator<StyleSpan> spanIterator = sortedSpans.iterator();
final StyleSpan span1 = spanIterator.next();
Assert.assertEquals(7, span1.getSpanStart());
@@ -83,13 +83,13 @@ public class ForumLikeMarkupParserTest {
@Test
public void parseWithNestedSameStyleBackToBackTags() throws Exception {
final String text = "[size=10][size=20]A text [/size]with simple markup[/size] dum di dum";
- final List<StyleSpan> spans = Lists.newArrayList();
+ final List<StyleSpan> spans = new ArrayList<StyleSpan>();
final String result = parser.parseStyleSpans(text, spans);
Assert.assertEquals("A text with simple markup dum di dum", result);
Assert.assertEquals(2, spans.size());
- final SortedSet<StyleSpan> sortedSpans = Sets.newTreeSet(spans);
+ final SortedSet<StyleSpan> sortedSpans = new TreeSet<StyleSpan>(spans);
final Iterator<StyleSpan> spanIterator = sortedSpans.iterator();
final StyleSpan span1 = spanIterator.next();
Assert.assertEquals(0, span1.getSpanStart());