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

VSG extension 4D vector class. More...

#include <Inventor/SbVec.h>

Public Member Functions

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

Friends

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

Detailed Description

VSG extension 4D vector class.

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

Definition at line 2014 of file SbVec.h.

Constructor & Destructor Documentation

◆ SbVec4b() [1/4]

SbVec4b::SbVec4b ( )
inline

Default constructor.

The vector is initialized with zeros.

Definition at line 2020 of file SbVec.h.

◆ SbVec4b() [2/4]

SbVec4b::SbVec4b ( const char  v[4])
inlineexplicit

Constructor given 4 components.

Definition at line 2025 of file SbVec.h.

◆ SbVec4b() [3/4]

SbVec4b::SbVec4b ( char  x,
char  y,
char  z,
char  w 
)
inline

Constructor given 4 components.

Definition at line 2030 of file SbVec.h.

◆ SbVec4b() [4/4]

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

Constructor that converts an arbitrary SbVec4 to an SbVec4b.

Definition at line 2162 of file SbVec.h.

Member Function Documentation

◆ dot()

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

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

Definition at line 2035 of file SbVec.h.

◆ getValue() [1/2]

const char * SbVec4b::getValue ( ) const
inline

Returns vector components.

Definition at line 2042 of file SbVec.h.

◆ getValue() [2/2]

void SbVec4b::getValue ( char &  x,
char &  y,
char &  z,
char &  w 
) const

Returns vector components.

◆ negate()

void SbVec4b::negate ( )

Negates each component of vector in place.

◆ operator*=() [1/2]

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

Component-wise scalar multiplication operator.

◆ operator*=() [2/2]

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

Component-wise scalar multiplication operator.

◆ operator+=()

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

Component-wise vector addition operator.

◆ operator-()

SbVec4b SbVec4b::operator- ( ) const

Nondestructive unary negation - returns a new vector.

◆ operator-=()

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

Component-wise vector subtraction operator.

◆ operator/=() [1/2]

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

Component-wise scalar division operator.

Definition at line 2088 of file SbVec.h.

◆ operator/=() [2/2]

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

Component-wise scalar division operator.

◆ operator[]() [1/2]

char & SbVec4b::operator[] ( int  i)
inline

Accesses indexed component of vector.

Definition at line 2068 of file SbVec.h.

◆ operator[]() [2/2]

const char & SbVec4b::operator[] ( int  i) const
inline

Definition at line 2069 of file SbVec.h.

◆ setValue() [1/2]

SbVec4b & SbVec4b::setValue ( char  x,
char  y,
char  z,
char  w 
)

Sets vector components.

◆ setValue() [2/2]

SbVec4b & SbVec4b::setValue ( const char  v[4])

Sets vector components.

Friends And Related Symbol Documentation

◆ operator!=

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

Inequality comparison operator.

Definition at line 2150 of file SbVec.h.

◆ operator* [1/4]

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

Component-wise binary scalar multiplication operator.

◆ operator* [2/4]

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

Component-wise binary scalar multiplication operator.

◆ operator* [3/4]

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

Component-wise binary scalar multiplication operator.

Definition at line 2121 of file SbVec.h.

◆ operator* [4/4]

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

Component-wise binary scalar multiplication operator.

Definition at line 2116 of file SbVec.h.

◆ operator+

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

Component-wise binary vector addition operator.

◆ operator-

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

Component-wise binary vector subtraction operator.

◆ operator/ [1/2]

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

Component-wise binary scalar division operator.

Definition at line 2130 of file SbVec.h.

◆ operator/ [2/2]

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

Component-wise binary scalar division operator.

◆ operator<<

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

Writes the vector to the specified output stream.

Definition at line 3661 of file SbVec.h.

◆ operator==

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

Equality comparison operator.


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