public class SbVec2f extends SbBasic
See also:
SbRotation
, SbRotationd
, SbVec2d
, SbVec2i32
, SbVec2s
, SbVec3d
, SbVec3f
, SbVec3i32
, SbVec3s
, SbVec4b
, SbVec4d
, SbVec4f
, SbVec4i32
, SbVec4s
, SbVec4ub
, SbVec4ui32
, SbVec4us
Modifier and Type | Field and Description |
---|---|
float[] |
array |
Constructor and Description |
---|
SbVec2f() |
SbVec2f(float val)
Constructor that sets all components to the same value.
|
SbVec2f(float[] components) |
SbVec2f(float c0,
float c1) |
SbVec2f(SbVec2f copyFrom) |
Modifier and Type | Method and Description |
---|---|
void |
add(SbVec2f u)
Component-wise vector addition operator.
|
void |
divide(float d)
Component-wise scalar division operator.
|
float |
dot(SbVec2f v)
Returns dot (inner) product of vector and another vector.
|
boolean |
equals(java.lang.Object obj) |
boolean |
equals(SbVec2f v,
float tolerance)
Equality comparison within given tolerance - the square of the length of the maximum distance between the two vectors.
|
float[] |
getValue() |
float |
getValueAt(int index) |
float |
getX() |
float |
getY() |
float |
length()
Returns geometric length of vector.
|
float |
lengthSquared()
Returns square length of vector.
|
SbVec2f |
minus(SbVec2f v2)
Component-wise binary vector subtraction operator.
|
void |
multiply(float d)
Component-wise scalar multiplication operator.
|
void |
multiply(SbVec2f v)
Component-wise vector multiplication operator.
|
void |
negate()
Negates each component of vector in place.
|
float |
normalize()
Changes vector to be unit length.
|
SbVec2f |
over(float d)
Component-wise binary scalar division operator.
|
SbVec2f |
plus(SbVec2f v2)
Component-wise binary vector addition operator.
|
SbVec2f |
setValue(float[] components) |
SbVec2f |
setValue(float[] components,
int startIndex) |
SbVec2f |
setValue(float c0,
float c1) |
SbVec2f |
setValue(SbVec2d vec2d)
Sets value of vector from a double precision vector.
|
void |
setValue(SbVec2f copyFrom) |
void |
setValueAt(int index,
float value) |
void |
setX(float value) |
void |
setY(float value) |
void |
substract(SbVec2f u)
Component-wise vector subtraction operator.
|
SbVec2f |
times(float d)
Component-wise binary scalar multiplication operator.
|
SbVec2f |
times(SbVec2f v)
Component-wise vector multiplication operator.
|
static SbVec2f[] |
toArray(long nativeArray,
long length) |
public SbVec2f()
public SbVec2f(float c0, float c1)
public SbVec2f(float[] components)
public SbVec2f(SbVec2f copyFrom)
public SbVec2f(float val)
public void setX(float value)
public void setValue(SbVec2f copyFrom)
public SbVec2f setValue(float c0, float c1)
public void setValueAt(int index, float value)
public float[] getValue()
public SbVec2f setValue(float[] components, int startIndex)
public float getValueAt(int index)
public SbVec2f setValue(float[] components)
public float getY()
public void setY(float value)
public float getX()
public SbVec2f over(float d)
public static SbVec2f[] toArray(long nativeArray, long length)
public boolean equals(SbVec2f v, float tolerance)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public float lengthSquared()
length()
.public float length()
public float normalize()
public void negate()
public float dot(SbVec2f v)
public void divide(float d)
public void multiply(SbVec2f v)
public void add(SbVec2f u)
public SbVec2f times(float d)
public void substract(SbVec2f u)
public SbVec2f setValue(SbVec2d vec2d)
NOTE: Open Inventor fields still store only single precision values, not double precision values.
public void multiply(float d)
Generated on July 31, 2019, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com