Coin Logo http://www.sim.no
http://www.coin3d.org

SbVec4us Class Reference
[Base classes]

The SbVec4us class is a 4 dimensional vector with unsigned short integer coordinates. More...

#include <Inventor/SbVec4us.h>

List of all members.

Public Member Functions

 SbVec4us (void)
 SbVec4us (const unsigned short v[4])
 SbVec4us (unsigned short x, unsigned short y, unsigned short z, unsigned short w)
 SbVec4us (const SbVec4s &v)
 SbVec4us (const SbVec4ub &v)
 SbVec4us (const SbVec4ui32 &v)
SbVec4ussetValue (const unsigned short v[4])
SbVec4ussetValue (unsigned short x, unsigned short y, unsigned short z, unsigned short w)
SbVec4ussetValue (const SbVec4s &v)
SbVec4ussetValue (const SbVec4ub &v)
SbVec4ussetValue (const SbVec4ui32 &v)
const unsigned short * getValue (void) const
void getValue (unsigned short &x, unsigned short &y, unsigned short &z, unsigned short &w) const
unsigned short & operator[] (int i)
const unsigned short & operator[] (int i) const
int32_t dot (const SbVec4us &v) const
void negate (void)
SbVec4usoperator*= (int d)
SbVec4usoperator*= (double d)
SbVec4usoperator/= (int d)
SbVec4usoperator/= (double d)
SbVec4usoperator+= (const SbVec4us &v)
SbVec4usoperator-= (const SbVec4us &v)
SbVec4us operator- (void) const

Protected Attributes

unsigned short vec [4]


Detailed Description

The SbVec4us class is a 4 dimensional vector with unsigned short integer coordinates.

This vector class provides storage for a 3 dimensional homogeneoues vector (with the 4 components usually referred to as <x, y, z, w>) aswell as simple integer precision arithmetic operations.

See also:
SbVec2us, SbVec3us, SbVec4b, SbVec4ub, SbVec4s, SbVec4i32, SbVec4ui32
Since:
Coin-2.5

Constructor & Destructor Documentation

SbVec4us::SbVec4us ( void   )  [inline]

The default constructor does nothing. The vector coordinates will be uninitialized until a call the setValue().

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

Constructs an SbVec4us instance with initial values from v.

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

Constructs an SbVec4us instance with the initial homogeneous vector set to <x,y,z,w>.

SbVec4us::SbVec4us ( const SbVec4s v  )  [inline, explicit]

Constructs an SbVec4us instance with initial values from the unsigned short integer precision vector v.

SbVec4us::SbVec4us ( const SbVec4ub v  )  [inline, explicit]

Constructs an SbVec4us instance with initial values from the 8-bit integer precision vector v.

SbVec4us::SbVec4us ( const SbVec4ui32 v  )  [inline, explicit]

Constructs an SbVec4us instance with initial values from the unsigned 32-bit integer precision vector v.


Member Function Documentation

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

Set new coordinates for the vector from v. Returns reference to self.

See also:
getValue()

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

Set new coordinates for the vector. Returns reference to self.

See also:
getValue()

SbVec4us & SbVec4us::setValue ( const SbVec4s v  ) 

Sets this vector to the short integer precision vector v, converting the vector to a unsigned short integer precision vector.

SbVec4us & SbVec4us::setValue ( const SbVec4ub v  ) 

Sets this vector to the unsigned 8-bit integer precision vector v, converting the vector to a unsigned short integer precision vector.

SbVec4us & SbVec4us::setValue ( const SbVec4ui32 v  ) 

Sets this vector to the unsigned 32-bit integer precision vector v, converting the vector to a unsigned short integer precision vector.

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

Returns a pointer to an array of four unsigned short integers containing the x, y, z and w coordinates of the vector.

See also:
setValue()

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

Returns the x, y, z and w coordinates of the vector.

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

Index operator. Returns modifiable x, y, z or w coordinate of the vector.

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

Index operator. Returns non-modifiable x, y, z or w coordinate of the vector.

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

Calculates and returns the result of taking the dot product of this vector and v.

void SbVec4us::negate ( void   ) 

Negate the vector (i.e. point it in the opposite direction)

Referenced by operator-().

SbVec4us & SbVec4us::operator*= ( int  d  )  [inline]

Multiply components of vector with scalar value d. Returns reference to self.

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

Multiply components of vector with value d. Returns reference to self.

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

Divides components of vector with scalar value d. Returns reference to self.

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

Divides components of vector with scalar value d. Returns reference to self.

SbVec4us & SbVec4us::operator+= ( const SbVec4us v  )  [inline]

Adds this vector and vector u. Returns reference to self.

SbVec4us & SbVec4us::operator-= ( const SbVec4us v  )  [inline]

Subtracts v from this vector. Returns reference to self.

SbVec4us SbVec4us::operator- ( void   )  const [inline]

Non-destructive negation operator. Returns a new SbVec4us instance which points in the opposite direction of this vector.

See also:
negate()

References negate().


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

Copyright © 1998-2007 by Systems in Motion AS. All rights reserved.

Generated on Mon Feb 23 16:33:42 2009 for Coin by Doxygen. 1.5.8