Package com.openinventor.inventor
Class SbVec3f
- java.lang.Object
-
- com.openinventor.inventor.SbBasic
-
- com.openinventor.inventor.SbVec3f
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(SbVec3f v)
Component-wise vector addition operator.SbVec3f
cross(SbVec3f v)
Returns right-handed cross product of vector and another vector.void
divide(float d)
Component-wise scalar division operator.float
dot(SbVec3f v)
Returns dot (inner) product of vector and another vector.boolean
equals(SbVec3f 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
getClosestAxis()
Returns principal axis that is closest (based on maximum dot product) to this vector.float[]
getValue()
float
getValueAt(int index)
float
getX()
float
getY()
float
getZ()
float
length()
Returns geometric length of vector.float
lengthSquared()
Returns square length of vector.SbVec3f
minus(SbVec3f v2)
Component-wise binary vector subtraction operator.void
multiply(float d)
Component-wise scalar multiplication operator.void
multiply(SbVec3f v)
Component-wise vector multiplication operator.void
negate()
Negates each component of vector in place.float
normalize()
Changes vector to be unit length, returning the length before normalization.SbVec3f
over(float d)
Component-wise binary scalar division operator.SbVec3f
plus(SbVec3f v2)
Component-wise binary vector addition operator.SbVec3f
setValue(float[] components)
SbVec3f
setValue(float[] components, int startIndex)
SbVec3f
setValue(float c0, float c1, float c2)
SbVec3f
setValue(SbVec3d vec3d)
Sets value of vector from a double precision vector.void
setValue(SbVec3f copyFrom)
SbVec3f
setValue(SbVec3f barycentic, SbVec3f v0, SbVec3f v1, SbVec3f v2)
Sets value of vector as the weighted average of 3 other vectors.void
setValueAt(int index, float value)
void
setX(float value)
void
setY(float value)
void
setZ(float value)
void
substract(SbVec3f v)
Component-wise vector subtraction operator.SbVec3f
times(float d)
Component-wise binary scalar multiplication operator.SbVec3f
times(SbVec3f v)
Component-wise vector multiplication operator.static SbVec3f[]
toArray(long nativeArray, long length)
-
-
-
Field Detail
-
array
public final float[] array
-
LENGTH
public static final int LENGTH
- See Also:
- Constant Field Values
-
-
Method Detail
-
setX
public void setX(float value)
-
setValue
public SbVec3f setValue(float c0, float c1, float c2)
-
setZ
public void setZ(float value)
-
setY
public void setY(float value)
-
setValue
public void setValue(SbVec3f copyFrom)
-
getValue
public float[] getValue()
-
setValue
public SbVec3f setValue(float[] components)
-
setValueAt
public void setValueAt(int index, float value)
-
getValueAt
public float getValueAt(int index)
-
getY
public float getY()
-
getX
public float getX()
-
getZ
public float getZ()
-
setValue
public SbVec3f setValue(float[] components, int startIndex)
-
cross
public SbVec3f cross(SbVec3f v)
Returns right-handed cross product of vector and another vector.
-
getClosestAxis
public SbVec3f getClosestAxis()
Returns principal axis that is closest (based on maximum dot product) to this vector.
-
equals
public boolean equals(SbVec3f v, float tolerance)
Equality comparison within given tolerance - the square of the length of the maximum distance between the two vectors.
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toArray
public static SbVec3f[] toArray(long nativeArray, long length)
-
over
public SbVec3f over(float d)
Component-wise binary scalar division operator.
-
negate
public void negate()
Negates each component of vector in place.
-
setValue
public SbVec3f setValue(SbVec3f barycentic, SbVec3f v0, SbVec3f v1, SbVec3f v2)
Sets value of vector as the weighted average of 3 other vectors.
-
length
public float length()
Returns geometric length of vector.
-
lengthSquared
public float lengthSquared()
Returns square length of vector. Faster thanlength()
.
-
normalize
public float normalize()
Changes vector to be unit length, returning the length before normalization.
-
setValue
public SbVec3f setValue(SbVec3d vec3d)
Sets value of vector from a double precision vector.
-
times
public SbVec3f times(float d)
Component-wise binary scalar multiplication operator.
-
multiply
public void multiply(SbVec3f v)
Component-wise vector multiplication operator.
-
divide
public void divide(float d)
Component-wise scalar division operator.
-
multiply
public void multiply(float d)
Component-wise scalar multiplication operator.
-
add
public void add(SbVec3f v)
Component-wise vector addition operator.
-
substract
public void substract(SbVec3f v)
Component-wise vector subtraction operator.
-
dot
public float dot(SbVec3f v)
Returns dot (inner) product of vector and another vector.
-
-