Project

General

Profile

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

distorted-objectlib / src / main / java / org / distorted / objectlib / shape / ShapeOctahedron.java @ 33ba467a

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