Project

General

Profile

« Previous | Next » 

Revision 015642fb

Added by Leszek Koltunski over 8 years ago

Cleanup.

View differences:

src/main/java/org/distorted/library/Distorted.java
51 51
   */
52 52
  public static final int CLONE_BITMAP  = 0x1;
53 53
  /**
54
   * When creating an instance of a DistortedObject from another instance, clone the PreShader Effects.
54
   * When creating an instance of a DistortedObject from another instance, clone the Matrix Effects.
55 55
   * <p>
56 56
   * This way we can have two different DistortedObjects with different Bitmaps behind them, both 
57 57
   * always displayed in exactly the same place on the screen. Applying any matrix-based effect to 
58 58
   * one of them automatically applies the effect to the other. Used in the copy constructor.
59 59
   */
60
  public static final int CLONE_PRESHADER = 0x2;
60
  public static final int CLONE_MATRIX = 0x2;
61 61
  /**
62 62
   * When creating an instance of a DistortedObject from another instance, clone the Vertex Effects.
63 63
   * <p>
......
74 74
   * applies the effect to the other. Used in the copy constructor.
75 75
   */
76 76
  public static final int CLONE_FRAGMENT= 0x8;
77

  
78
  // Note: why no 'CLONE_POSTSHADER' constant? The only Postshader effects are the 'save to PNG file'
79
  // 'save to MP4 file'. Sharing those effects across multiple DistortedObject objects does not make any
80
  // sense - multiple Objects would then fight to get saved all to the same file.
81

  
82 77
  /**
83 78
   * When creating an instance of a DistortedNode from another instance, clone the children Nodes.
84 79
   * <p>
......
313 308
 * Compiles the vertex and fragment shaders, establishes the addresses of all uniforms, and initialises all Bitmaps that have already
314 309
 * been created.
315 310
 *   
316
 * @param context Context of the APpp using the library - used to open up Resources and read Shader code.
311
 * @param context Context of the App using the library - used to open up Resources and read Shader code.
317 312
 * @throws FragmentCompilationException
318 313
 * @throws VertexCompilationException
319 314
 * @throws VertexUniformsException
src/main/java/org/distorted/library/DistortedBitmap.java
100 100

  
101 101
///////////////////////////////////////////////////////////////////////////////////////////////////
102 102
/**
103
 * {@see DistortedObject#DistortedObject(DistortedObject,flags)}
103
 * {@see DistortedObject#DistortedObject(DistortedObject,int)}
104 104
 */
105 105
   public DistortedBitmap(DistortedBitmap db, int flags)
106 106
     {
src/main/java/org/distorted/library/DistortedCubes.java
54 54
 * @param cols Integer helping to parse the next parameter.
55 55
 * @param desc String describing the subset of a MxNx1 cuboid that we want to create.
56 56
 *             Its MxN characters - all 0 or 1 - decide of appropriate field is taken or not.
57
 *
57
 *             <p>
58 58
 *             For example, (cols=2, desc="111010") describes the following shape:
59 59
 *
60 60
 *             XX
......
66 66
 *             XX
67 67
 *
68 68
 *              X
69
 *
69
 *             </p>
70 70
 * @param gridSize size, in pixels, of the single 1x1x1 cube our cuboid is built from
71 71
 * @param frontOnly Only create the front wall or side and back as well?
72 72
 */
......
111 111

  
112 112
///////////////////////////////////////////////////////////////////////////////////////////////////
113 113
/**
114
 * {@see DistortedObject#DistortedObject(DistortedObject,flags)}
114
 * {@see DistortedObject#DistortedObject(DistortedObject,int)}
115 115
 */
116 116
 public DistortedCubes(DistortedCubes dc, int flags)
117 117
   {
src/main/java/org/distorted/library/DistortedNode.java
353 353
 *     
354 354
 * @param node The DistortedNode to copy data from.
355 355
 * @param flags bit field composed of a subset of the following:
356
 *        {@link Distorted#CLONE_BITMAP},  {@link Distorted#CLONE_PRESHADER}, {@link Distorted#CLONE_VERTEX},
356
 *        {@link Distorted#CLONE_BITMAP},  {@link Distorted#CLONE_MATRIX}, {@link Distorted#CLONE_VERTEX},
357 357
 *        {@link Distorted#CLONE_FRAGMENT} and {@link Distorted#CLONE_CHILDREN}.
358 358
 *        For example flags = CLONE_BITMAP | CLONE_CHILDREN.
359 359
 */
src/main/java/org/distorted/library/DistortedObject.java
28 28
import org.distorted.library.type.Data2D;
29 29
import org.distorted.library.type.Data3D;
30 30
import org.distorted.library.type.Data4D;
31
import org.distorted.library.type.Static2D;
32 31
import org.distorted.library.type.Static3D;
33 32

  
34 33
///////////////////////////////////////////////////////////////////////////////////////////////////
......
79 78
    
80 79
  protected void initializeEffectLists(DistortedObject d, int flags)
81 80
    {
82
    if( (flags & Distorted.CLONE_PRESHADER) != 0 )
81
    if( (flags & Distorted.CLONE_MATRIX) != 0 )
83 82
      {
84 83
      mM = d.mM;
85 84
      matrixCloned = true;

Also available in: Unified diff