Project

General

Profile

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

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

1 29b82486 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
2
// Copyright 2019 Leszek Koltunski                                                               //
3
//                                                                                               //
4
// This file is part of Magic Cube.                                                              //
5
//                                                                                               //
6 4c87f159 Leszek Koltunski
// 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 29b82486 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
9
10 b31249d6 Leszek Koltunski
package org.distorted.objectlib.shape;
11 29b82486 Leszek Koltunski
12 ecf3d6e3 Leszek Koltunski
import org.distorted.library.type.Static3D;
13 29b82486 Leszek Koltunski
import org.distorted.library.type.Static4D;
14 cf93ea4e Leszek Koltunski
import org.distorted.objectlib.main.InitAssets;
15 b31249d6 Leszek Koltunski
import org.distorted.objectlib.main.InitData;
16
import org.distorted.objectlib.main.TwistyObject;
17 29b82486 Leszek Koltunski
18
///////////////////////////////////////////////////////////////////////////////////////////////////
19
20 386af988 Leszek Koltunski
public abstract class ShapeTetrahedron extends TwistyObject
21 29b82486 Leszek Koltunski
{
22 b0ec8fbd Leszek Koltunski
  public static final Static4D DEFAULT_ROT = new Static4D(0.116788305f, 0.72722490f, 0.492507200f, 0.46361750f);
23
24 f9337e48 Leszek Koltunski
  public static final int[] FACE_COLORS = new int[]
25 29b82486 Leszek Koltunski
         {
26
           COLOR_GREEN , COLOR_YELLOW,
27
           COLOR_BLUE  , COLOR_RED
28
         };
29
30 f9337e48 Leszek Koltunski
  public static final int NUM_FACES = 4;
31 b31249d6 Leszek Koltunski
  public static final int FOV = 40;
32
  public static final float RATIO = 0.89f;
33 82eb152a Leszek Koltunski
34 29b82486 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
35
36 cf93ea4e Leszek Koltunski
  public ShapeTetrahedron(int meshState, int iconMode, float realSize, Static4D quat, Static3D move, float scale,InitData data,  InitAssets asset)
37 29b82486 Leszek Koltunski
    {
38 cf93ea4e Leszek Koltunski
    super(meshState, iconMode, realSize, quat, move, scale, data, asset);
39 29b82486 Leszek Koltunski
    }
40
41
///////////////////////////////////////////////////////////////////////////////////////////////////
42
43 2289cab1 Leszek Koltunski
  public final int getNumFaces()
44 29b82486 Leszek Koltunski
    {
45 82eb152a Leszek Koltunski
    return NUM_FACES;
46 29b82486 Leszek Koltunski
    }
47
48
///////////////////////////////////////////////////////////////////////////////////////////////////
49
50 a75ae1ee Leszek Koltunski
  public int getNumFaceColors()
51 29b82486 Leszek Koltunski
    {
52 82eb152a Leszek Koltunski
    return FACE_COLORS.length;
53 29b82486 Leszek Koltunski
    }
54
55 2289cab1 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
56
57 82eb152a Leszek Koltunski
  public int getColor(int face)
58 2289cab1 Leszek Koltunski
    {
59
    return FACE_COLORS[face];
60
    }
61
62 29b82486 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
63
64 7ba38dd4 Leszek Koltunski
  public int getFOV()
65 29b82486 Leszek Koltunski
    {
66 82eb152a Leszek Koltunski
    return FOV;
67 29b82486 Leszek Koltunski
    }
68
69
///////////////////////////////////////////////////////////////////////////////////////////////////
70
71 82eb152a Leszek Koltunski
  public float getScreenRatio()
72 29b82486 Leszek Koltunski
    {
73 82eb152a Leszek Koltunski
    return RATIO;
74 29b82486 Leszek Koltunski
    }
75
}