## Class SbVec4f

• ### Field Summary

Fields
Modifier and Type Field Description
`float[]` `array`
• ### Constructor Summary

Constructors
Constructor Description
`SbVec4f()`
`SbVec4f​(float[] components)`
```SbVec4f​(float c0, float c1, float c2, float c3)```
`SbVec4f​(SbVec4f copyFrom)`
• ### Method Summary

All Methods
Modifier and Type Method Description
`void` `add​(SbVec4f u)`
`void` `divide​(float d)`
Component-wise scalar division operator.
`float` `dot​(SbVec4f v)`
Returns dot (inner) product of vector and another vector.
`boolean` ```equals​(SbVec4f v, float tolerance)```
Equality comparison within given tolerance - the square of the length of the maximum distance between the two vectors.
`boolean` `equals​(java.lang.Object obj)`
`SbVec3f` `getReal()`
Returns the real portion of the vector by dividing by the fourth value.
`float[]` `getValue()`
`float` `getValueAt​(int index)`
`float` `getW()`
`float` `getX()`
`float` `getY()`
`float` `getZ()`
`float` `length()`
Returns geometric length of vector.
`float` `lengthSquared()`
Returns square length of vector.
`SbVec4f` `minus​(SbVec4f v2)`
Component-wise binary vector subtraction operator.
`void` `multiply​(float d)`
Component-wise scalar multiplication operator.
`void` `negate()`
Negates each component of vector in place.
`float` `normalize()`
Changes vector to be unit length.
`SbVec4f` `over​(float d)`
Component-wise binary scalar division operator.
`SbVec4f` `plus​(SbVec4f v2)`
`SbVec4f` `setValue​(float[] components)`
`SbVec4f` ```setValue​(float[] components, int startIndex)```
`SbVec4f` ```setValue​(float c0, float c1, float c2, float c3)```
`SbVec4f` `setValue​(SbVec4d vec4d)`
Sets value of vector from a double precision vector.
`void` `setValue​(SbVec4f copyFrom)`
`void` ```setValueAt​(int index, float value)```
`void` `setW​(float value)`
`void` `setX​(float value)`
`void` `setY​(float value)`
`void` `setZ​(float value)`
`void` `substract​(SbVec4f u)`
Component-wise vector subtraction operator.
`SbVec4f` `times​(float d)`
Component-wise binary scalar multiplication operator.
`static SbVec4f[]` ```toArray​(long nativeArray, long length)```
• ### Methods inherited from class java.lang.Object

`getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
• ### Field Detail

• #### array

`public final float[] array`
• ### Constructor Detail

• #### SbVec4f

`public SbVec4f()`
• #### SbVec4f

`public SbVec4f​(SbVec4f copyFrom)`
• #### SbVec4f

`public SbVec4f​(float[] components)`
• #### SbVec4f

```public SbVec4f​(float c0,
float c1,
float c2,
float c3)```
• ### Method Detail

• #### setValue

```public SbVec4f setValue​(float c0,
float c1,
float c2,
float c3)```
• #### setY

`public void setY​(float value)`
• #### setX

`public void setX​(float value)`
• #### getValueAt

`public float getValueAt​(int index)`
• #### setValue

`public void setValue​(SbVec4f copyFrom)`
• #### setValueAt

```public void setValueAt​(int index,
float value)```
• #### setValue

```public SbVec4f setValue​(float[] components,
int startIndex)```
• #### getValue

`public float[] getValue()`
• #### setValue

`public SbVec4f setValue​(float[] components)`
• #### setZ

`public void setZ​(float value)`
• #### getZ

`public float getZ()`
• #### getX

`public float getX()`
• #### getY

`public float getY()`
• #### setW

`public void setW​(float value)`
• #### getW

`public float getW()`
• #### toArray

```public static SbVec4f[] toArray​(long nativeArray,
long length)```
• #### equals

`public boolean equals​(java.lang.Object obj)`
Overrides:
`equals` in class `java.lang.Object`
• #### equals

```public boolean equals​(SbVec4f v,
float tolerance)```
Equality comparison within given tolerance - the square of the length of the maximum distance between the two vectors.
• #### plus

`public SbVec4f plus​(SbVec4f v2)`
• #### minus

`public SbVec4f minus​(SbVec4f v2)`
Component-wise binary vector subtraction operator.
• #### over

`public SbVec4f over​(float d)`
Component-wise binary scalar division operator.
• #### length

`public float length()`
Returns geometric length of vector.
• #### lengthSquared

`public float lengthSquared()`
Returns square length of vector. Faster than `length()`.
• #### getReal

`public SbVec3f getReal()`
Returns the real portion of the vector by dividing by the fourth value.
• #### dot

`public float dot​(SbVec4f v)`
Returns dot (inner) product of vector and another vector.
• #### negate

`public void negate()`
Negates each component of vector in place.

`public void add​(SbVec4f u)`
• #### divide

`public void divide​(float d)`
Component-wise scalar division operator.
• #### times

`public SbVec4f times​(float d)`
Component-wise binary scalar multiplication operator.
• #### substract

`public void substract​(SbVec4f u)`
Component-wise vector subtraction operator.
• #### multiply

`public void multiply​(float d)`
Component-wise scalar multiplication operator.
• #### normalize

`public float normalize()`
Changes vector to be unit length.
• #### setValue

`public SbVec4f setValue​(SbVec4d vec4d)`
Sets value of vector from a double precision vector.