OGRE  1.8
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Ogre::Vector4 Class Reference

4-dimensional homogeneous vector. More...

#include <OgreVector4.h>

+ Collaboration diagram for Ogre::Vector4:

Public Member Functions

 Vector4 ()
 
 Vector4 (const Real fX, const Real fY, const Real fZ, const Real fW)
 
 Vector4 (const Real afCoordinate[4])
 
 Vector4 (const int afCoordinate[4])
 
 Vector4 (Real *const r)
 
 Vector4 (const Real scaler)
 
 Vector4 (const Vector3 &rhs)
 
Real dotProduct (const Vector4 &vec) const
 Calculates the dot (scalar) product of this vector with another. More...
 
bool isNaN () const
 Check whether this vector contains valid values. More...
 
bool operator!= (const Vector4 &rkVector) const
 
Vector4 operator* (const Real fScalar) const
 
Vector4 operator* (const Vector4 &rhs) const
 
Vector4operator*= (const Real fScalar)
 
Vector4operator*= (const Vector4 &rkVector)
 
Vector4 operator+ (const Vector4 &rkVector) const
 
const Vector4operator+ () const
 
Vector4operator+= (const Vector4 &rkVector)
 
Vector4operator+= (const Real fScalar)
 
Vector4 operator- (const Vector4 &rkVector) const
 
Vector4 operator- () const
 
Vector4operator-= (const Vector4 &rkVector)
 
Vector4operator-= (const Real fScalar)
 
Vector4 operator/ (const Real fScalar) const
 
Vector4 operator/ (const Vector4 &rhs) const
 
Vector4operator/= (const Real fScalar)
 
Vector4operator/= (const Vector4 &rkVector)
 
Vector4operator= (const Vector4 &rkVector)
 Assigns the value of the other vector. More...
 
Vector4operator= (const Real fScalar)
 
Vector4operator= (const Vector3 &rhs)
 
bool operator== (const Vector4 &rkVector) const
 
Real operator[] (const size_t i) const
 
Realoperator[] (const size_t i)
 
Realptr ()
 Pointer accessor for direct copying. More...
 
const Realptr () const
 Pointer accessor for direct copying. More...
 
void swap (Vector4 &other)
 Exchange the contents of this vector with another. More...
 

Public Attributes

Real w
 
Real x
 
Real y
 
Real z
 

Static Public Attributes

static const Vector4 ZERO
 

Friends

Vector4 operator* (const Real fScalar, const Vector4 &rkVector)
 
Vector4 operator+ (const Vector4 &lhs, const Real rhs)
 
Vector4 operator+ (const Real lhs, const Vector4 &rhs)
 
Vector4 operator- (const Vector4 &lhs, Real rhs)
 
Vector4 operator- (const Real lhs, const Vector4 &rhs)
 
Vector4 operator/ (const Real fScalar, const Vector4 &rkVector)
 
_OgreExport friend std::ostream & operator<< (std::ostream &o, const Vector4 &v)
 Function for writing to a stream. More...
 

Detailed Description

4-dimensional homogeneous vector.

Definition at line 45 of file OgreVector4.h.

Constructor & Destructor Documentation

Ogre::Vector4::Vector4 ( )
inline

Definition at line 51 of file OgreVector4.h.

Ogre::Vector4::Vector4 ( const Real  fX,
const Real  fY,
const Real  fZ,
const Real  fW 
)
inline

Definition at line 55 of file OgreVector4.h.

Ogre::Vector4::Vector4 ( const Real  afCoordinate[4])
inlineexplicit

Definition at line 60 of file OgreVector4.h.

Ogre::Vector4::Vector4 ( const int  afCoordinate[4])
inlineexplicit

Definition at line 68 of file OgreVector4.h.

Ogre::Vector4::Vector4 ( Real *const  r)
inlineexplicit

Definition at line 76 of file OgreVector4.h.

Ogre::Vector4::Vector4 ( const Real  scaler)
inlineexplicit

Definition at line 81 of file OgreVector4.h.

Ogre::Vector4::Vector4 ( const Vector3 rhs)
inlineexplicit

Definition at line 89 of file OgreVector4.h.

Member Function Documentation

Real Ogre::Vector4::dotProduct ( const Vector4 vec) const
inline

Calculates the dot (scalar) product of this vector with another.

Parameters
vecVector with which to calculate the dot product (together with this one).
Returns
A float representing the dot product value.

Definition at line 389 of file OgreVector4.h.

References w, x, y, and z.

bool Ogre::Vector4::isNaN ( ) const
inline

Check whether this vector contains valid values.

Definition at line 394 of file OgreVector4.h.

References Ogre::Math::isNaN().

bool Ogre::Vector4::operator!= ( const Vector4 rkVector) const
inline

Definition at line 160 of file OgreVector4.h.

References w, x, y, and z.

Vector4 Ogre::Vector4::operator* ( const Real  fScalar) const
inline

Definition at line 196 of file OgreVector4.h.

Vector4 Ogre::Vector4::operator* ( const Vector4 rhs) const
inline

Definition at line 205 of file OgreVector4.h.

References w, x, y, and z.

Vector4& Ogre::Vector4::operator*= ( const Real  fScalar)
inline

Definition at line 321 of file OgreVector4.h.

Vector4& Ogre::Vector4::operator*= ( const Vector4 rkVector)
inline

Definition at line 348 of file OgreVector4.h.

References w, x, y, and z.

Vector4 Ogre::Vector4::operator+ ( const Vector4 rkVector) const
inline

Definition at line 178 of file OgreVector4.h.

References w, x, y, and z.

const Vector4& Ogre::Vector4::operator+ ( ) const
inline

Definition at line 236 of file OgreVector4.h.

Vector4& Ogre::Vector4::operator+= ( const Vector4 rkVector)
inline

Definition at line 301 of file OgreVector4.h.

References w, x, y, and z.

Vector4& Ogre::Vector4::operator+= ( const Real  fScalar)
inline

Definition at line 330 of file OgreVector4.h.

Vector4 Ogre::Vector4::operator- ( const Vector4 rkVector) const
inline

Definition at line 187 of file OgreVector4.h.

References w, x, y, and z.

Vector4 Ogre::Vector4::operator- ( ) const
inline

Definition at line 241 of file OgreVector4.h.

Vector4& Ogre::Vector4::operator-= ( const Vector4 rkVector)
inline

Definition at line 311 of file OgreVector4.h.

References w, x, y, and z.

Vector4& Ogre::Vector4::operator-= ( const Real  fScalar)
inline

Definition at line 339 of file OgreVector4.h.

Vector4 Ogre::Vector4::operator/ ( const Real  fScalar) const
inline

Definition at line 214 of file OgreVector4.h.

Vector4 Ogre::Vector4::operator/ ( const Vector4 rhs) const
inline

Definition at line 227 of file OgreVector4.h.

References w, x, y, and z.

Vector4& Ogre::Vector4::operator/= ( const Real  fScalar)
inline

Definition at line 358 of file OgreVector4.h.

Vector4& Ogre::Vector4::operator/= ( const Vector4 rkVector)
inline

Definition at line 372 of file OgreVector4.h.

References w, x, y, and z.

Vector4& Ogre::Vector4::operator= ( const Vector4 rkVector)
inline

Assigns the value of the other vector.

Parameters
rkVectorThe other vector

Definition at line 133 of file OgreVector4.h.

References w, x, y, and z.

Vector4& Ogre::Vector4::operator= ( const Real  fScalar)
inline

Definition at line 143 of file OgreVector4.h.

Vector4& Ogre::Vector4::operator= ( const Vector3 rhs)
inline

Definition at line 168 of file OgreVector4.h.

References Ogre::Vector3::x, Ogre::Vector3::y, and Ogre::Vector3::z.

bool Ogre::Vector4::operator== ( const Vector4 rkVector) const
inline

Definition at line 152 of file OgreVector4.h.

References w, x, y, and z.

Real Ogre::Vector4::operator[] ( const size_t  i) const
inline

Definition at line 104 of file OgreVector4.h.

Real& Ogre::Vector4::operator[] ( const size_t  i)
inline

Definition at line 111 of file OgreVector4.h.

Real* Ogre::Vector4::ptr ( )
inline

Pointer accessor for direct copying.

Definition at line 119 of file OgreVector4.h.

Referenced by Ogre::AnimableValue::setAsBaseValue().

const Real* Ogre::Vector4::ptr ( ) const
inline

Pointer accessor for direct copying.

Definition at line 124 of file OgreVector4.h.

void Ogre::Vector4::swap ( Vector4 other)
inline

Exchange the contents of this vector with another.

Definition at line 96 of file OgreVector4.h.

References std::swap(), w, x, y, and z.

Friends And Related Function Documentation

Vector4 operator* ( const Real  fScalar,
const Vector4 rkVector 
)
friend

Definition at line 246 of file OgreVector4.h.

Vector4 operator+ ( const Vector4 lhs,
const Real  rhs 
)
friend

Definition at line 264 of file OgreVector4.h.

Vector4 operator+ ( const Real  lhs,
const Vector4 rhs 
)
friend

Definition at line 273 of file OgreVector4.h.

Vector4 operator- ( const Vector4 lhs,
Real  rhs 
)
friend

Definition at line 282 of file OgreVector4.h.

Vector4 operator- ( const Real  lhs,
const Vector4 rhs 
)
friend

Definition at line 291 of file OgreVector4.h.

Vector4 operator/ ( const Real  fScalar,
const Vector4 rkVector 
)
friend

Definition at line 255 of file OgreVector4.h.

_OgreExport friend std::ostream& operator<< ( std::ostream &  o,
const Vector4 v 
)
friend

Function for writing to a stream.

Definition at line 401 of file OgreVector4.h.

Member Data Documentation

const Vector4 Ogre::Vector4::ZERO
static

Definition at line 407 of file OgreVector4.h.


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