Project

General

Profile

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

distorted-objectlib / src / main / java / org / distorted / objectlib / main / ShapeTetrahedron.java @ b3b79e9b

1
///////////////////////////////////////////////////////////////////////////////////////////////////
2
// Copyright 2019 Leszek Koltunski                                                               //
3
//                                                                                               //
4
// This file is part of Magic Cube.                                                              //
5
//                                                                                               //
6
// Magic Cube is proprietary software licensed under an EULA which you should have received      //
7
// along with the code. If not, check https://distorted.org/magic/License-Magic-Cube.html        //
8
///////////////////////////////////////////////////////////////////////////////////////////////////
9

    
10
package org.distorted.objectlib.main;
11

    
12
import java.io.InputStream;
13

    
14
import org.distorted.library.type.Static3D;
15
import org.distorted.library.type.Static4D;
16

    
17
///////////////////////////////////////////////////////////////////////////////////////////////////
18

    
19
public abstract class ShapeTetrahedron extends TwistyObject
20
{
21
  public static final Static4D DEFAULT_ROT = new Static4D(0.116788305f, 0.72722490f, 0.492507200f, 0.46361750f);
22

    
23
  static final int[] FACE_COLORS = new int[]
24
         {
25
           COLOR_GREEN , COLOR_YELLOW,
26
           COLOR_BLUE  , COLOR_RED
27
         };
28

    
29
  static final int NUM_FACES = 4;
30
  static final int FOV = 40;
31
  static final float RATIO = 0.89f;
32

    
33
///////////////////////////////////////////////////////////////////////////////////////////////////
34

    
35
  public ShapeTetrahedron(InitData data, int meshState, int iconMode, float realSize, Static4D quat, Static3D move, float scale, InputStream stream)
36
    {
37
    super(data, meshState, iconMode, realSize, quat, move, scale, stream);
38
    }
39

    
40
///////////////////////////////////////////////////////////////////////////////////////////////////
41

    
42
  public final int getNumFaces()
43
    {
44
    return NUM_FACES;
45
    }
46

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

    
49
  public int getNumFaceColors()
50
    {
51
    return FACE_COLORS.length;
52
    }
53

    
54
///////////////////////////////////////////////////////////////////////////////////////////////////
55

    
56
  public int getColor(int face)
57
    {
58
    return FACE_COLORS[face];
59
    }
60

    
61
///////////////////////////////////////////////////////////////////////////////////////////////////
62

    
63
  public int getFOV()
64
    {
65
    return FOV;
66
    }
67

    
68
///////////////////////////////////////////////////////////////////////////////////////////////////
69

    
70
  public float getScreenRatio()
71
    {
72
    return RATIO;
73
    }
74
}
(10-10/13)