Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
SbVec4i32 Class Reference

4D vector class. More...

#include <Inventor/SbVec.h>

Public Member Functions

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

Friends

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

Detailed Description

4D vector class.

4D vector class used to store 4D 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, SbVec3i32, SbVec3s, SbVec4b, SbVec4d, SbVec4f, SbVec4s, SbVec4ub, SbVec4ui32, SbVec4us

Definition at line 2639 of file SbVec.h.

Constructor & Destructor Documentation

◆ SbVec4i32() [1/4]

SbVec4i32::SbVec4i32 ( )
inline

Default constructor.

The vector is initialized with zeros.

Definition at line 2644 of file SbVec.h.

◆ SbVec4i32() [2/4]

SbVec4i32::SbVec4i32 ( const int32_t  v[4])
inlineexplicit

Constructor given an array of 4 components.

Definition at line 2648 of file SbVec.h.

◆ SbVec4i32() [3/4]

SbVec4i32::SbVec4i32 ( int32_t  x,
int32_t  y,
int32_t  z,
int32_t  w 
)
inline

Constructor given 4 individual components.

Definition at line 2652 of file SbVec.h.

◆ SbVec4i32() [4/4]

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

Constructor that converts an arbitrary SbVec4 to an SbVec4i32.

Definition at line 2771 of file SbVec.h.

Member Function Documentation

◆ dot()

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

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

Definition at line 2656 of file SbVec.h.

◆ getValue() [1/2]

const int32_t * SbVec4i32::getValue ( ) const
inline

Returns pointer to array of 4 components.

Definition at line 2661 of file SbVec.h.

◆ getValue() [2/2]

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

Returns 4 individual components.

◆ negate()

void SbVec4i32::negate ( )

Negates each component of vector in place.

◆ operator*=() [1/2]

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

Component-wise scalar multiplication operator.

◆ operator*=() [2/2]

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

Component-wise scalar multiplication operator.

◆ operator+=()

SbVec4i32 & SbVec4i32::operator+= ( const SbVec4i32 u)

Component-wise vector addition operator.

◆ operator-()

SbVec4i32 SbVec4i32::operator- ( ) const

Nondestructive unary negation - returns a new vector.

◆ operator-=()

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

Component-wise vector subtraction operator.

◆ operator/=() [1/2]

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

Component-wise scalar division operator.

Definition at line 2702 of file SbVec.h.

◆ operator/=() [2/2]

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

Component-wise scalar division operator.

◆ operator[]() [1/2]

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

Accesses indexed component of vector.

Definition at line 2681 of file SbVec.h.

◆ operator[]() [2/2]

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

Accesses indexed component of vector.

Definition at line 2685 of file SbVec.h.

◆ setValue() [1/2]

SbVec4i32 & SbVec4i32::setValue ( const int32_t  v[4])

Sets value of vector from array of 4 components.

◆ setValue() [2/2]

SbVec4i32 & SbVec4i32::setValue ( int32_t  x,
int32_t  y,
int32_t  z,
int32_t  w 
)

Sets value of vector from 4 individual components.

Friends And Related Symbol Documentation

◆ operator!=

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

Inequality comparison operator.

Definition at line 2759 of file SbVec.h.

◆ operator* [1/4]

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

Component-wise binary scalar multiplication operator.

◆ operator* [2/4]

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

Component-wise binary scalar multiplication operator.

◆ operator* [3/4]

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

Component-wise binary scalar multiplication operator.

Definition at line 2732 of file SbVec.h.

◆ operator* [4/4]

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

Component-wise binary scalar multiplication operator.

Definition at line 2727 of file SbVec.h.

◆ operator+

SbVec4i32 operator+ ( const SbVec4i32 v1,
const SbVec4i32 v2 
)
friend

Component-wise binary vector addition operator.

◆ operator-

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

Component-wise binary vector subtraction operator.

◆ operator/ [1/2]

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

Component-wise binary scalar division operator.

Definition at line 2741 of file SbVec.h.

◆ operator/ [2/2]

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

Component-wise binary scalar division operator.

◆ operator<<

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

Writes the vector to the specified output stream.

Definition at line 3685 of file SbVec.h.

◆ operator==

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

Equality comparison operator.


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