Project

General

Profile

« Previous | Next » 

Revision bff329fb

Added by Leszek Koltunski over 3 years ago

Copy constructors for the Statics.

View differences:

src/main/java/org/distorted/library/effect/MatrixEffectQuaternion.java
30 30
 */
31 31
public class MatrixEffectQuaternion extends MatrixEffect
32 32
  {
33
  private Data4D mQuaternion;
34
  private Data3D mCenter;
33
  private final Data4D mQuaternion;
34
  private final Data3D mCenter;
35 35

  
36
  private static float[] mTmpMatrix1 = new float[16];
37
  private static float[] mTmpMatrix2 = new float[16];
36
  private static final float[] mTmpMatrix1 = new float[16];
37
  private static final float[] mTmpMatrix2 = new float[16];
38 38

  
39 39
///////////////////////////////////////////////////////////////////////////////////////////////////
40 40
/**
src/main/java/org/distorted/library/type/Static1D.java
42 42
    x = ox;
43 43
    }
44 44

  
45
///////////////////////////////////////////////////////////////////////////////////////////////////
46
/**
47
 * Copy constructor.
48
 */
49
  public Static1D(Static1D sta)
50
    {
51
    super(1);
52
    x = sta.x;
53
    }
54

  
45 55
///////////////////////////////////////////////////////////////////////////////////////////////////
46 56
/**
47 57
 * Resets the value of the single float.
src/main/java/org/distorted/library/type/Static2D.java
44 44
    y = oy;
45 45
    }
46 46

  
47
///////////////////////////////////////////////////////////////////////////////////////////////////
48
/**
49
 * Copy constructor.
50
 */
51
  public Static2D(Static2D sta)
52
    {
53
    super(2);
54
    x = sta.x;
55
    y = sta.y;
56
    }
57

  
47 58
///////////////////////////////////////////////////////////////////////////////////////////////////
48 59
/**
49 60
 * Reset the value of the floats to (ox,oy).
src/main/java/org/distorted/library/type/Static3D.java
46 46
    z = vz;
47 47
    }
48 48

  
49
///////////////////////////////////////////////////////////////////////////////////////////////////
50
/**
51
 * Copy constructor.
52
 */
53
  public Static3D(Static3D sta)
54
    {
55
    super(3);
56
    x = sta.x;
57
    y = sta.y;
58
    z = sta.z;
59
    }
60

  
49 61
///////////////////////////////////////////////////////////////////////////////////////////////////
50 62
/**
51 63
 * Reset the value of the floats to (vx,vy,vz).
src/main/java/org/distorted/library/type/Static4D.java
48 48
    w = vw;
49 49
    }
50 50

  
51
///////////////////////////////////////////////////////////////////////////////////////////////////
52
/**
53
 * Copy constructor.
54
 */
55
  public Static4D(Static4D sta)
56
    {
57
    super(4);
58
    x = sta.x;
59
    y = sta.y;
60
    z = sta.z;
61
    w = sta.w;
62
    }
63

  
51 64
///////////////////////////////////////////////////////////////////////////////////////////////////
52 65
/**
53 66
 * Reset the value of the floats to (vx,vy,vz,vw).
src/main/java/org/distorted/library/type/Static5D.java
50 50
    v = vv;
51 51
    }
52 52

  
53
///////////////////////////////////////////////////////////////////////////////////////////////////
54
/**
55
 * Copy constructor.
56
 */
57
  public Static5D(Static5D sta)
58
    {
59
    super(5);
60
    x = sta.x;
61
    y = sta.y;
62
    z = sta.z;
63
    w = sta.w;
64
    v = sta.v;
65
    }
66

  
53 67
///////////////////////////////////////////////////////////////////////////////////////////////////
54 68
/**
55 69
 * Reset the value of the floats to (vx,vy,vz,vw,vv).

Also available in: Unified diff