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 voidadd(SbVec3f v)Component-wise vector addition operator.SbVec3fcross(SbVec3f v)Returns right-handed cross product of vector and another vector.voiddivide(float d)Component-wise scalar division operator.floatdot(SbVec3f v)Returns dot (inner) product of vector and another vector.booleanequals(SbVec3f v, float tolerance)Equality comparison within given tolerance - the square of the length of the maximum distance between the two vectors.booleanequals(java.lang.Object obj)SbVec3fgetClosestAxis()Returns principal axis that is closest (based on maximum dot product) to this vector.float[]getValue()floatgetValueAt(int index)floatgetX()floatgetY()floatgetZ()floatlength()Returns geometric length of vector.floatlengthSquared()Returns square length of vector.SbVec3fminus(SbVec3f v2)Component-wise binary vector subtraction operator.voidmultiply(float d)Component-wise scalar multiplication operator.voidmultiply(SbVec3f v)Component-wise vector multiplication operator.voidnegate()Negates each component of vector in place.floatnormalize()Changes vector to be unit length, returning the length before normalization.SbVec3fover(float d)Component-wise binary scalar division operator.SbVec3fplus(SbVec3f v2)Component-wise binary vector addition operator.SbVec3fsetValue(float[] components)SbVec3fsetValue(float[] components, int startIndex)SbVec3fsetValue(float c0, float c1, float c2)SbVec3fsetValue(SbVec3d vec3d)Sets value of vector from a double precision vector.voidsetValue(SbVec3f copyFrom)SbVec3fsetValue(SbVec3f barycentic, SbVec3f v0, SbVec3f v1, SbVec3f v2)Sets value of vector as the weighted average of 3 other vectors.voidsetValueAt(int index, float value)voidsetX(float value)voidsetY(float value)voidsetZ(float value)voidsubstract(SbVec3f v)Component-wise vector subtraction operator.SbVec3ftimes(float d)Component-wise binary scalar multiplication operator.SbVec3ftimes(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:
equalsin 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.
-
-