Class FloatN.FactorView
java.lang.Object
de.linusdev.lutils.math.vector.Vector.View<FloatN>
de.linusdev.lutils.math.vector.abstracts.floatn.FloatN.View
de.linusdev.lutils.math.vector.abstracts.floatn.FloatN.FactorView
- All Implemented Interfaces:
FloatElements,FloatN,Vector
- Direct Known Subclasses:
Float2.FactorView,Float3.FactorView,Float4.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
FieldsFields 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
ConstructorsModifierConstructorDescriptionprotectedFactorView(@NotNull FloatN original, int @NotNull [] mapping, float @NotNull [] factor) -
Method Summary
Methods inherited from class de.linusdev.lutils.math.vector.abstracts.floatn.FloatN.View
getAsView, toStringMethods 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
fillFromArray, getAsViewMethods inherited from interface de.linusdev.lutils.math.vector.Vector
getMemberCount, getStructure, isArrayBacked, isBufferBacked, isView
-
Field Details
-
factor
protected final float @NotNull [] factor
-
-
Constructor Details
-
FactorView
protected FactorView(@NotNull @NotNull FloatN original, int @NotNull [] mapping, float @NotNull [] factor)
-
-
Method Details
-
get
public float get(int index) Description copied from interface:FloatNGet component at positionindex.- Specified by:
getin interfaceFloatN- Overrides:
getin classFloatN.View- Parameters:
index- index of the vector component to get- Returns:
- component value
-
put
public void put(int index, float value) Description copied from interface:FloatNSet component at positionindextovalue.- Specified by:
putin interfaceFloatN- Overrides:
putin classFloatN.View- Parameters:
index- index of the vector component to setvalue- value to set
-
hasFactor
public boolean hasFactor()- Overrides:
hasFactorin classFloatN.View- 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 classFloatN.View- Returns:
- factor array
-