public class SbVec3f extends SbBasic
See also:
SbRotation
, SbRotationd
, SbVec2d
, SbVec2f
, SbVec2i32
, SbVec2s
, SbVec3d
, SbVec3i32
, SbVec3s
, SbVec4b
, SbVec4d
, SbVec4f
, SbVec4i32
, SbVec4s
, SbVec4ub
, SbVec4ui32
, SbVec4us
Constructor and Description |
---|
SbVec3f() |
SbVec3f(float[] components) |
SbVec3f(float c0,
float c1,
float c2) |
SbVec3f(SbPlane p0,
SbPlane p1,
SbPlane p2)
Constructor given 3 planes.
|
SbVec3f(SbVec3f copyFrom) |
Modifier and Type | Method and 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(java.lang.Object obj) |
boolean |
equals(SbVec3f v,
float tolerance)
Equality comparison within given tolerance - the square of the length of the maximum distance between the two vectors.
|
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) |
public final float[] array
public static final int LENGTH
public SbVec3f()
public SbVec3f(float[] components)
public SbVec3f(SbVec3f copyFrom)
public SbVec3f(float c0, float c1, float c2)
public void setX(float value)
public SbVec3f setValue(float c0, float c1, float c2)
public void setZ(float value)
public void setY(float value)
public void setValue(SbVec3f copyFrom)
public float[] getValue()
public SbVec3f setValue(float[] components)
public void setValueAt(int index, float value)
public float getValueAt(int index)
public float getY()
public float getX()
public float getZ()
public SbVec3f setValue(float[] components, int startIndex)
public SbVec3f cross(SbVec3f v)
public SbVec3f getClosestAxis()
public boolean equals(SbVec3f v, float tolerance)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public static SbVec3f[] toArray(long nativeArray, long length)
public SbVec3f over(float d)
public void negate()
public SbVec3f setValue(SbVec3f barycentic, SbVec3f v0, SbVec3f v1, SbVec3f v2)
public float length()
public float lengthSquared()
length()
.public float normalize()
public SbVec3f setValue(SbVec3d vec3d)
public SbVec3f times(float d)
public void multiply(SbVec3f v)
public void divide(float d)
public void multiply(float d)
public void add(SbVec3f v)
public void substract(SbVec3f v)
public float dot(SbVec3f v)
Generated on July 31, 2019, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com