Project

General

Profile

Download (1.32 KB) Statistics
| Branch: | Revision:

library / src / main / java / org / distorted / library / EffectTypes.java @ 1e438fc7

1
package org.distorted.library;
2

    
3
///////////////////////////////////////////////////////////////////////////////////////////////////
4

    
5
public enum EffectTypes
6
  {
7
  MATRIX   ( 0x1 ),  // values will be bitwise ORed and ANDed
8
  VERTEX   ( 0x2 ),  // so need to be 1,2,4,8...
9
  FRAGMENT ( 0x4 ),  //
10
  OTHER    ( 0x8 );  //
11

    
12
///////////////////////////////////////////////////////////////////////////////////////////////////
13

    
14
  final static int LENGTH = values().length;  // The number of effect types.
15
  final static int MASK= (1<<LENGTH)-1;       // Needed when we do bitwise operations on Effect Types.
16

    
17
  public final int type;
18

    
19
  EffectTypes(int type)
20
    {
21
    this.type = type;
22
    }
23

    
24
///////////////////////////////////////////////////////////////////////////////////////////////////
25
// called from EffectList
26

    
27
  static void reset(int[] maxtable)
28
    {
29
    maxtable[0] = 5;  // By default, there can be a maximum 5 MATRIX effects acting on a single
30
                      // DistortedObject at any given time. This can be changed with a call to
31
                      // EffectListMatrix.setMax(int)
32

    
33
    maxtable[1] = 5;  // Max 5 VERTEX Effects
34
    maxtable[2] = 5;  // Max 5 FRAGMENT Effects
35
    maxtable[3] = 5;  // Max 5 OTHER Effects
36
    }
37
///////////////////////////////////////////////////////////////////////////////////////////////////
38
  }
39

    
(17-17/30)