Made the math classes (most of them) java.io.Serializable

since it's harmless and makes these math classes more useful
as general data structures.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7860 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
PSp..om 14 years ago
parent dd5d56ab42
commit bb18399b6d
  1. 4
      engine/src/core/com/jme3/math/ColorRGBA.java
  2. 5
      engine/src/core/com/jme3/math/Eigen3f.java
  3. 4
      engine/src/core/com/jme3/math/Line.java
  4. 4
      engine/src/core/com/jme3/math/LineSegment.java
  5. 4
      engine/src/core/com/jme3/math/Matrix3f.java
  6. 4
      engine/src/core/com/jme3/math/Matrix4f.java
  7. 4
      engine/src/core/com/jme3/math/Plane.java
  8. 4
      engine/src/core/com/jme3/math/Quaternion.java
  9. 4
      engine/src/core/com/jme3/math/Ray.java
  10. 4
      engine/src/core/com/jme3/math/Rectangle.java
  11. 4
      engine/src/core/com/jme3/math/Ring.java
  12. 4
      engine/src/core/com/jme3/math/Transform.java
  13. 4
      engine/src/core/com/jme3/math/Triangle.java
  14. 4
      engine/src/core/com/jme3/math/Vector2f.java
  15. 4
      engine/src/core/com/jme3/math/Vector3f.java
  16. 4
      engine/src/core/com/jme3/math/Vector4f.java

@ -54,7 +54,9 @@ import java.io.IOException;
* @author Mark Powell
* @version $Id: ColorRGBA.java,v 1.29 2007/09/09 18:25:14 irrisor Exp $
*/
public final class ColorRGBA implements Savable, Cloneable {
public final class ColorRGBA implements Savable, Cloneable, java.io.Serializable {
static final long serialVersionUID = 1;
/**
* the color black (0,0,0).

@ -35,7 +35,10 @@ package com.jme3.math;
import java.util.logging.Level;
import java.util.logging.Logger;
public class Eigen3f {
public class Eigen3f implements java.io.Serializable {
static final long serialVersionUID = 1;
private static final Logger logger = Logger.getLogger(Eigen3f.class
.getName());

@ -48,7 +48,9 @@ import java.nio.FloatBuffer;
* @author Mark Powell
* @author Joshua Slack
*/
public class Line implements Savable, Cloneable {
public class Line implements Savable, Cloneable, java.io.Serializable {
static final long serialVersionUID = 1;
private Vector3f origin;
private Vector3f direction;

@ -53,7 +53,9 @@ import java.io.IOException;
* @author Mark Powell
* @author Joshua Slack
*/
public class LineSegment implements Cloneable, Savable {
public class LineSegment implements Cloneable, Savable, java.io.Serializable {
static final long serialVersionUID = 1;
private Vector3f origin;
private Vector3f direction;

@ -51,7 +51,9 @@ import java.util.logging.Logger;
* @author Mark Powell
* @author Joshua Slack
*/
public final class Matrix3f implements Savable, Cloneable {
public final class Matrix3f implements Savable, Cloneable, java.io.Serializable {
static final long serialVersionUID = 1;
private static final Logger logger = Logger.getLogger(Matrix3f.class.getName());
protected float m00, m01, m02;

@ -57,7 +57,9 @@ import java.util.logging.Logger;
* @author Mark Powell
* @author Joshua Slack
*/
public final class Matrix4f implements Savable, Cloneable {
public final class Matrix4f implements Savable, Cloneable, java.io.Serializable {
static final long serialVersionUID = 1;
private static final Logger logger = Logger.getLogger(Matrix4f.class.getName());
public float m00, m01, m02, m03;

@ -49,7 +49,9 @@ import java.util.logging.Logger;
* @author Mark Powell
* @author Joshua Slack
*/
public class Plane implements Savable, Cloneable {
public class Plane implements Savable, Cloneable, java.io.Serializable {
static final long serialVersionUID = 1;
private static final Logger logger = Logger
.getLogger(Plane.class.getName());

@ -56,7 +56,9 @@ import java.util.logging.Logger;
* @author Mark Powell
* @author Joshua Slack
*/
public final class Quaternion implements Savable, Cloneable {
public final class Quaternion implements Savable, Cloneable, java.io.Serializable {
static final long serialVersionUID = 1;
private static final Logger logger = Logger.getLogger(Quaternion.class.getName());
/**

@ -52,7 +52,9 @@ import java.io.IOException;
* @author Mark Powell
* @author Joshua Slack
*/
public final class Ray implements Savable, Cloneable, Collidable {
public final class Ray implements Savable, Cloneable, Collidable, java.io.Serializable {
static final long serialVersionUID = 1;
//todo: merge with Line?
/** The ray's begining point. */

@ -50,7 +50,9 @@ import java.io.IOException;
* @author Joshua Slack
*/
public final class Rectangle implements Savable, Cloneable {
public final class Rectangle implements Savable, Cloneable, java.io.Serializable {
static final long serialVersionUID = 1;
private Vector3f a, b, c;

@ -49,7 +49,9 @@ import java.io.IOException;
* @author Joshua Slack
*/
public final class Ring implements Savable, Cloneable {
public final class Ring implements Savable, Cloneable, java.io.Serializable {
static final long serialVersionUID = 1;
private Vector3f center, up;
private float innerRadius, outerRadius;

@ -46,7 +46,9 @@ import java.io.IOException;
* @author Jack Lindamood
* @author Joshua Slack
*/
public final class Transform implements Savable, Cloneable {
public final class Transform implements Savable, Cloneable, java.io.Serializable {
static final long serialVersionUID = 1;
public static final Transform IDENTITY = new Transform();

@ -44,7 +44,9 @@ import java.io.IOException;
* @author Mark Powell
* @author Joshua Slack
*/
public class Triangle extends AbstractTriangle implements Savable {
public class Triangle extends AbstractTriangle implements Savable, java.io.Serializable {
static final long serialVersionUID = 1;
private Vector3f pointa = new Vector3f();
private Vector3f pointb = new Vector3f();

@ -49,7 +49,9 @@ import java.util.logging.Logger;
* @author Mark Powell
* @author Joshua Slack
*/
public final class Vector2f implements Savable, Cloneable {
public final class Vector2f implements Savable, Cloneable, java.io.Serializable {
static final long serialVersionUID = 1;
private static final Logger logger = Logger.getLogger(Vector2f.class.getName());
public static final Vector2f ZERO = new Vector2f(0f, 0f);

@ -53,8 +53,10 @@ import java.util.logging.Logger;
* @author Mark Powell
* @author Joshua Slack
*/
public final class Vector3f implements Savable, Cloneable {
public final class Vector3f implements Savable, Cloneable, java.io.Serializable {
static final long serialVersionUID = 1;
private static final Logger logger = Logger.getLogger(Vector3f.class.getName());
public final static Vector3f ZERO = new Vector3f(0, 0, 0);

@ -48,7 +48,9 @@ import java.util.logging.Logger;
*
* @author Maarten Steur
*/
public final class Vector4f implements Savable, Cloneable {
public final class Vector4f implements Savable, Cloneable, java.io.Serializable {
static final long serialVersionUID = 1;
private static final Logger logger = Logger.getLogger(Vector4f.class.getName());

Loading…
Cancel
Save