Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
SbVec3i32 Class Reference

3D vector class. More...

#include <Inventor/SbVec.h>

Public Member Functions

 SbVec3i32 ()
 Default constructor.
 
 SbVec3i32 (const int32_t v[3])
 Constructor given an array of 3 components.
 
 SbVec3i32 (int32_t x, int32_t y, int32_t z)
 Constructor given 3 individual components.
 
 SbVec3i32 (const SbVec3s &vec)
 Constructor given an SbVec3s (adapter).
 
int32_t dot (const SbVec3i32 &v) const
 Returns dot (inner) product of vector and another vector.
 
const int32_t * getValue () const
 Returns pointer to array of 3 components.
 
void getValue (int32_t &x, int32_t &y, int32_t &z) const
 Returns 3 individual components.
 
void negate ()
 Negates each component of vector in place.
 
SbVec3i32setValue (const int32_t v[3])
 Sets value of vector from array of 3 components.
 
SbVec3i32setValue (int32_t x, int32_t y, int32_t z)
 Sets value of vector from 3 individual components.
 
SbVec3i32setValue (const SbVec3s &v)
 Sets value of vector from an SbVec3s (adapter).
 
SbVec3i32 operator= (const SbVec3s &v)
 Assignment operator given an SbVec3s (adapter).
 
int32_t & operator[] (int i)
 Accesses indexed component of vector.
 
const int32_t & operator[] (int i) const
 Accesses indexed component of vector.
 
SbVec3i32operator*= (int d)
 Component-wise scalar multiplication operator.
 
SbVec3i32operator*= (double d)
 Component-wise scalar multiplication operator.
 
SbVec3i32operator/= (int d)
 Component-wise scalar division operator.
 
SbVec3i32operator/= (double d)
 Component-wise scalar division operator.
 
SbVec3i32operator+= (const SbVec3i32 &u)
 Component-wise vector addition operator.
 
SbVec3i32operator/= (const SbVec3i32 &u)
 Component-wise vector division operator.
 
SbVec3i32operator-= (const SbVec3i32 &u)
 Component-wise vector subtraction operator.
 
SbVec3i32 operator- () const
 Nondestructive unary negation - returns a new vector.
 
SbVec3i32 operator* (int d) const
 Component-wise binary scalar multiplication operator.
 
SbVec3i32 operator* (const SbVec3i32 &v) const
 Component-wise vector multiplication operator.
 
SbVec3i32operator*= (const SbVec3i32 &v)
 Component-wise vector multiplication operator.
 
SbVec3i32 operator+ (const SbVec3i32 &v) const
 Component-wise binary vector addition operator.
 
template<typename T >
 SbVec3i32 (const T &v)
 Constructor that converts an arbitrary SbVec3 to an SbVec3i32.
 
int32_t getMaxComponent () const
 Returns max(x, y, z)
 

Friends

SbVec3i32 operator* (const SbVec3i32 &v, double d)
 Component-wise binary scalar multiplication operator.
 
SbVec3i32 operator* (int d, const SbVec3i32 &v)
 Component-wise binary scalar multiplication operator.
 
SbVec3i32 operator* (double d, const SbVec3i32 &v)
 Component-wise binary scalar multiplication operator.
 
SbVec3i32 operator/ (const SbVec3i32 &v, int d)
 Component-wise binary scalar division operator.
 
SbVec3i32 operator/ (const SbVec3i32 &v, double d)
 Component-wise binary scalar division operator.
 
SbVec3i32 operator- (const SbVec3i32 &v1, const SbVec3i32 &v2)
 Component-wise binary vector subtraction operator.
 
int operator== (const SbVec3i32 &v1, const SbVec3i32 &v2)
 Equality comparison operator.
 
int operator!= (const SbVec3i32 &v1, const SbVec3i32 &v2)
 Inequality comparison operator.
 
std::ostream & operator<< (std::ostream &os, const SbVec3i32 &v)
 Writes the vector to the specified output stream.
 

Detailed Description

3D vector class.

3D vector class used to store 3D vectors and points. This class is used throughout Open Inventor for arguments and return values.

SEE ALSO

SbRotation, SbRotationd, SbVec2d, SbVec2f, SbVec2i32, SbVec2s, SbVec3d, SbVec3f, SbVec3s, SbVec4b, SbVec4d, SbVec4f, SbVec4i32, SbVec4s, SbVec4ub, SbVec4ui32, SbVec4us

Definition at line 1517 of file SbVec.h.

Constructor & Destructor Documentation

◆ SbVec3i32() [1/5]

SbVec3i32::SbVec3i32 ( )
inline

Default constructor.

The vector is initialized with zeros.

Definition at line 1522 of file SbVec.h.

◆ SbVec3i32() [2/5]

SbVec3i32::SbVec3i32 ( const int32_t  v[3])
inlineexplicit

Constructor given an array of 3 components.

Definition at line 1526 of file SbVec.h.

◆ SbVec3i32() [3/5]

SbVec3i32::SbVec3i32 ( int32_t  x,
int32_t  y,
int32_t  z 
)
inline

Constructor given 3 individual components.

Definition at line 1530 of file SbVec.h.

◆ SbVec3i32() [4/5]

SbVec3i32::SbVec3i32 ( const SbVec3s vec)

Constructor given an SbVec3s (adapter).

◆ SbVec3i32() [5/5]

template<typename T >
SbVec3i32::SbVec3i32 ( const T &  v)
inlineexplicit

Constructor that converts an arbitrary SbVec3 to an SbVec3i32.

Definition at line 1733 of file SbVec.h.

Member Function Documentation

◆ dot()

int32_t SbVec3i32::dot ( const SbVec3i32 v) const
inline

Returns dot (inner) product of vector and another vector.

Definition at line 1538 of file SbVec.h.

◆ getMaxComponent()

int32_t SbVec3i32::getMaxComponent ( ) const
inline

Returns max(x, y, z)

Definition at line 1751 of file SbVec.h.

◆ getValue() [1/2]

const int32_t * SbVec3i32::getValue ( ) const
inline

Returns pointer to array of 3 components.

Definition at line 1546 of file SbVec.h.

◆ getValue() [2/2]

void SbVec3i32::getValue ( int32_t &  x,
int32_t &  y,
int32_t &  z 
) const

Returns 3 individual components.

◆ negate()

void SbVec3i32::negate ( )

Negates each component of vector in place.

◆ operator*() [1/2]

SbVec3i32 SbVec3i32::operator* ( const SbVec3i32 v) const
inline

Component-wise vector multiplication operator.

Definition at line 1654 of file SbVec.h.

◆ operator*() [2/2]

SbVec3i32 SbVec3i32::operator* ( int  d) const
inline

Component-wise binary scalar multiplication operator.

Definition at line 1646 of file SbVec.h.

◆ operator*=() [1/3]

SbVec3i32 & SbVec3i32::operator*= ( const SbVec3i32 v)
inline

Component-wise vector multiplication operator.

Definition at line 1664 of file SbVec.h.

◆ operator*=() [2/3]

SbVec3i32 & SbVec3i32::operator*= ( double  d)

Component-wise scalar multiplication operator.

◆ operator*=() [3/3]

SbVec3i32 & SbVec3i32::operator*= ( int  d)

Component-wise scalar multiplication operator.

◆ operator+()

SbVec3i32 SbVec3i32::operator+ ( const SbVec3i32 v) const
inline

Component-wise binary vector addition operator.

Definition at line 1696 of file SbVec.h.

◆ operator+=()

SbVec3i32 & SbVec3i32::operator+= ( const SbVec3i32 u)
inline

Component-wise vector addition operator.

Definition at line 1616 of file SbVec.h.

◆ operator-()

SbVec3i32 SbVec3i32::operator- ( ) const

Nondestructive unary negation - returns a new vector.

◆ operator-=()

SbVec3i32 & SbVec3i32::operator-= ( const SbVec3i32 u)

Component-wise vector subtraction operator.

◆ operator/=() [1/3]

SbVec3i32 & SbVec3i32::operator/= ( const SbVec3i32 u)
inline

Component-wise vector division operator.

Definition at line 1627 of file SbVec.h.

◆ operator/=() [2/3]

SbVec3i32 & SbVec3i32::operator/= ( double  d)
inline

Component-wise scalar division operator.

Definition at line 1611 of file SbVec.h.

◆ operator/=() [3/3]

SbVec3i32 & SbVec3i32::operator/= ( int  d)

Component-wise scalar division operator.

◆ operator=()

SbVec3i32 SbVec3i32::operator= ( const SbVec3s v)

Assignment operator given an SbVec3s (adapter).

◆ operator[]() [1/2]

int32_t & SbVec3i32::operator[] ( int  i)
inline

Accesses indexed component of vector.

Definition at line 1590 of file SbVec.h.

◆ operator[]() [2/2]

const int32_t & SbVec3i32::operator[] ( int  i) const
inline

Accesses indexed component of vector.

Definition at line 1594 of file SbVec.h.

◆ setValue() [1/3]

SbVec3i32 & SbVec3i32::setValue ( const int32_t  v[3])
inline

Sets value of vector from array of 3 components.

Definition at line 1558 of file SbVec.h.

◆ setValue() [2/3]

SbVec3i32 & SbVec3i32::setValue ( const SbVec3s v)

Sets value of vector from an SbVec3s (adapter).

◆ setValue() [3/3]

SbVec3i32 & SbVec3i32::setValue ( int32_t  x,
int32_t  y,
int32_t  z 
)
inline

Sets value of vector from 3 individual components.

Definition at line 1570 of file SbVec.h.

Friends And Related Symbol Documentation

◆ operator!=

int operator!= ( const SbVec3i32 v1,
const SbVec3i32 v2 
)
friend

Inequality comparison operator.

Definition at line 1721 of file SbVec.h.

◆ operator* [1/3]

SbVec3i32 operator* ( const SbVec3i32 v,
double  d 
)
friend

Component-wise binary scalar multiplication operator.

◆ operator* [2/3]

SbVec3i32 operator* ( double  d,
const SbVec3i32 v 
)
friend

Component-wise binary scalar multiplication operator.

Definition at line 1682 of file SbVec.h.

◆ operator* [3/3]

SbVec3i32 operator* ( int  d,
const SbVec3i32 v 
)
friend

Component-wise binary scalar multiplication operator.

Definition at line 1677 of file SbVec.h.

◆ operator-

SbVec3i32 operator- ( const SbVec3i32 v1,
const SbVec3i32 v2 
)
friend

Component-wise binary vector subtraction operator.

Definition at line 1707 of file SbVec.h.

◆ operator/ [1/2]

SbVec3i32 operator/ ( const SbVec3i32 v,
double  d 
)
friend

Component-wise binary scalar division operator.

Definition at line 1691 of file SbVec.h.

◆ operator/ [2/2]

SbVec3i32 operator/ ( const SbVec3i32 v,
int  d 
)
friend

Component-wise binary scalar division operator.

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const SbVec3i32 v 
)
friend

Writes the vector to the specified output stream.

Definition at line 3636 of file SbVec.h.

◆ operator==

int operator== ( const SbVec3i32 v1,
const SbVec3i32 v2 
)
friend

Equality comparison operator.


The documentation for this class was generated from the following file: