javax.vecmath.Vector3forg.terasology.math.geom.Vector3f



Project MovingBlocks/Terasology in file ...va.org.terasology.rendering.opengl.OpenGLMesh.java (2014-11-30)
@@ -17,11 +17,13 @@
 
 import com.bulletphysics.linearmath.Transform;
 import com.google.common.collect.Lists;
+
 import gnu.trove.iterator.TFloatIterator;
 import gnu.trove.iterator.TIntIterator;
 import gnu.trove.list.TFloatList;
 import gnu.trove.list.TIntList;
 import gnu.trove.list.array.TIntArrayList;
+
 import org.lwjgl.BufferUtils;
 import org.lwjgl.opengl.GL11;
 import org.lwjgl.opengl.GL13;
@@ -32,11 +34,11 @@
 import org.terasology.asset.AssetUri;
 import org.terasology.engine.subsystem.lwjgl.GLBufferPool;
 import org.terasology.math.AABB;
+import org.terasology.math.geom.Vector3f;
 import org.terasology.rendering.VertexBufferObjectUtil;
 import org.terasology.rendering.assets.mesh.Mesh;
 import org.terasology.rendering.assets.mesh.MeshData;
 
-import javax.vecmath.Vector3f;
 import java.nio.FloatBuffer;
 import java.nio.IntBuffer;
 import java.util.List;
@@ -203,7 +205,7 @@ public int addToBatch(Transform transform, Transform normalTransform, TFloatList
         int n = 0;
         int c = 0;
         for (int v = 0; v < data.getVertices().size(); v += VERTEX_SIZE) {
-            Vector3f vert = new Vector3f(data.getVertices().get(v), data.getVertices().get(v + 1), data.getVertices().get(v + 2));
+            javax.vecmath.Vector3f vert = new javax.vecmath.Vector3f(data.getVertices().get(v), data.getVertices().get(v + 1), data.getVertices().get(v + 2));
             transform.transform(vert);
             vertexData.add(vert.x);
             vertexData.add(vert.y);
@@ -214,7 +216,7 @@ public int addToBatch(Transform transform, Transform normalTransform, TFloatList
             for (int i = 0; i < TEX_COORD_1_SIZE; ++i) {
                 vertexData.add(data.getTexCoord1().get(uv2 + i));
             }
-            Vector3f norm = new Vector3f(data.getNormals().get(n), data.getNormals().get(n + 1), data.getNormals().get(n + 2));
+            javax.vecmath.Vector3f norm = new javax.vecmath.Vector3f(data.getNormals().get(n), data.getNormals().get(n + 1), data.getNormals().get(n + 2));
             normalTransform.transform(norm);
             vertexData.add(norm.x);
             vertexData.add(norm.y);
Project MovingBlocks/Terasology in file ...ne.src.main.java.org.terasology.math.Vector3i.java (2014-11-30)
@@ -15,8 +15,9 @@
  */
 package org.terasology.math;
 
-import javax.vecmath.Vector3d;
-import javax.vecmath.Vector3f;
+import org.terasology.math.geom.Vector3d;
+import org.terasology.math.geom.Vector3f;
+
 import java.io.Serializable;
 
 /**
@@ -24,7 +25,7 @@
  *
  * @author Immortius <immortius@gmail.com>
  */
-public class Vector3i extends javax.vecmath.Vector3i implements Serializable {
+public class Vector3i extends org.terasology.math.geom.Vector3i implements Serializable {
     private static final long serialVersionUID = -1965792038041767639L;
 
     /**
Project MovingBlocks/Terasology in file ...g.terasology.logic.inventory.ItemPickupSystem.java (2014-11-30)
@@ -17,6 +17,7 @@
 package org.terasology.logic.inventory;
 
 import com.bulletphysics.collision.shapes.BoxShape;
+
 import org.terasology.asset.Assets;
 import org.terasology.audio.events.PlaySoundForOwnerEvent;
 import org.terasology.entitySystem.entity.EntityBuilder;
@@ -26,6 +27,8 @@
 import org.terasology.entitySystem.systems.RegisterMode;
 import org.terasology.entitySystem.systems.RegisterSystem;
 import org.terasology.logic.inventory.events.ItemDroppedEvent;
+import org.terasology.math.VecMath;
+import org.terasology.math.geom.Vector3f;
 import org.terasology.physics.components.RigidBodyComponent;
 import org.terasology.physics.events.CollideEvent;
 import org.terasology.physics.shapes.BoxShapeComponent;
@@ -38,8 +41,6 @@
 import org.terasology.world.block.family.BlockFamily;
 import org.terasology.world.block.items.BlockItemComponent;
 
-import javax.vecmath.Vector3f;
-
 
 @RegisterSystem(RegisterMode.AUTHORITY)
 public class ItemPickupSystem extends BaseComponentSystem {
@@ -70,12 +71,12 @@ public void onBlockItemDropped(ItemDroppedEvent event, EntityRef itemEntity, Blo
             mesh.material = Assets.getMaterial("engine:terrain");
         }
         if (blockFamily.getArchetypeBlock().getCollisionShape() instanceof BoxShape && builder.hasComponent(BoxShapeComponent.class)) {
-            Vector3f extents = ((BoxShape) blockFamily.getArchetypeBlock().getCollisionShape()).getHalfExtentsWithoutMargin(new Vector3f());
+            javax.vecmath.Vector3f extents = ((BoxShape) blockFamily.getArchetypeBlock().getCollisionShape()).getHalfExtentsWithoutMargin(new javax.vecmath.Vector3f());
             extents.scale(2.0f);
             extents.x = Math.max(extents.x, 0.5f);
             extents.y = Math.max(extents.y, 0.5f);
             extents.z = Math.max(extents.z, 0.5f);
-            builder.getComponent(BoxShapeComponent.class).extents.set(extents);
+            builder.getComponent(BoxShapeComponent.class).extents.set(VecMath.from(extents));
         }
         if (blockFamily.getArchetypeBlock().getLuminance() > 0 && !builder.hasComponent(LightComponent.class)) {
             LightComponent lightComponent = builder.addComponent(new LightComponent());
Project MovingBlocks/Terasology in file ...erasology.physics.engine.PhysicsLiquidWrapper.java (2014-11-30)
@@ -18,12 +18,13 @@
 import com.bulletphysics.collision.shapes.CollisionShape;
 import com.bulletphysics.collision.shapes.voxel.VoxelInfo;
 import com.bulletphysics.collision.shapes.voxel.VoxelPhysicsWorld;
+
+import org.terasology.math.VecMath;
 import org.terasology.math.Vector3i;
+import org.terasology.math.geom.Vector3f;
 import org.terasology.world.WorldProvider;
 import org.terasology.world.block.Block;
 
-import javax.vecmath.Vector3f;
-
 /**
  * @author Immortius
  */
@@ -76,8 +77,8 @@ public CollisionShape getCollisionShape() {
         }
 
         @Override
-        public Vector3f getCollisionOffset() {
-            return offset;
+        public javax.vecmath.Vector3f getCollisionOffset() {
+            return VecMath.to(offset);
         }
 
         @Override
Project MovingBlocks/Terasology in file ...terasology.physics.engine.PhysicsWorldWrapper.java (2014-11-30)
@@ -19,12 +19,13 @@
 import com.bulletphysics.collision.shapes.CollisionShape;
 import com.bulletphysics.collision.shapes.voxel.VoxelInfo;
 import com.bulletphysics.collision.shapes.voxel.VoxelPhysicsWorld;
+
+import org.terasology.math.VecMath;
 import org.terasology.math.Vector3i;
+import org.terasology.math.geom.Vector3f;
 import org.terasology.world.WorldProvider;
 import org.terasology.world.block.Block;
 
-import javax.vecmath.Vector3f;
-
 /**
  * This class links Terasology's voxel world with the physics engine, providing it with the collision information for each block location.
  *
@@ -80,8 +81,8 @@ public CollisionShape getCollisionShape() {
         }
 
         @Override
-        public Vector3f getCollisionOffset() {
-            return offset;
+        public javax.vecmath.Vector3f getCollisionOffset() {
+            return VecMath.to(offset);
         }
 
         @Override