Package de.linusdev.lutils.math.matrix
Interface Matrix
- All Superinterfaces:
Vector
- All Known Implementing Classes:
ABFloat3x3,ABFloat4x4,ABFloatMxN,BBFloat3x3,BBFloat4x4,BBFloatMxN
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface de.linusdev.lutils.math.vector.Vector
Vector.View<V extends Vector> -
Method Summary
Modifier and TypeMethodDescriptionintFor a NxM Matrix, return M.default intCount of components in this vector.intgetWidth()For a NxM Matrix, return N.booleanWhether this matrix is array backed.booleanWhether this vector is buffer backed.default booleanisView()Whether this vector is only a view onto another vector.default intpositionToIndex(int y, int x) toString(M matrix, @NotNull String name, @NotNull Matrix.MatrixGetter<M> getter) Methods inherited from interface de.linusdev.lutils.math.vector.Vector
getAsView, getStructure
-
Method Details
-
toString
@NotNull static <M extends Matrix> @NotNull String toString(@NotNull M matrix, @NotNull @NotNull String name, @NotNull @NotNull Matrix.MatrixGetter<M> getter) -
getMemberCount
default int getMemberCount()Description copied from interface:VectorCount of components in this vector.- Specified by:
getMemberCountin interfaceVector- Returns:
- float count in this vector
-
positionToIndex
default int positionToIndex(int y, int x) - Parameters:
y- y-posx- x-pos- Returns:
- index of given position in this
Matrix
-
getWidth
int getWidth()For a NxM Matrix, return N.- Returns:
- width of the matrix
-
getHeight
int getHeight()For a NxM Matrix, return M.- Returns:
- height of the matrix
-
isArrayBacked
boolean isArrayBacked()Whether this matrix is array backed.- Specified by:
isArrayBackedin interfaceVector- Returns:
trueif this matrix is array backed.
-
isBufferBacked
boolean isBufferBacked()Whether this vector is buffer backed.- Specified by:
isBufferBackedin interfaceVector- Returns:
trueif this vector is buffer backed.
-
isView
default boolean isView()Description copied from interface:VectorWhether this vector is only a view onto another vector.
-