• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Main repository of MikuMikuStudio


Commit MetaInfo

Révision551dea7e675447776117347eaa425a5ab3978475 (tree)
l'heure2003-09-04 03:05:36
Auteurmojomonkey <mojomonkey@75d0...>
Commitermojomonkey

Message de Log

Removed Vector3f and replaced with Vector

git-svn-id: http://jmonkeyengine.googlecode.com/svn/trunk@75 75d07b2b-3a1a-0410-a2c5-0572b91ccdca

Change Summary

Modification

--- a/src/jme/controller/AbstractGameController.java
+++ b/src/jme/controller/AbstractGameController.java
@@ -48,7 +48,7 @@ import org.lwjgl.input.Mouse;
4848 * <code>EntityController</code>.
4949 *
5050 * @author Mark Powell
51- * @version 0.1.0
51+ * @version $Id: AbstractGameController.java,v 1.3 2003-09-03 18:05:36 mojomonkey Exp $
5252 */
5353 public abstract class AbstractGameController
5454 implements KeyboardController, MouseController, EntityController {
@@ -187,7 +187,7 @@ public abstract class AbstractGameController
187187 }
188188
189189 /**
190- * @see jme.controller.EntityController#setEntityPosition(Vector3f)
190+ * @see jme.controller.EntityController#setEntityPosition(Vector)
191191 */
192192 public void setEntityPosition(Vector position) {
193193 entity.setPosition(position);
--- a/src/jme/entity/effects/Particle.java
+++ b/src/jme/entity/effects/Particle.java
@@ -32,7 +32,7 @@
3232
3333 package jme.entity.effects;
3434
35-import org.lwjgl.vector.Vector3f;
35+import jme.math.Vector;
3636
3737 /**
3838 * <code>Particle</code> represents a single particle that is part of a larger
@@ -42,7 +42,7 @@ import org.lwjgl.vector.Vector3f;
4242 *
4343 *
4444 * @author Mark Powell
45- * @version 1
45+ * @version $Id: Particle.java,v 1.2 2003-09-03 18:05:36 mojomonkey Exp $
4646 */
4747 public class Particle {
4848
@@ -60,29 +60,29 @@ public class Particle {
6060 /**
6161 * the color of the particle in RGB format.
6262 */
63- public Vector3f color;
63+ public Vector color;
6464 /**
6565 * the location in 3D space of the particle.
6666 */
67- public Vector3f position;
67+ public Vector position;
6868 /**
6969 * the direction the particle is traveling in.
7070 */
71- public Vector3f velocity;
71+ public Vector velocity;
7272 /**
7373 * the size of the particle.
7474 */
75- public Vector3f size;
75+ public Vector size;
7676
7777 /**
7878 * Constructor instantiates a new <code>Particle</code> and
7979 * initializes all the variables.
8080 */
8181 public Particle() {
82- color = new Vector3f();
83- position = new Vector3f();
84- velocity = new Vector3f();
85- size = new Vector3f();
82+ color = new Vector();
83+ position = new Vector();
84+ velocity = new Vector();
85+ size = new Vector();
8686 }
8787
8888 public String toString() {
--- a/src/jme/entity/effects/ParticleEmitter.java
+++ b/src/jme/entity/effects/ParticleEmitter.java
@@ -37,8 +37,8 @@ import java.nio.ByteOrder;
3737 import java.nio.FloatBuffer;
3838
3939 import org.lwjgl.opengl.GL;
40-import org.lwjgl.vector.Vector3f;
4140
41+import jme.math.Vector;
4242 import jme.texture.TextureManager;
4343
4444 /**
@@ -59,7 +59,7 @@ import jme.texture.TextureManager;
5959 * the desired direction. This adds realism to the particle emitter.
6060 *
6161 * @author Mark Powell
62- * @version 1
62+ * @version $Id: ParticleEmitter.java,v 1.3 2003-09-03 18:05:36 mojomonkey Exp $
6363 */
6464 public class ParticleEmitter {
6565
@@ -71,8 +71,8 @@ public class ParticleEmitter {
7171 private int texId;
7272
7373 //attributes for positional updates.
74- private Vector3f gravity;
75- private Vector3f position;
74+ private Vector gravity;
75+ private Vector position;
7676 private float speed;
7777 private float friction;
7878
@@ -80,10 +80,10 @@ public class ParticleEmitter {
8080 private float fade;
8181
8282 //attribute for the particles appearance.
83- private Vector3f startSize;
84- private Vector3f endSize;
85- private Vector3f startColor;
86- private Vector3f endColor;
83+ private Vector startSize;
84+ private Vector endSize;
85+ private Vector startColor;
86+ private Vector endColor;
8787
8888 private boolean isLooping = false;
8989 private boolean isFirst = true;
@@ -94,9 +94,9 @@ public class ParticleEmitter {
9494 //objects attributes than create a new one.
9595 private float[] matrix;
9696 private FloatBuffer buf;
97- private Vector3f right;
98- private Vector3f up;
99- private Vector3f billboard;
97+ private Vector right;
98+ private Vector up;
99+ private Vector billboard;
100100
101101 /**
102102 * Constructor instantiates a new <code>ParticleEmitter</code>
@@ -110,12 +110,12 @@ public class ParticleEmitter {
110110 this.numParticles = numParticles;
111111 particles = new Particle[numParticles];
112112
113- startSize = new Vector3f();
114- endSize = new Vector3f();
115- startColor = new Vector3f();
116- endColor = new Vector3f();
117- gravity = new Vector3f();
118- position = new Vector3f();
113+ startSize = new Vector();
114+ endSize = new Vector();
115+ startColor = new Vector();
116+ endColor = new Vector();
117+ gravity = new Vector();
118+ position = new Vector();
119119 speed = 1.0f;
120120 matrix = new float[16];
121121 buf =
@@ -123,9 +123,9 @@ public class ParticleEmitter {
123123 .allocateDirect(16 * 4)
124124 .order(ByteOrder.nativeOrder())
125125 .asFloatBuffer();
126- right = new Vector3f();
127- up = new Vector3f();
128- billboard = new Vector3f();
126+ right = new Vector();
127+ up = new Vector();
128+ billboard = new Vector();
129129
130130 for (int i = 0; i < numParticles; i++) {
131131 particles[i] = new Particle();
@@ -312,7 +312,7 @@ public class ParticleEmitter {
312312 * start color.
313313 * @param endColor the final color of the particle.
314314 */
315- public void setEndColor(Vector3f endColor) {
315+ public void setEndColor(Vector endColor) {
316316 this.endColor = endColor;
317317 }
318318
@@ -322,7 +322,7 @@ public class ParticleEmitter {
322322 * start size.
323323 * @param endSize the final size of the particle.
324324 */
325- public void setEndSize(Vector3f endSize) {
325+ public void setEndSize(Vector endSize) {
326326 this.endSize = endSize;
327327 }
328328
@@ -332,7 +332,7 @@ public class ParticleEmitter {
332332 * the direction of the particles velocity.
333333 * @param gravity the forces that will be acting on the particle.
334334 */
335- public void setGravity(Vector3f gravity) {
335+ public void setGravity(Vector gravity) {
336336 this.gravity = gravity;
337337 }
338338
@@ -342,7 +342,7 @@ public class ParticleEmitter {
342342 * color.
343343 * @param startColor the starting color of the particles.
344344 */
345- public void setStartColor(Vector3f startColor) {
345+ public void setStartColor(Vector startColor) {
346346 this.startColor = startColor;
347347 }
348348
@@ -351,7 +351,7 @@ public class ParticleEmitter {
351351 * particle. This size is interpolated with the final size.
352352 * @param startSize the starting size of the particles.
353353 */
354- public void setStartSize(Vector3f startSize) {
354+ public void setStartSize(Vector startSize) {
355355 this.startSize = startSize;
356356 }
357357
@@ -372,7 +372,7 @@ public class ParticleEmitter {
372372 * generated.
373373 * @param position
374374 */
375- public void setPosition(Vector3f position) {
375+ public void setPosition(Vector position) {
376376 this.position = position;
377377 }
378378
--- a/src/jme/entity/effects/ParticleSystem.java
+++ b/src/jme/entity/effects/ParticleSystem.java
@@ -35,27 +35,27 @@ package jme.entity.effects;
3535 import java.util.ArrayList;
3636
3737 import org.lwjgl.opengl.GL;
38-import org.lwjgl.vector.Vector3f;
3938
4039 import jme.entity.EntityInterface;
4140 import jme.entity.camera.Frustum;
4241 import jme.geometry.bounding.BoundingVolume;
42+import jme.math.Vector;
4343
4444 /**
4545 * <code>ParticleSystem</code> maintains a collection of
4646 * particle emitters.
4747 *
4848 * @author Mark Powell
49- * @version $Id: ParticleSystem.java,v 1.4 2003-09-03 16:20:52 mojomonkey Exp $
49+ * @version $Id: ParticleSystem.java,v 1.5 2003-09-03 18:05:36 mojomonkey Exp $
5050 */
5151 public class ParticleSystem implements EntityInterface {
5252 private ArrayList emitters;
53- private Vector3f position;
53+ private Vector position;
5454 private BoundingVolume boundingVolume;
5555
5656 public ParticleSystem() {
5757 emitters = new ArrayList();
58- position = new Vector3f();
58+ position = new Vector();
5959 }
6060
6161 /* (non-Javadoc)
@@ -90,7 +90,7 @@ public class ParticleSystem implements EntityInterface {
9090 emitters.add(emitter);
9191 }
9292
93- public void setPosition(Vector3f position) {
93+ public void setPosition(Vector position) {
9494 this.position = position;
9595 }
9696
--- a/src/jme/geometry/hud/AbstractComponent.java
+++ b/src/jme/geometry/hud/AbstractComponent.java
@@ -33,7 +33,7 @@ package jme.geometry.hud;
3333
3434 import java.util.ArrayList;
3535
36-import org.lwjgl.vector.Vector3f;
36+import jme.math.Vector;
3737
3838 /**
3939 * <code>AbstractComponent</code> defines a base level of implementation of the
@@ -47,7 +47,7 @@ public abstract class AbstractComponent implements Component {
4747 protected int locationY;
4848 protected float height;
4949 protected float width;
50- protected Vector3f color = new Vector3f(1,1,1);
50+ protected Vector color = new Vector(1,1,1);
5151 protected float alpha;
5252
5353 protected ArrayList children = new ArrayList();
--- a/src/jme/geometry/model/Vertex.java
+++ b/src/jme/geometry/model/Vertex.java
@@ -31,15 +31,16 @@
3131 */
3232 package jme.geometry.model;
3333
34-import org.lwjgl.vector.Vector3f;
34+import jme.math.Vector;
35+
3536
3637 /**
37- * <code>Vertex</code> provides an extension to <code>Vector3f</code> to handle
38+ * <code>Vertex</code> provides an extension to <code>Vector</code> to handle
3839 * texture coordinates as well as positions.
3940 *
4041 * @author Mark Powell
4142 */
42-public class Vertex extends Vector3f {
43+public class Vertex extends Vector {
4344 public byte refCount;
4445
4546 public byte flags;
--- a/src/jme/geometry/primitive/Quad.java
+++ b/src/jme/geometry/primitive/Quad.java
@@ -43,7 +43,7 @@ import org.lwjgl.opengl.GL;
4343 /**
4444 * <code>Quad</code> handles the rendering of a single quad shape. This
4545 * quad shape is defined by four points and maintained in an array of
46- * four <code>Vector3f</code> values. The ordering of the array is important
46+ * four <code>Vector</code> values. The ordering of the array is important
4747 * as each index represents a corner of the quad.
4848 *
4949 * <br><br>
@@ -53,7 +53,7 @@ import org.lwjgl.opengl.GL;
5353 * 3 - BottomLeft<br>
5454 *
5555 * @author Mark Powell
56- * @version $Id: Quad.java,v 1.5 2003-09-03 16:20:51 mojomonkey Exp $
56+ * @version $Id: Quad.java,v 1.6 2003-09-03 18:05:36 mojomonkey Exp $
5757 */
5858 public class Quad extends Primitive {
5959 private GL gl;
--- a/src/jme/lighting/AbstractLightMap.java
+++ b/src/jme/lighting/AbstractLightMap.java
@@ -33,8 +33,8 @@
3333 package jme.lighting;
3434
3535 import jme.exception.MonkeyRuntimeException;
36+import jme.math.Vector;
3637
37-import org.lwjgl.vector.Vector3f;
3838
3939 /**
4040 * <code>AbstractLightMap</code> manages a data structure that contains
@@ -48,7 +48,7 @@ import org.lwjgl.vector.Vector3f;
4848 * may be (1,1,1), but a Mars terrain would be something like (1,0.4,0.7).
4949 *
5050 * @author Mark Powell
51- * @version 0.1.0
51+ * @version $Id: AbstractLightMap.java,v 1.2 2003-09-03 18:05:36 mojomonkey Exp $
5252 */
5353 public abstract class AbstractLightMap {
5454
@@ -60,7 +60,7 @@ public abstract class AbstractLightMap {
6060 /**
6161 * the vector that defines the color the light is casting.
6262 */
63- protected Vector3f color;
63+ protected Vector color;
6464
6565 /**
6666 * <code>getShade</code> returns the shade value for the
@@ -78,7 +78,7 @@ public abstract class AbstractLightMap {
7878 * <code>getColor</code> returns the color vector of the lightmap.
7979 * @return the color vector of the lightmap.
8080 */
81- public Vector3f getColor() {
81+ public Vector getColor() {
8282 return color;
8383 }
8484
@@ -87,7 +87,7 @@ public abstract class AbstractLightMap {
8787 * @param color the new color for the lightmap.
8888 * @throws MonkeyRuntimeException if color is null.
8989 */
90- public void setColor(Vector3f color) {
90+ public void setColor(Vector color) {
9191 if(null == color) {
9292 throw new MonkeyRuntimeException("Color cannot be null");
9393 }
--- a/src/jme/lighting/SlopeLighting.java
+++ b/src/jme/lighting/SlopeLighting.java
@@ -32,10 +32,10 @@
3232
3333 package jme.lighting;
3434
35-import org.lwjgl.vector.Vector3f;
3635
3736 import jme.exception.MonkeyRuntimeException;
3837 import jme.locale.external.data.AbstractHeightMap;
38+import jme.math.Vector;
3939
4040 /**
4141 * <code>SlopeLighting</code> creates a light map based on a given heightmap.
@@ -46,7 +46,7 @@ import jme.locale.external.data.AbstractHeightMap;
4646 * can be combinations of 1 and -2. I.e. 1,1 1,-1 -1,-1 -1,1.
4747 *
4848 * @author Mark Powell
49- * @version 0.1.0
49+ * @version $Id: SlopeLighting.java,v 1.3 2003-09-03 18:05:36 mojomonkey Exp $
5050 */
5151 public class SlopeLighting extends AbstractLightMap {
5252
@@ -100,7 +100,7 @@ public class SlopeLighting extends AbstractLightMap {
100100 this.softness = softness;
101101 this.heightMap = heightMap;
102102
103- color = new Vector3f(1.0f, 1.0f, 1.0f);
103+ color = new Vector(1.0f, 1.0f, 1.0f);
104104
105105 createLighting();
106106 }
--- a/src/jme/locale/SimpleLocale.java
+++ b/src/jme/locale/SimpleLocale.java
@@ -35,11 +35,11 @@ package jme.locale;
3535 import java.util.logging.Level;
3636
3737 import jme.exception.MonkeyRuntimeException;
38+import jme.math.Vector;
3839 import jme.texture.TextureManager;
3940 import jme.utility.LoggingSystem;
4041
4142 import org.lwjgl.opengl.GL;
42-import org.lwjgl.vector.Vector3f;
4343
4444 /**
4545 * <code>SimpleLocale</code> defines a simple Locale. This locale is a single
@@ -55,7 +55,7 @@ import org.lwjgl.vector.Vector3f;
5555 public class SimpleLocale implements Locale {
5656
5757 //Coordinates of locale.
58- private Vector3f center;
58+ private Vector center;
5959 private float halfLength;
6060
6161 //material properties of the locale.
@@ -77,7 +77,7 @@ public class SimpleLocale implements Locale {
7777 * @throws MonkeyRuntimeException if center is null or length is less than
7878 * or equal to zero.
7979 */
80- public SimpleLocale(Vector3f center, float length) {
80+ public SimpleLocale(Vector center, float length) {
8181
8282 if (null == center || length <= 0) {
8383 throw new MonkeyRuntimeException(
@@ -166,7 +166,7 @@ public class SimpleLocale implements Locale {
166166 * <code>getCenter</code> returns the center of the locale.
167167 * @return the center of the locale.
168168 */
169- public Vector3f getCenter() {
169+ public Vector getCenter() {
170170 return center;
171171 }
172172
@@ -182,7 +182,7 @@ public class SimpleLocale implements Locale {
182182 * <code>setCenter</code> sets the center of the locale.
183183 * @param center the new center of the locale.
184184 */
185- public void setCenter(Vector3f center) {
185+ public void setCenter(Vector center) {
186186 this.center = center;
187187 }
188188
--- a/src/test/general/TestParticleSystem.java
+++ b/src/test/general/TestParticleSystem.java
@@ -32,15 +32,16 @@
3232 package test.general;
3333
3434
35+
3536 import org.lwjgl.Display;
3637 import org.lwjgl.opengl.GL;
3738 import org.lwjgl.opengl.GLU;
3839 import org.lwjgl.opengl.Window;
39-import org.lwjgl.vector.Vector3f;
4040
4141 import jme.AbstractGame;
4242 import jme.entity.effects.ParticleEmitter;
4343 import jme.entity.effects.ParticleSystem;
44+import jme.math.Vector;
4445 import jme.system.DisplaySystem;
4546 import jme.utility.Timer;
4647
@@ -87,20 +88,20 @@ public class TestParticleSystem extends AbstractGame {
8788 timer = Timer.getTimer();
8889
8990 ParticleEmitter pe = new ParticleEmitter(1000);
90- pe.setStartColor(new Vector3f(1.0f,1.0f,1.0f));
91- pe.setEndColor(new Vector3f(1.0f,1.0f,1.0f));
92- pe.setStartSize(new Vector3f(0.25f,1.0f,0.25f));
93- pe.setEndSize(new Vector3f(0.25f,1.0f,0.25f));
91+ pe.setStartColor(new Vector(1.0f,1.0f,1.0f));
92+ pe.setEndColor(new Vector(1.0f,1.0f,1.0f));
93+ pe.setStartSize(new Vector(0.25f,1.0f,0.25f));
94+ pe.setEndSize(new Vector(0.25f,1.0f,0.25f));
9495 pe.setFade(0.01f);
9596 pe.setSpeed(1);
96- pe.setGravity(new Vector3f(0.0f,-100.0f,10.0f));
97+ pe.setGravity(new Vector(0.0f,-100.0f,10.0f));
9798 pe.setFriction(1);
9899 pe.setTexture("data/texture/star.png");
99100 pe.loopAnimation(true);
100101
101102 ps = new ParticleSystem();
102103 ps.addEmitter(pe);
103- ps.setPosition(new Vector3f(0,100,-10));
104+ ps.setPosition(new Vector(0,100,-10));
104105 }
105106
106107 protected void reinit() {