Interface ConstFloat4
- All Known Implementing Classes:
Float4
public interface ConstFloat4
Read-only access to a
Float4. (native type: const Float4)-
Method Summary
Modifier and TypeMethodDescriptionfloatget(int index) Return the specified component.voidput(FloatBuffer storeBuffer) Write all 4 components to the specified buffer and advance the buffer's position by 4.floatw()Return the 4th (W) component.floatx()Return the first (X) component.floaty()Return the 2nd (Y) component.floatz()Return the 3rd (Z) component.
-
Method Details
-
get
float get(int index) Return the specified component. The vector is unaffected.- Parameters:
index- 0, 1, 2, or 3- Returns:
- the X component if index=0, the Y component if index=1, the Z component if index=2, or the W component if index=3
- Throws:
IllegalArgumentException- if index is not 0, 1, 2, or 3
-
put
Write all 4 components to the specified buffer and advance the buffer's position by 4. The vector is unaffected.- Parameters:
storeBuffer- the destination buffer (notnull)
-
w
float w()Return the 4th (W) component. The vector is unaffected.- Returns:
- the component value
-
x
float x()Return the first (X) component. The vector is unaffected.- Returns:
- the component value
-
y
float y()Return the 2nd (Y) component. The vector is unaffected.- Returns:
- the component value
-
z
float z()Return the 3rd (Z) component. The vector is unaffected.- Returns:
- the component value
-