Interface Vector

All Known Subinterfaces:
Float1, Float2, Float3, Float3x3, Float3xN, Float4, Float4x4, Float4xN, FloatMxN, FloatN, Int1, Int2, Int3, Int4, IntN, Long1, Long2, Long3, Long4, LongN, Matrix, Vector1, Vector2, Vector3, Vector4
All Known Implementing Classes:
ABFloat1, ABFloat2, ABFloat3, ABFloat3x3, ABFloat4, ABFloat4x4, ABFloatMxN, ABFloatN, BBFloat1, BBFloat2, BBFloat3, BBFloat3x3, BBFloat4, BBFloat4x4, BBFloatMxN, BBFloatN, BBInt1, BBInt2, BBInt3, BBInt4, BBIntN, BBLong1, BBLong2, BBLong3, BBLong4, BBLongN, BBVector, Float2.FactorView, Float2.View, Float3.FactorView, Float3.View, Float4.FactorView, Float4.View, FloatN.FactorView, FloatN.View, Vector.View

public interface Vector
  • Method Details

    • toString

      @NotNull static <T extends Vector> @NotNull String toString(@NotNull T vector, @NotNull @NotNull String elementTypeName, @NotNull @NotNull BiFunction<T,Integer,Object> getter)
      toString() method for Vector subclasses.
      Type Parameters:
      T - Vector type.
      Parameters:
      vector - the Vector
      elementTypeName - the element type name of the vector
      getter - getter to get an element at a specific index
      Returns:
      nice string describing given vector
    • getMemberCount

      int getMemberCount()
      Count of components in this vector.
      Returns:
      float count in this vector
    • isArrayBacked

      boolean isArrayBacked()
      Whether this vector is array backed.
      Returns:
      true if this vector is array backed.
    • isBufferBacked

      boolean isBufferBacked()
      Whether this vector is buffer backed. If this method returns true, getStructure() will not throw an UnsupportedOperationException.
      Returns:
      true if this vector is buffer backed.
    • getStructure

      @NotNull default @NotNull Structure getStructure()
      Returns:
      this vector as Structure
      Throws:
      UnsupportedOperationException - if this vector is not buffer backed.
    • isView

      boolean isView()
      Whether this vector is only a view onto another vector.
      Returns:
      true if this vector is a view.
    • getAsView

      @NotNull default @NotNull Vector.View<?> getAsView()
      Used to avoid unsafe casting.
      Returns:
      the vector itself, but as Vector.View.
      Throws:
      UnsupportedOperationException - if this vector is not a view.