Enum Cubemap.CubemapSide

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Cubemap.CubemapSide>
    Enclosing class:
    Cubemap

    public static enum Cubemap.CubemapSide
    extends java.lang.Enum<Cubemap.CubemapSide>
    Enum to identify each side of a Cubemap
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      NegativeX
      The negative X and second side of the cubemap
      NegativeY
      The negative Y and fourth side of the cubemap
      NegativeZ
      The negative Z and sixth side of the cubemap
      PositiveX
      The positive X and first side of the cubemap
      PositiveY
      The positive Y and third side of the cubemap
      PositiveZ
      The positive Z and fifth side of the cubemap
    • Field Summary

      Fields 
      Modifier and Type Field Description
      Vector3 direction
      The direction vector to target the side.
      int glEnum
      The OpenGL target (used for glTexImage2D) of the side.
      int index
      The zero based index of the side in the cubemap
      Vector3 up
      The up vector to target the side.
    • Enum Constant Detail

      • PositiveX

        public static final Cubemap.CubemapSide PositiveX
        The positive X and first side of the cubemap
      • NegativeX

        public static final Cubemap.CubemapSide NegativeX
        The negative X and second side of the cubemap
      • PositiveY

        public static final Cubemap.CubemapSide PositiveY
        The positive Y and third side of the cubemap
      • NegativeY

        public static final Cubemap.CubemapSide NegativeY
        The negative Y and fourth side of the cubemap
      • PositiveZ

        public static final Cubemap.CubemapSide PositiveZ
        The positive Z and fifth side of the cubemap
      • NegativeZ

        public static final Cubemap.CubemapSide NegativeZ
        The negative Z and sixth side of the cubemap
    • Field Detail

      • index

        public final int index
        The zero based index of the side in the cubemap
      • glEnum

        public final int glEnum
        The OpenGL target (used for glTexImage2D) of the side.
      • up

        public final Vector3 up
        The up vector to target the side.
      • direction

        public final Vector3 direction
        The direction vector to target the side.
    • Method Detail

      • values

        public static Cubemap.CubemapSide[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Cubemap.CubemapSide c : Cubemap.CubemapSide.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Cubemap.CubemapSide valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getGLEnum

        public int getGLEnum()
        Returns:
        The OpenGL target (used for glTexImage2D) of the side.
      • getUp

        public Vector3 getUp​(Vector3 out)
        Returns:
        The up vector of the side.
      • getDirection

        public Vector3 getDirection​(Vector3 out)
        Returns:
        The direction vector of the side.