Class FloatN.View
java.lang.Object
de.linusdev.lutils.math.vector.Vector.View<FloatN>
de.linusdev.lutils.math.vector.abstracts.floatn.FloatN.View
- All Implemented Interfaces:
FloatElements,FloatN,Vector
- Direct Known Subclasses:
Float2.View,Float3.View,Float4.View,FloatN.FactorView
- Enclosing interface:
FloatN
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.linusdev.lutils.math.vector.abstracts.floatn.FloatN
FloatN.FactorView, FloatN.ViewNested classes/interfaces inherited from interface de.linusdev.lutils.math.vector.Vector
Vector.View<V extends Vector> -
Field Summary
Fields inherited from class de.linusdev.lutils.math.vector.Vector.View
mapping, originalFields inherited from interface de.linusdev.lutils.math.general.FloatElements
ELEMENT_SIZE, ELEMENT_TYPE_NAME -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class de.linusdev.lutils.math.vector.Vector.View
getMapping, getOriginal, isArrayBacked, isBufferBacked, isMappingSpecial, isMappingSpecial, isViewMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface de.linusdev.lutils.math.vector.abstracts.floatn.FloatN
fillFromArrayMethods inherited from interface de.linusdev.lutils.math.vector.Vector
getMemberCount, getStructure, isArrayBacked, isBufferBacked, isView
-
Constructor Details
-
View
-
-
Method Details
-
get
public float get(int index) Description copied from interface:FloatNGet component at positionindex. -
put
public void put(int index, float value) Description copied from interface:FloatNSet component at positionindextovalue. -
hasFactor
public boolean hasFactor()- Specified by:
hasFactorin classVector.View<FloatN>- Returns:
trueif this view has a factor when getting/setting values.
-
getFactor
public float @NotNull [] getFactor()Description copied from class:Vector.ViewThe factor for each component. The factor[i] is used for the i-component of this view vector, not on the original.
The returned array will always be of the same type as the vector (FloatN -> float[], ...).- Overrides:
getFactorin classVector.View<FloatN>- Returns:
- factor array
-
getAsView
Description copied from interface:VectorUsed to avoid unsafe casting.- Specified by:
getAsViewin interfaceFloatN- Specified by:
getAsViewin interfaceVector- Overrides:
getAsViewin classVector.View<FloatN>- Returns:
- the vector itself, but as
Vector.View.
-
toString
-