OGRE  1.9.0
Public Member Functions | Public Attributes | Static Public Attributes | Friends | List of all members
Ogre::Vector4 Class Reference

4-dimensional homogeneous vector. More...

#include <OgreVector4.h>

Public Member Functions

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

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 Real lhs, const Vector4 &rhs)
 
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 fScalar, const Vector4 &rkVector)
 
_OgreExport friend std::ostream & operator<< (std::ostream &o, const Vector4 &v)
 Function for writing to a stream.
 

Detailed Description

4-dimensional homogeneous vector.

Definition at line 45 of file OgreVector4.h.

Constructor & Destructor Documentation

◆ Vector4() [1/7]

Ogre::Vector4::Vector4 ( )

Default constructor.

Note
It does NOT initialize the vector for efficiency.

Definition at line 55 of file OgreVector4.h.

◆ Vector4() [2/7]

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

Definition at line 59 of file OgreVector4.h.

◆ Vector4() [3/7]

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

Definition at line 64 of file OgreVector4.h.

◆ Vector4() [4/7]

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

Definition at line 72 of file OgreVector4.h.

◆ Vector4() [5/7]

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

Definition at line 80 of file OgreVector4.h.

◆ Vector4() [6/7]

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

Definition at line 85 of file OgreVector4.h.

◆ Vector4() [7/7]

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

Definition at line 93 of file OgreVector4.h.

Member Function Documentation

◆ dotProduct()

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

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 393 of file OgreVector4.h.

◆ isNaN()

bool Ogre::Vector4::isNaN ( ) const

Check whether this vector contains valid values.

Definition at line 398 of file OgreVector4.h.

◆ operator!=()

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

Definition at line 164 of file OgreVector4.h.

◆ operator*() [1/2]

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

Definition at line 200 of file OgreVector4.h.

◆ operator*() [2/2]

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

Definition at line 209 of file OgreVector4.h.

◆ operator*=() [1/2]

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

Definition at line 325 of file OgreVector4.h.

◆ operator*=() [2/2]

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

Definition at line 352 of file OgreVector4.h.

◆ operator+() [1/2]

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

Definition at line 240 of file OgreVector4.h.

◆ operator+() [2/2]

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

Definition at line 182 of file OgreVector4.h.

◆ operator+=() [1/2]

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

Definition at line 334 of file OgreVector4.h.

◆ operator+=() [2/2]

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

Definition at line 305 of file OgreVector4.h.

◆ operator-() [1/2]

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

Definition at line 245 of file OgreVector4.h.

◆ operator-() [2/2]

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

Definition at line 191 of file OgreVector4.h.

◆ operator-=() [1/2]

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

Definition at line 343 of file OgreVector4.h.

◆ operator-=() [2/2]

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

Definition at line 315 of file OgreVector4.h.

◆ operator/() [1/2]

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

Definition at line 218 of file OgreVector4.h.

◆ operator/() [2/2]

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

Definition at line 231 of file OgreVector4.h.

◆ operator/=() [1/2]

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

Definition at line 362 of file OgreVector4.h.

◆ operator/=() [2/2]

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

Definition at line 376 of file OgreVector4.h.

◆ operator=() [1/3]

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

Definition at line 147 of file OgreVector4.h.

◆ operator=() [2/3]

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

Definition at line 172 of file OgreVector4.h.

◆ operator=() [3/3]

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

Assigns the value of the other vector.

Parameters
rkVectorThe other vector

Definition at line 137 of file OgreVector4.h.

◆ operator==()

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

Definition at line 156 of file OgreVector4.h.

◆ operator[]() [1/2]

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

Definition at line 115 of file OgreVector4.h.

◆ operator[]() [2/2]

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

Definition at line 108 of file OgreVector4.h.

◆ ptr() [1/2]

Real * Ogre::Vector4::ptr ( )

Pointer accessor for direct copying.

Definition at line 123 of file OgreVector4.h.

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

◆ ptr() [2/2]

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

Pointer accessor for direct copying.

Definition at line 128 of file OgreVector4.h.

◆ swap()

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

Exchange the contents of this vector with another.

Definition at line 100 of file OgreVector4.h.

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

Friends And Related Symbol Documentation

◆ operator*

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

Definition at line 250 of file OgreVector4.h.

◆ operator+ [1/2]

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

Definition at line 277 of file OgreVector4.h.

◆ operator+ [2/2]

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

Definition at line 268 of file OgreVector4.h.

◆ operator- [1/2]

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

Definition at line 295 of file OgreVector4.h.

◆ operator- [2/2]

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

Definition at line 286 of file OgreVector4.h.

◆ operator/

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

Definition at line 259 of file OgreVector4.h.

◆ operator<<

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

Function for writing to a stream.

Definition at line 404 of file OgreVector4.h.

Member Data Documentation

◆ w

Real Ogre::Vector4::w

◆ x

Real Ogre::Vector4::x

◆ y

Real Ogre::Vector4::y

◆ z

Real Ogre::Vector4::z

◆ ZERO

const Vector4 Ogre::Vector4::ZERO
static

Definition at line 411 of file OgreVector4.h.


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