GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  SBVEC3F (3)

NAME

SbVec3f — 3D vector class

CONTENTS

Inherits From
Synopsis
Description
Methods
File Format/defaults
See Also

INHERITS FROM

SbVec3f

SYNOPSIS

#include <Inventor/SbLinear.h>

Methods from class SbVec3f:

       
                    
                     SbVec3f()    
   
                    
                     SbVec3f(const float v[3])    
   
                    
                     SbVec3f(float x, float y, float z)    
   
                    
                     SbVec3f(SbPlane &p0, SbPlane &p1, SbPlane &p2)    
SbVec3f    
                    
SbVec3f              cross(const SbVec3f &v) const    
float    
                    
float                dot(const SbVec3f &v) const    
SbBool    
                    
SbBool               equals(const SbVec3f v, float tolerance) const    
SbVec3f    
                    
SbVec3f              getClosestAxis() const    
const float *    
                    
const float *        getValue() const    
void    
                    
void                 getValue(float &x, float &y, float &z) const    
float    
                    
float                length() const    
void    
                    
void                 negate()    
float    
                    
float                normalize()    
SbVec3f &    
                    
SbVec3f &            setValue(const float v[3])    
SbVec3f &    
                    
SbVec3f &            setValue(float x, float y, float z)    
SbVec3f &    
                    
SbVec3f &            setValue(const SbVec3f &barycentic, const SbVec3f &v0, const SbVec3f &v1, const SbVec3f &v2)    
float &    
                    
float &              operator [](int i)    
const float &    
                    
const float &        operator [](int i)    
SbVec3f &    
                    
SbVec3f &            operator *=(float d)    
SbVec3f &    
                    
SbVec3f &            operator /=(float d)    
SbVec3f &    
                    
SbVec3f &            operator +=(const SbVec3f &u)    
SbVec3f &    
                    
SbVec3f &            operator -=(const SbVec3f &u)    
SbVec3f    
                    
SbVec3f              operator -() const    
SbVec3f    
                    
SbVec3f              operator *(const SbVec3f &v, float d)    
SbVec3f    
                    
SbVec3f              operator *(float d, const SbVec3f &v)    
SbVec3f    
                    
SbVec3f              operator /(const SbVec3f &v, float d)    
SbVec3f    
                    
SbVec3f              operator +(const SbVec3f &v1, const SbVec3f &v2)    
SbVec3f    
                    
SbVec3f              operator -(const SbVec3f &v1, const SbVec3f &v2)    
int    
                    
int                  operator ==(const SbVec3f &v1, const SbVec3f &v2)    
int    
                    
int                  operator !=(const SbVec3f &v1, const SbVec3f &v2)

DESCRIPTION

3D vector class used to store 3D vectors and points. This class is used throughout Inventor for arguments and return values.

METHODS

       
                    
                     SbVec3f()
Default constructor.

       
                    
                     SbVec3f(const float v[3])    
   
                    
                     SbVec3f(float x, float y, float z)
Constructor given vector components.

       
                    
                     SbVec3f(SbPlane &p0, SbPlane &p1, SbPlane &p2)
Constructor given 3 planes.

    SbVec3f    
                    
SbVec3f              cross(const SbVec3f &v) const
Returns right-handed cross product of vector and another vector.

    float    
                    
float                dot(const SbVec3f &v) const
Returns dot (inner) product of vector and another vector.

    SbBool    
                    
SbBool               equals(const SbVec3f v, float tolerance) const
Equality comparison within given tolerance — the square of the length of the maximum distance between the two vectors.

    SbVec3f    
                    
SbVec3f              getClosestAxis() const
Returns principal axis that is closest (based on maximum dot product) to this vector.

    const float *    
                    
const float *        getValue() const    
void    
                    
void                 getValue(float &x, float &y, float &z) const
Returns vector components.

    float    
                    
float                length() const
Returns geometric length of vector.

    void    
                    
void                 negate()
Negates each component of vector in place.

    float    
                    
float                normalize()
Changes vector to be unit length, returning the length before normalization.

    SbVec3f &    
                    
SbVec3f &            setValue(const float v[3])    
SbVec3f &    
                    
SbVec3f &            setValue(float x, float y, float z)
Sets the vector components.

    SbVec3f &    
                    
SbVec3f &            setValue(const SbVec3f &barycentic, const SbVec3f &v0, const SbVec3f &v1, const SbVec3f &v2)
Sets value of vector as the weighted average of 3 other vectors.

    float &    
                    
float &              operator [](int i)    
const float &    
                    
const float &        operator [](int i)
Accesses indexed component of vector.

    SbVec3f &    
                    
SbVec3f &            operator *=(float d)    
SbVec3f &    
                    
SbVec3f &            operator /=(float d)
Component-wise scalar multiplication and division operators.

    SbVec3f &    
                    
SbVec3f &            operator +=(const SbVec3f &u)    
SbVec3f &    
                    
SbVec3f &            operator -=(const SbVec3f &u)
Component-wise vector addition and subtraction operators.

    SbVec3f    
                    
SbVec3f              operator -() const
Nondestructive unary negation — returns a new vector.

    SbVec3f    
                    
SbVec3f              operator *(const SbVec3f &v, float d)    
SbVec3f    
                    
SbVec3f              operator *(float d, const SbVec3f &v)    
SbVec3f    
                    
SbVec3f              operator /(const SbVec3f &v, float d)
Component-wise binary scalar multiplication and division operators.

    SbVec3f    
                    
SbVec3f              operator +(const SbVec3f &v1, const SbVec3f &v2)    
SbVec3f    
                    
SbVec3f              operator -(const SbVec3f &v1, const SbVec3f &v2)
Component-wise binary vector addition and subtraction operators.

    int    
                    
int                  operator ==(const SbVec3f &v1, const SbVec3f &v2)    
int    
                    
int                  operator !=(const SbVec3f &v1, const SbVec3f &v2)
Equality comparison operators.

FILE FORMAT/DEFAULTS

SEE ALSO

SbVec2f, SbVec4f, SbVec2s, SbRotation

Search for    or go to Top of page |  Section 3 |  Main Index


SBVEC3F(3IV) (-->)

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.