Project

General

Profile

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

distorted-objectlib / src / main / java / org / distorted / objectlib / shape / ShapeOctahedron.java @ 1eafa9c6

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.TwistyObject;
16 ae9d9227 leszek
import org.distorted.objectlib.metadata.Metadata;
17 29b82486 Leszek Koltunski
18
///////////////////////////////////////////////////////////////////////////////////////////////////
19
20 386af988 Leszek Koltunski
public abstract class ShapeOctahedron extends TwistyObject
21 29b82486 Leszek Koltunski
{
22 bc39861d Leszek Koltunski
  public static final Static4D DEFAULT_ROT = new Static4D(-0.31521368f, 0.36868167f, -0.6488994f, 0.5862124f);
23 b0ec8fbd Leszek Koltunski
24 f9337e48 Leszek Koltunski
  public static final int[] FACE_COLORS = new int[]
25 29b82486 Leszek Koltunski
         {
26 9b1fe915 Leszek Koltunski
           COLOR_VIOLET, COLOR_GREY  ,
27
           COLOR_BLUE  , COLOR_RED   ,
28
           COLOR_ORANGE, COLOR_GREEN ,
29
           COLOR_WHITE , COLOR_YELLOW
30 29b82486 Leszek Koltunski
         };
31
32 f9337e48 Leszek Koltunski
  public static final int NUM_FACES = 8;
33 b31249d6 Leszek Koltunski
  public static final int FOV = 40;
34
  public static final float RATIO = 0.68f;
35 82eb152a Leszek Koltunski
36 29b82486 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
37
38 ae9d9227 leszek
  public ShapeOctahedron(int iconMode, float realSize, Static4D quat, Static3D move, float scale, Metadata meta, InitAssets asset)
39 29b82486 Leszek Koltunski
    {
40 ae9d9227 leszek
    super(iconMode, realSize, quat, move, scale, meta, asset);
41 29b82486 Leszek Koltunski
    }
42
43
///////////////////////////////////////////////////////////////////////////////////////////////////
44
45 1eafa9c6 leszek
  public final int getNumPuzzleFaces()
46 29b82486 Leszek Koltunski
    {
47 82eb152a Leszek Koltunski
    return NUM_FACES;
48 29b82486 Leszek Koltunski
    }
49
50
///////////////////////////////////////////////////////////////////////////////////////////////////
51
52 962b8ff6 leszek
  public int[] getColorTable()
53 29b82486 Leszek Koltunski
    {
54 962b8ff6 leszek
    return FACE_COLORS;
55 2289cab1 Leszek Koltunski
    }
56
57 29b82486 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
58
59 7ba38dd4 Leszek Koltunski
  public int getFOV()
60 29b82486 Leszek Koltunski
    {
61 82eb152a Leszek Koltunski
    return FOV;
62 29b82486 Leszek Koltunski
    }
63
64
///////////////////////////////////////////////////////////////////////////////////////////////////
65
66 82eb152a Leszek Koltunski
  public float getScreenRatio()
67 29b82486 Leszek Koltunski
    {
68 82eb152a Leszek Koltunski
    return RATIO;
69 29b82486 Leszek Koltunski
    }
70
}