Class Type.MatrixType

Enclosing class:
Type

public static final class Type.MatrixType extends Type
  • Method Details

    • isMatrix

      public boolean isMatrix()
      Overrides:
      isMatrix in class Type
    • getElementType

      @Nonnull public Type getElementType()
      Description copied from class: Type
      For arrays, returns the base type. For matrices, returns the column vector type. For vectors, returns the scalar type. For all other types, returns the type itself.
      Overrides:
      getElementType in class Type
    • getComponentType

      @Nonnull public Type.ScalarType getComponentType()
      Description copied from class: Type
      For matrices and vectors, returns the scalar type of individual cells (e.g. mat2 has a component type of Float). For textures, returns the sampled type (e.g. texture2D has a component type of Float). For arrays, returns the component type of their base type. For all other types, returns the type itself.
      Overrides:
      getComponentType in class Type
    • getCols

      public int getCols()
      Description copied from class: Type
      For matrices, returns the number of columns (e.g. mat3x4 returns 3). For scalars and vectors, returns 1. For all other types, causes an assertion failure.
      Overrides:
      getCols in class Type
    • getRows

      public int getRows()
      Description copied from class: Type
      For matrices and vectors, returns the number of rows (e.g. mat3x4 return 4). For scalars, returns 1. For all other types, causes an assertion failure.
      Overrides:
      getRows in class Type