Project

General

Profile

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

examples / src / main / java / org / distorted / examples / aroundtheworld / AroundTheWorldEffectsManager.java @ 2f20ae3a

1
///////////////////////////////////////////////////////////////////////////////////////////////////
2
// Copyright 2016 Leszek Koltunski                                                               //
3
//                                                                                               //
4
// This file is part of Distorted.                                                               //
5
//                                                                                               //
6
// Distorted is free software: you can redistribute it and/or modify                             //
7
// it under the terms of the GNU General Public License as published by                          //
8
// the Free Software Foundation, either version 2 of the License, or                             //
9
// (at your option) any later version.                                                           //
10
//                                                                                               //
11
// Distorted is distributed in the hope that it will be useful,                                  //
12
// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
13
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
14
// GNU General Public License for more details.                                                  //
15
//                                                                                               //
16
// You should have received a copy of the GNU General Public License                             //
17
// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
18
///////////////////////////////////////////////////////////////////////////////////////////////////
19

    
20
package org.distorted.examples.aroundtheworld;
21

    
22
///////////////////////////////////////////////////////////////////////////////////////////////////
23

    
24
import org.distorted.library.DistortedObject;
25
import org.distorted.library.type.Dynamic;
26
import org.distorted.library.type.Dynamic3D;
27
import org.distorted.library.type.Dynamic5D;
28
import org.distorted.library.type.Static3D;
29
import org.distorted.library.type.Static4D;
30
import org.distorted.library.type.Static5D;
31

    
32
class AroundTheWorldEffectsManager
33
  {
34
  private int mHeight, mWidth;
35
  private float mBlackness, mAsianness;
36

    
37
///////////////////////////////////////////////////////////////////////////////////////////////////
38

    
39
  AroundTheWorldEffectsManager()
40
    {
41
    mHeight    = 0;
42
    mWidth     = 0;
43
    mBlackness = 0;
44
    mAsianness = 0;
45
    }
46

    
47
///////////////////////////////////////////////////////////////////////////////////////////////////
48

    
49
  void setSize(int width, int height)
50
    {
51
    mWidth = width;
52
    mHeight= height;
53
    }
54

    
55
///////////////////////////////////////////////////////////////////////////////////////////////////
56

    
57
  synchronized void apply(DistortedObject obj)
58
    {
59
    setRace(mBlackness, mAsianness);
60

    
61
    // TODO
62
    }
63

    
64
///////////////////////////////////////////////////////////////////////////////////////////////////
65

    
66
  synchronized void setRace(float blackness, float asianness)
67
    {
68
    mBlackness = blackness;
69
    mAsianness = asianness;
70

    
71
    android.util.Log.e("manager", "blackness="+blackness+" asianness="+asianness);
72
    // TODO
73
    }
74
  }
(2-2/6)