SbVec3s.3coin2

Langue: en

Version: 380762 (fedora - 01/12/10)

Section: 3 (Bibliothèques de fonctions)

Sommaire

NAME

SbVec3s -

The SbVec3s class is a 3 dimensional vector with short integer coordinates.

SYNOPSIS


#include <Inventor/SbLinear.h>

Public Member Functions


SbVec3s (void)

SbVec3s (const short v[3])

SbVec3s (const short x, const short y, const short z)

SbVec3s (const SbVec3us &v)

SbVec3s (const SbVec3b &v)

SbVec3s (const SbVec3i32 &v)

SbVec3s (const SbVec3f &v)

SbVec3s (const SbVec3d &v)

int32_t dot (const SbVec3s &v) const

const short * getValue (void) const

void getValue (short &x, short &y, short &z) const

void negate (void)

SbVec3s & setValue (const short v[3])

SbVec3s & setValue (const short x, const short y, const short z)

SbVec3s & setValue (const SbVec3us &v)

SbVec3s & setValue (const SbVec3b &v)

SbVec3s & setValue (const SbVec3i32 &v)

SbVec3s & setValue (const SbVec3f &v)

SbVec3s & setValue (const SbVec3d &v)

short & operator[] (const int i)

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

SbVec3s & operator*= (int d)

SbVec3s & operator*= (double d)

SbVec3s & operator/= (int d)

SbVec3s & operator/= (double d)

SbVec3s & operator+= (const SbVec3s &u)

SbVec3s & operator-= (const SbVec3s &u)

SbVec3s operator- (void) const

void print (FILE *fp) const

Friends


SbVec3s operator* (const SbVec3s &v, int d)

SbVec3s operator* (const SbVec3s &v, double d)

SbVec3s operator* (int d, const SbVec3s &v)

SbVec3s operator* (double d, const SbVec3s &v)

SbVec3s operator/ (const SbVec3s &v, int d)

SbVec3s operator/ (const SbVec3s &v, double d)

SbVec3s operator+ (const SbVec3s &v1, const SbVec3s &v2)

SbVec3s operator- (const SbVec3s &v1, const SbVec3s &v2)

int operator== (const SbVec3s &v1, const SbVec3s &v2)

int operator!= (const SbVec3s &v1, const SbVec3s &v2)

Detailed Description

The SbVec3s class is a 3 dimensional vector with short integer coordinates.

This vector class provides storage for a 3 dimensional vector as well as simple integer arithmetic operations.

Be aware that this class is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API.

See also:

SbVec2s, SbVec4s, SbVec3b, SbVec3ub, SbVec3us, SbVec3i32, SbVec3ui32

Since:

Coin 2.0
TGS Inventor ?.?

Constructor & Destructor Documentation

SbVec3s::SbVec3s (void)The default constructor does nothing. The vector coordinates will be uninitialized until you do a setValue() call.

Referenced by operator-().

SbVec3s::SbVec3s (const short v[3])Constructs an SbVec3s instance with initial values from v.

SbVec3s::SbVec3s (const short x, const short y, const short z)Constructs an SbVec3s instance with the initial vector endpoint set to <x,y,z>.

SbVec3s::SbVec3s (const SbVec3us & v) [inline, explicit]Sets this vector to the unsigned short integer precision vector v, converting the vector to an short integer precision vector.

Since:

Coin-2.5

SbVec3s::SbVec3s (const SbVec3b & v) [inline, explicit]Sets this vector to the 8-bit integer precision vector v, converting the vector to an short integer precision vector.

Since:

Coin-2.5

SbVec3s::SbVec3s (const SbVec3i32 & v) [inline, explicit]Sets this vector to the unsigned 32-bit integer precision vector v, converting the vector to an short integer precision vector.

Since:

Coin-2.5

SbVec3s::SbVec3s (const SbVec3f & v) [inline, explicit]Sets this vector to the floating point precision vector v, converting the vector to an short integer precision vector.

Since:

Coin-2.5

SbVec3s::SbVec3s (const SbVec3d & v) [inline, explicit]Sets this vector to the double floating point precision vector v, converting the vector to an short integer precision vector.

Since:

Coin-2.5

Member Function Documentation

int32_t SbVec3s::dot (const SbVec3s & v) constCalculates and returns the result of taking the dot product of this vector and v.

const short * SbVec3s::getValue (void) constReturns a pointer to an array of three shorts containing the x, y and z coordinates of the vector.

See also:

setValue().

void SbVec3s::getValue (short & x, short & y, short & z) constReturns the x, y and z coordinates of the vector.

See also:

setValue().

void SbVec3s::negate (void)Negate the vector (i.e. point it in the opposite direction).

SbVec3s & SbVec3s::setValue (const short v[3])Set new coordinates for the vector from v. Returns reference to self.

See also:

getValue().

Referenced by SbBox3s::extendBy(), SbBox3s::makeEmpty(), and SbBox3s::setBounds().

SbVec3s & SbVec3s::setValue (const short x, const short y, const short z)Set new coordinates for the vector. Returns reference to self.

See also:

getValue().

SbVec3s & SbVec3s::setValue (const SbVec3us & v)Set new coordinates for the vector from v. Returns reference to self.

See also:

getValue().

Since:

Coin-2.5

SbVec3s & SbVec3s::setValue (const SbVec3b & v)Set new coordinates for the vector from v. Returns reference to self.

See also:

getValue().

Since:

Coin-2.5

SbVec3s & SbVec3s::setValue (const SbVec3i32 & v)Set new coordinates for the vector from v. Returns reference to self.

See also:

getValue().

Since:

Coin-2.5

References SoDebugError::post().

SbVec3s & SbVec3s::setValue (const SbVec3f & v)Sets the value from an SbVec3f instance.

Since:

Coin-2.5

References SoDebugError::post().

SbVec3s & SbVec3s::setValue (const SbVec3d & v)Sets the value from an SbVec3d instance.

Since:

Coin-2.5

References SoDebugError::post().

short & SbVec3s::operator[] (const int i) [inline]Index operator. Returns modifiable x, y or z coordinate of vector.

See also:

getValue() and setValue().

short SbVec3s::operator[] (const int i) const [inline]Index operator. Returns x, y or z coordinate of vector.

See also:

getValue() and setValue().

SbVec3s & SbVec3s::operator*= (int d)Multiply components of vector with value d. Returns reference to self.

SbVec3s & SbVec3s::operator*= (double d)Multiply components of vector with value d. Returns reference to self.

SbVec3s & SbVec3s::operator/= (int d)Divides components of vector with value d. Returns reference to self.

References SoDebugError::postWarning().

SbVec3s & SbVec3s::operator/= (double d)Divides components of vector with value d. Returns reference to self.

References SoDebugError::postWarning().

SbVec3s & SbVec3s::operator+= (const SbVec3s & u)Adds this vector and vector u. Returns reference to self.

SbVec3s & SbVec3s::operator-= (const SbVec3s & u)Subtracts vector u from this vector. Returns reference to self.

SbVec3s SbVec3s::operator- (void) constNon-destructive negation operator. Returns a new SbVec3s instance which points in the opposite direction of this vector.

See also:

negate().

References SbVec3s().

void SbVec3s::print (FILE * fp) constDump the state of this object to the file stream. Only works in debug version of library, method does nothing in an optimized compile.

Author

Generated automatically by Doxygen for Coin from the source code.