'\"! tbl | mmdoc '\"macro stdmacro .ie n \{\ . ds Cr \fB . ds Cb \fB .\} .el \{\ . ds Cr \f7 . ds Cb \f8 .\} .TH SbVec3f(3IV) .SH NAME SbVec3f \(em 3D vector class .SH INHERITS FROM SbVec3f .SH SYNOPSIS .ps -1 \*(Cr#include .sp .in 1i \f1Methods from class SbVec3f: .in 0.5i .sp .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Cr .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbSbVec3f\*(Cr() .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Cr .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbSbVec3f\*(Cr(const float v[3]) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Cr .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbSbVec3f\*(Cr(float x, float y, float z) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Cr .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbSbVec3f\*(Cr(SbPlane &p0, SbPlane &p1, SbPlane &p2) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec3f .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbcross\*(Cr(const SbVec3f &v) const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crfloat .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbdot\*(Cr(const SbVec3f &v) const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbequals\*(Cr(const SbVec3f v, float tolerance) const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec3f .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetClosestAxis\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crconst float * .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetValue\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetValue\*(Cr(float &x, float &y, float &z) const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crfloat .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cblength\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbnegate\*(Cr() .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crfloat .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbnormalize\*(Cr() .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec3f & .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetValue\*(Cr(const float v[3]) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec3f & .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetValue\*(Cr(float x, float y, float z) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec3f & .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetValue\*(Cr(const SbVec3f &barycentic, const SbVec3f &v0, const SbVec3f &v1, const SbVec3f &v2) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crfloat & .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator [\|]\*(Cr(int i) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crconst float & .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator [\|]\*(Cr(int i) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec3f & .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator *=\*(Cr(float d) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec3f & .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator /=\*(Cr(float d) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec3f & .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator +=\*(Cr(const SbVec3f &u) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec3f & .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator -=\*(Cr(const SbVec3f &u) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec3f .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator -\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec3f .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator *\*(Cr(const SbVec3f &v, float d) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec3f .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator *\*(Cr(float d, const SbVec3f &v) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec3f .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator /\*(Cr(const SbVec3f &v, float d) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec3f .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator +\*(Cr(const SbVec3f &v1, const SbVec3f &v2) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec3f .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator -\*(Cr(const SbVec3f &v1, const SbVec3f &v2) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crint .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator ==\*(Cr(const SbVec3f &v1, const SbVec3f &v2) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crint .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator !=\*(Cr(const SbVec3f &v1, const SbVec3f &v2) .sp .SH DESCRIPTION 3D vector class used to store 3D vectors and points. This class is used throughout Inventor for arguments and return values. .SH METHODS .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Cr .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbSbVec3f\*(Cr() .br .in 1i \f1Default constructor. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Cr .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbSbVec3f\*(Cr(const float v[3]) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Cr .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbSbVec3f\*(Cr(float x, float y, float z) .br .in 1i \f1Constructor given vector components. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Cr .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbSbVec3f\*(Cr(SbPlane &p0, SbPlane &p1, SbPlane &p2) .br .in 1i \f1Constructor given 3 planes. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec3f .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbcross\*(Cr(const SbVec3f &v) const .br .in 1i \f1Returns right-handed cross product of vector and another vector. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crfloat .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbdot\*(Cr(const SbVec3f &v) const .br .in 1i \f1Returns dot (inner) product of vector and another vector. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbequals\*(Cr(const SbVec3f v, float tolerance) const .br .in 1i \f1Equality comparison within given tolerance \(em the square of the length of the maximum distance between the two vectors. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec3f .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetClosestAxis\*(Cr() const .br .in 1i \f1Returns principal axis that is closest (based on maximum dot product) to this vector. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crconst float * .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetValue\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetValue\*(Cr(float &x, float &y, float &z) const .br .in 1i \f1Returns vector components. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crfloat .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cblength\*(Cr() const .br .in 1i \f1Returns geometric length of vector. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbnegate\*(Cr() .br .in 1i \f1Negates each component of vector in place. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crfloat .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbnormalize\*(Cr() .br .in 1i \f1Changes vector to be unit length, returning the length before normalization. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec3f & .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetValue\*(Cr(const float v[3]) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec3f & .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetValue\*(Cr(float x, float y, float z) .br .in 1i \f1Sets the vector components. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec3f & .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetValue\*(Cr(const SbVec3f &barycentic, const SbVec3f &v0, const SbVec3f &v1, const SbVec3f &v2) .br .in 1i \f1Sets value of vector as the weighted average of 3 other vectors. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crfloat & .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator [\|]\*(Cr(int i) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crconst float & .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator [\|]\*(Cr(int i) .br .in 1i \f1Accesses indexed component of vector. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec3f & .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator *=\*(Cr(float d) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec3f & .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator /=\*(Cr(float d) .br .in 1i \f1Component-wise scalar multiplication and division operators. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec3f & .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator +=\*(Cr(const SbVec3f &u) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec3f & .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator -=\*(Cr(const SbVec3f &u) .br .in 1i \f1Component-wise vector addition and subtraction operators. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec3f .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator -\*(Cr() const .br .in 1i \f1Nondestructive unary negation \(em returns a new vector. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec3f .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator *\*(Cr(const SbVec3f &v, float d) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec3f .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator *\*(Cr(float d, const SbVec3f &v) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec3f .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator /\*(Cr(const SbVec3f &v, float d) .br .in 1i \f1Component-wise binary scalar multiplication and division operators. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec3f .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator +\*(Cr(const SbVec3f &v1, const SbVec3f &v2) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec3f .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator -\*(Cr(const SbVec3f &v1, const SbVec3f &v2) .br .in 1i \f1Component-wise binary vector addition and subtraction operators. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crint .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator ==\*(Cr(const SbVec3f &v1, const SbVec3f &v2) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crint .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator !=\*(Cr(const SbVec3f &v1, const SbVec3f &v2) .br .in 1i \f1Equality comparison operators. .sp .in 0.5i .SH SEE ALSO \*(CbSbVec2f, SbVec4f, SbVec2s, SbRotation