'\"! tbl | mmdoc '\"macro stdmacro .ie n \{\ . ds Cr \fB . ds Cb \fB .\} .el \{\ . ds Cr \f7 . ds Cb \f8 .\} .TH SbVec2s(3IV) .SH NAME SbVec2s \(em 2D vector class .SH INHERITS FROM SbVec2s .SH SYNOPSIS .ps -1 \*(Cr#include .sp .in 1i \f1Methods from class SbVec2s: .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\ \} \*(CbSbVec2s\*(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\ \} \*(CbSbVec2s\*(Cr(const short v[2]) .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\ \} \*(CbSbVec2s\*(Cr(short x, short y) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crint32_t .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbdot\*(Cr(const SbVec2f &v) const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crconst short * .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(short &x, short &y) 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 \*(CrSbVec2s & .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetValue\*(Cr(const short v[2]) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec2s & .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetValue\*(Cr(short x, short y) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crshort & .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 short & .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 \*(CrSbVec2s & .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator *=\*(Cr(int d) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec2s & .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator *=\*(Cr(double d) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec2s & .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator /=\*(Cr(int d) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec2s & .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator /=\*(Cr(double d) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec2s & .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator +=\*(Cr(const SbVec2s &u) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec2s & .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator -=\*(Cr(const SbVec2s &u) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec2s .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 \*(CrSbVec2s .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator *\*(Cr(const SbVec2s &v, int d) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec2s .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator *\*(Cr(const SbVec2s &v, double d) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec2s .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator *\*(Cr(int d, const SbVec2s &v) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec2s .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator *\*(Cr(double d, const SbVec2s &v) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec2s .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator /\*(Cr(const SbVec2s &v, int d) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec2s .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator /\*(Cr(const SbVec2s &v, double d) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec2s .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator +\*(Cr(const SbVec2s &v1, const SbVec2s &v2) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec2s .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator -\*(Cr(const SbVec2s &v1, const SbVec2s &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 SbVec2s &v1, const SbVec2s &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 SbVec2s &v1, const SbVec2s &v2) .sp .SH DESCRIPTION 2D vector class used to store 2D integer 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\ \} \*(CbSbVec2s\*(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\ \} \*(CbSbVec2s\*(Cr(const short v[2]) .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\ \} \*(CbSbVec2s\*(Cr(short x, short y) .br .in 1i \f1Constructor given 2 components. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crint32_t .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbdot\*(Cr(const SbVec2f &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 \*(Crconst short * .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(short &x, short &y) const .br .in 1i \f1Returns vector components. .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 \*(CrSbVec2s & .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetValue\*(Cr(const short v[2]) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec2s & .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetValue\*(Cr(short x, short y) .br .in 1i \f1Sets vector components. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crshort & .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 short & .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 \*(CrSbVec2s & .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator *=\*(Cr(int d) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec2s & .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator *=\*(Cr(double d) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec2s & .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator /=\*(Cr(int d) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec2s & .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator /=\*(Cr(double 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 \*(CrSbVec2s & .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator +=\*(Cr(const SbVec2s &u) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec2s & .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator -=\*(Cr(const SbVec2s &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 \*(CrSbVec2s .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 \*(CrSbVec2s .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator *\*(Cr(const SbVec2s &v, int d) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec2s .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator *\*(Cr(const SbVec2s &v, double d) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec2s .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator *\*(Cr(int d, const SbVec2s &v) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec2s .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator *\*(Cr(double d, const SbVec2s &v) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec2s .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator /\*(Cr(const SbVec2s &v, int d) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec2s .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator /\*(Cr(const SbVec2s &v, double 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 \*(CrSbVec2s .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator +\*(Cr(const SbVec2s &v1, const SbVec2s &v2) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbVec2s .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator -\*(Cr(const SbVec2s &v1, const SbVec2s &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 SbVec2s &v1, const SbVec2s &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 SbVec2s &v1, const SbVec2s &v2) .br .in 1i \f1Equality comparison operators. .sp .in 0.5i .SH SEE ALSO \*(CbSbVec3f, SbVec4f, SbVec2f