Project

General

Profile

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

distorted-objectlib / src / main / java / org / distorted / objectlib / shape / ShapeTetrahedron.java @ bf890718

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.shape;
11

    
12
import java.io.InputStream;
13

    
14
import org.distorted.library.type.Static3D;
15
import org.distorted.library.type.Static4D;
16
import org.distorted.objectlib.main.InitData;
17
import org.distorted.objectlib.main.TwistyObject;
18

    
19
///////////////////////////////////////////////////////////////////////////////////////////////////
20

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

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

    
31
  public static final int NUM_FACES = 4;
32
  public static final int FOV = 40;
33
  public static final float RATIO = 0.89f;
34

    
35
///////////////////////////////////////////////////////////////////////////////////////////////////
36

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

    
42
///////////////////////////////////////////////////////////////////////////////////////////////////
43

    
44
  public final int getNumFaces()
45
    {
46
    return NUM_FACES;
47
    }
48

    
49
///////////////////////////////////////////////////////////////////////////////////////////////////
50

    
51
  public int getNumFaceColors()
52
    {
53
    return FACE_COLORS.length;
54
    }
55

    
56
///////////////////////////////////////////////////////////////////////////////////////////////////
57

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

    
63
///////////////////////////////////////////////////////////////////////////////////////////////////
64

    
65
  public int getFOV()
66
    {
67
    return FOV;
68
    }
69

    
70
///////////////////////////////////////////////////////////////////////////////////////////////////
71

    
72
  public float getScreenRatio()
73
    {
74
    return RATIO;
75
    }
76
}
(6-6/6)