SbVec4f(3IV)
SbVec4f (SbV4f) - 4D vector class
As shipped in IRIX 6.5.30. Added in IRIX 6.5.22.
NAME SbVec4f (SbV4f) - 4D vector class INHERITS FROM SbVec4f SYNOPSIS #include <Inventor_c/SbLinear.h> typedef SbVec4f SbV4f Functions from class SbVec4f: SbBool SbV4fEquals(const SbV4f *this, const SbVec4f v, float tolerance) void SbV4fGetReal(const SbV4f *this, SbVec3f *v) SbV4fNorm(SbV4f *this) int SbV4fIsEq(SbV4f *this, const SbVec4f *v1, const SbVec4f *v2) int SbV4fIsNEq(SbV4f *this, const SbVec4f *v1, const SbVec4f *v2) Macros from class SbVec4f: SbV4fDot(SbVec4f vec0, SbVec4f vec1) SbV4fGetXYZW(float array[4], SbVec4f vec) SbV4fGetX_Y_Z_W(float x, float y, float z, float w, SbVec4f vec) SbV4fLen(SbVec4f vec) SbV4fNegate(SbVec4f vec) SbV4fSetXYZW(SbVec4f vec, float array[4]) SbV4fSetX_Y_Z_W(SbVec4f vec, float x, float y, float z, float w) SbV4fAdd(SbVec4f dest, SbVec4f src1, SbVec4f src2) SbV4fSub(SbVec4f dest, SbVec4f src1, SbVec4f src2) SbV4fMultBy(SbVec4f vec, float scalar) SbV4fDivBy(SbVec4f vec, float scalar) DESCRIPTION 4D vector class used to store homogeneous coordinates. This class is used in Inventor for arguments and return values. This object does not have Create or Delete functions because it is considered a simple datatype; instances of this class may be declared directly as local or global variables in C. C programmers can access the components of the vector as though it were a simple structure or use the access and operation functions described in this reference page: struct SbVec4f { float vec[4]; }; SbVec2f v1, v2; /* The next two lines produce equivalent vectors. */ v1.vec[0] = 1.0; v1.vec[1] = 1.0; v1.vec[2] = 1.0; v1.vec[3] = 1.0; SbV4fSetX_Y_Z_W( v2, 1.0, 1.0, 1.0, 1,0 ); FUNCTIONS SbBool SbV4fEquals(const SbV4f *this, const SbVec4f v, float tolerance) Equality comparison within given tolerance - the square of the length of the maximum distance between the two vectors. void SbV4fGetReal(const SbV4f *this, SbVec3f *v) Returns the real portion of the vector by dividing by the fourth value. SbV4fNorm(SbV4f *this) Changes vector to be unit length. int SbV4fIsEq(SbV4f *this, const SbVec4f *v1, const SbVec4f *v2) int SbV4fIsNEq(SbV4f *this, const SbVec4f *v1, const SbVec4f *v2) Equality comparison operators. MACROS SbV4fDot(SbVec4f vec0, SbVec4f vec1) Returns dot (inner) product of two vectors. SbV4fGetXYZW(float array[4], SbVec4f vec) SbV4fGetX_Y_Z_W(float x, float y, float z, float w, SbVec4f vec) Returns vector components. SbV4fLen(SbVec4f vec) Returns geometric length of vector. SbV4fNegate(SbVec4f vec) Negates each component of vector in place. SbV4fSetXYZW(SbVec4f vec, float array[4]) SbV4fSetX_Y_Z_W(SbVec4f vec, float x, float y, float z, float w) Sets the vector components. SbV4fAdd(SbVec4f dest, SbVec4f src1, SbVec4f src2) SbV4fSub(SbVec4f dest, SbVec4f src1, SbVec4f src2) Component-wise binary vector addition and subtraction operators. SbV4fMultBy(SbVec4f vec, float scalar) SbV4fDivBy(SbVec4f vec, float scalar) Component-wise scalar multiplication and division operators. FILE FORMAT/DEFAULTS Vec4f { } SEE ALSO SbVec2f, SbVec3f, SbVec2s, SbRotation