SbVec4us Class Reference
[Basics]

VSG extension 4D vector class. More...

#include <Inventor/SbVec.h>

List of all members.

Public Member Functions

 SbVec4us ()
 SbVec4us (const unsigned short v[4])
 SbVec4us (unsigned short x, unsigned short y, unsigned short z, unsigned short w)
int32_t dot (const SbVec4us &v) const
const unsigned short * getValue () const
void getValue (unsigned short &x, unsigned short &y, unsigned short &z, unsigned short &w) const
void negate ()
SbVec4ussetValue (const unsigned short v[4])
SbVec4ussetValue (unsigned short x, unsigned short y, unsigned short z, unsigned short w)
SbVec4usoperator*= (int d)
SbVec4usoperator*= (double d)
SbVec4usoperator/= (int d)
SbVec4usoperator/= (double d)
SbVec4usoperator+= (const SbVec4us &u)
SbVec4usoperator-= (const SbVec4us &u)
SbVec4us operator- () const
template<typename T >
 SbVec4us (const T &v)

Friends

SbVec4us operator* (const SbVec4us &v, int d)
SbVec4us operator* (const SbVec4us &v, double d)
SbVec4us operator* (int d, const SbVec4us &v)
SbVec4us operator* (double d, const SbVec4us &v)
SbVec4us operator/ (const SbVec4us &v, int d)
SbVec4us operator/ (const SbVec4us &v, double d)
SbVec4us operator+ (const SbVec4us &v1, const SbVec4us &v2)
SbVec4us operator- (const SbVec4us &v1, const SbVec4us &v2)
int operator== (const SbVec4us &v1, const SbVec4us &v2)
int operator!= (const SbVec4us &v1, const SbVec4us &v2)
std::ostream & operator<< (std::ostream &os, const SbVec4us &v)



unsigned short & operator[] (int i)
const unsigned short & operator[] (int i) const

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, SbVec4b, SbVec4d, SbVec4f, SbVec4i32, SbVec4s, SbVec4ub, SbVec4ui32


Constructor & Destructor Documentation

SbVec4us::SbVec4us (  )  [inline]

Default constructor.

The vector is not initialized.

SbVec4us::SbVec4us ( const unsigned short  v[4]  )  [inline]

Constructor given 4 components.

SbVec4us::SbVec4us ( unsigned short  x,
unsigned short  y,
unsigned short  z,
unsigned short  w 
) [inline]

Constructor given 4 components.

template<typename T >
SbVec4us::SbVec4us ( const T &  v  )  [inline, explicit]

Constructor that converts an arbitrary SbVec4 to an SbVec4us.


Member Function Documentation

int32_t SbVec4us::dot ( const SbVec4us v  )  const [inline]

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

void SbVec4us::getValue ( unsigned short &  x,
unsigned short &  y,
unsigned short &  z,
unsigned short &  w 
) const

Returns vector components.

const unsigned short* SbVec4us::getValue (  )  const [inline]

Returns vector components.

void SbVec4us::negate (  ) 

Negates each component of vector in place.

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

Component-wise scalar multiplication operator.

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

Component-wise scalar multiplication operator.

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

Component-wise vector addition operator.

SbVec4us SbVec4us::operator- (  )  const

Nondestructive unary negation - returns a new vector.

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

Component-wise vector subtraction operator.

SbVec4us& SbVec4us::operator/= ( double  d  )  [inline]

Component-wise scalar division operator.

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

Component-wise scalar division operator.

const unsigned short& SbVec4us::operator[] ( int  i  )  const [inline]

Accesses indexed component of vector.

unsigned short& SbVec4us::operator[] ( int  i  )  [inline]

Accesses indexed component of vector.

SbVec4us& SbVec4us::setValue ( unsigned short  x,
unsigned short  y,
unsigned short  z,
unsigned short  w 
)

Sets vector components.

SbVec4us& SbVec4us::setValue ( const unsigned short  v[4]  ) 

Sets vector components.


Friends And Related Function Documentation

int operator!= ( const SbVec4us v1,
const SbVec4us v2 
) [friend]

Inequality comparison operator.

SbVec4us operator* ( double  d,
const SbVec4us v 
) [friend]

Component-wise binary scalar multiplication operator.

SbVec4us operator* ( int  d,
const SbVec4us v 
) [friend]

Component-wise binary scalar multiplication operator.

SbVec4us operator* ( const SbVec4us v,
double  d 
) [friend]

Component-wise binary scalar multiplication operator.

SbVec4us operator* ( const SbVec4us v,
int  d 
) [friend]

Component-wise binary scalar multiplication operator.

SbVec4us operator+ ( const SbVec4us v1,
const SbVec4us v2 
) [friend]

Component-wise binary vector addition operator.

SbVec4us operator- ( const SbVec4us v1,
const SbVec4us v2 
) [friend]

Component-wise binary vector subtraction operator.

SbVec4us operator/ ( const SbVec4us v,
double  d 
) [friend]

Component-wise binary scalar division operator.

SbVec4us operator/ ( const SbVec4us v,
int  d 
) [friend]

Component-wise binary scalar division operator.

std::ostream& operator<< ( std::ostream &  os,
const SbVec4us v 
) [friend]

Writes the vector to the specified output stream.

int operator== ( const SbVec4us v1,
const SbVec4us v2 
) [friend]

Equality comparison operator.


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

Open Inventor Toolkit reference manual, generated on 12 Feb 2024
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/