SbVec3f()
Default constructor.
SbVec3f(constfloatv[3])SbVec3f(floatx,floaty,floatz)
Constructor given vector components.
SbVec3f(SbPlane&p0,SbPlane&p1,SbPlane&p2)
Constructor given 3 planes.
SbVec3fcross(constSbVec3f&v)const
Returns right-handed cross product of vector and another vector.
floatdot(constSbVec3f&v)const
Returns dot (inner) product of vector and another vector.
SbBoolequals(constSbVec3fv,floattolerance)const
Equality comparison within given tolerance — the square of the length of the maximum distance between
the two vectors.
SbVec3fgetClosestAxis()const
Returns principal axis that is closest (based on maximum dot product) to this vector.
constfloat*getValue()constvoidgetValue(float&x,float&y,float&z)const
Returns vector components.
floatlength()const
Returns geometric length of vector.
voidnegate()
Negates each component of vector in place.
floatnormalize()
Changes vector to be unit length, returning the length before normalization.
SbVec3f&setValue(constfloatv[3])SbVec3f&setValue(floatx,floaty,floatz)
Sets the vector components.
SbVec3f&setValue(constSbVec3f&barycentic,constSbVec3f&v0,constSbVec3f&v1,constSbVec3f&v2)
Sets value of vector as the weighted average of 3 other vectors.
float&operator[](inti)constfloat&operator[](inti)
Accesses indexed component of vector.
SbVec3f&operator*=(floatd)SbVec3f&operator/=(floatd)
Component-wise scalar multiplication and division operators.
SbVec3f&operator+=(constSbVec3f&u)SbVec3f&operator-=(constSbVec3f&u)
Component-wise vector addition and subtraction operators.
SbVec3foperator-()const
Nondestructive unary negation — returns a new vector.
SbVec3foperator*(constSbVec3f&v,floatd)SbVec3foperator*(floatd,constSbVec3f&v)SbVec3foperator/(constSbVec3f&v,floatd)
Component-wise binary scalar multiplication and division operators.
SbVec3foperator+(constSbVec3f&v1,constSbVec3f&v2)SbVec3foperator-(constSbVec3f&v1,constSbVec3f&v2)
Component-wise binary vector addition and subtraction operators.
intoperator==(constSbVec3f&v1,constSbVec3f&v2)intoperator!=(constSbVec3f&v1,constSbVec3f&v2)
Equality comparison operators.