Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

# Ogre::Vector4 Class Reference

4-dimensional homogenous vector. More...

`#include <OgreVector4.h>`

List of all members.

## 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)
| Vector4 (const Vector4 &rkVector)
Real | operator[] (const size_t i) const
Real & | operator[] (const size_t i)
Real * | ptr ()
| Pointer accessor for direct copying.
const Real * | ptr () const
| Pointer accessor for direct copying.
Vector4 & | operator= (const Vector4 &rkVector)
| Assigns the value of the other vector.
Vector4 & | operator= (const Real fScalar)
bool | operator== (const Vector4 &rkVector) const
bool | operator!= (const Vector4 &rkVector) const
Vector4 & | operator= (const Vector3 &rhs)
Vector4 | operator+ (const Vector4 &rkVector) const
Vector4 | operator- (const Vector4 &rkVector) const
Vector4 | operator * (const Real fScalar) const
Vector4 | operator * (const Vector4 &rhs) const
Vector4 | operator/ (const Real fScalar) const
Vector4 | operator/ (const Vector4 &rhs) const
const Vector4 & | operator+ () const
Vector4 | operator- () const
Vector4 & | operator+= (const Vector4 &rkVector)
Vector4 & | operator-= (const Vector4 &rkVector)
Vector4 & | operator *= (const Real fScalar)
Vector4 & | operator+= (const Real fScalar)
Vector4 & | operator-= (const Real fScalar)
Vector4 & | operator *= (const Vector4 &rkVector)
Vector4 & | operator/= (const Real fScalar)
Vector4 & | operator/= (const Vector4 &rkVector)
Real | dotProduct (const Vector4 &vec) const
| Calculates the dot (scalar) product of this vector with another.
## Public Attributes
Real | x
Real | y
Real | z
Real | w
## Static Public Attributes
static const Vector4 | ZERO
## Friends
Vector4 | operator * (const Real fScalar, const Vector4 &rkVector)
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)
_OgreExport friend std::ostream & | operator<< (std::ostream &o, const Vector4 &v)
| Function for writing to a stream.

## Detailed Description

4-dimensional homogenous vector.

Definition at line 40 of file OgreVector4.h.

## Constructor & Destructor Documentation

Ogre::Vector4::Vector4 | ( |  | ) |

| Definition at line 46 of file OgreVector4.h.

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

| Definition at line 50 of file OgreVector4.h.

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

| Definition at line 55 of file OgreVector4.h.

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

| Definition at line 63 of file OgreVector4.h.

Ogre::Vector4::Vector4 | ( | Real *const | r | ) | `[explicit]`

| Definition at line 71 of file OgreVector4.h.

Ogre::Vector4::Vector4 | ( | const Real | scaler | ) | `[explicit]`

| Definition at line 76 of file OgreVector4.h.

Ogre::Vector4::Vector4 | ( | const Vector3 & | rhs | ) | `[explicit]`

| Definition at line 84 of file OgreVector4.h.

Ogre::Vector4::Vector4 | ( | const Vector4 & | rkVector | ) |

| Definition at line 89 of file OgreVector4.h.

## Member Function Documentation

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

  | Calculates the dot (scalar) product of this vector with another. Parameters:
  | vec | Vector with which to calculate the dot product (together with this one).
Returns: A float representing the dot product value. Definition at line 379 of file OgreVector4.h.

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

| Definition at line 195 of file OgreVector4.h.

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

| Definition at line 186 of file OgreVector4.h.

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

| Definition at line 338 of file OgreVector4.h.

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

| Definition at line 311 of file OgreVector4.h.

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

| Definition at line 150 of file OgreVector4.h.

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

| Definition at line 226 of file OgreVector4.h.

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

| Definition at line 168 of file OgreVector4.h.

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

| Definition at line 320 of file OgreVector4.h.

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

| Definition at line 291 of file OgreVector4.h.

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

| Definition at line 231 of file OgreVector4.h.

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

| Definition at line 177 of file OgreVector4.h.

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

| Definition at line 329 of file OgreVector4.h.

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

| Definition at line 301 of file OgreVector4.h.

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

| Definition at line 217 of file OgreVector4.h.

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

| Definition at line 204 of file OgreVector4.h.

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

| Definition at line 362 of file OgreVector4.h.

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

| Definition at line 348 of file OgreVector4.h.

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

| Definition at line 158 of file OgreVector4.h.

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

| Definition at line 133 of file OgreVector4.h.

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

  | Assigns the value of the other vector. Parameters:
  | rkVector | The other vector
Definition at line 123 of file OgreVector4.h.

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

| Definition at line 142 of file OgreVector4.h.

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

| Definition at line 101 of file OgreVector4.h.

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

| Definition at line 94 of file OgreVector4.h.

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

| Pointer accessor for direct copying. Definition at line 114 of file OgreVector4.h.

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

| Pointer accessor for direct copying. Definition at line 109 of file OgreVector4.h.

## Friends And Related Function Documentation

Vector4 operator * | ( | const Real | fScalar,
|  | const Vector4 & | rkVector
| ) | `[friend]`

| Definition at line 236 of file OgreVector4.h.

Vector4 operator+ | ( | const Real | lhs,
|  | const Vector4 & | rhs
| ) | `[friend]`

| Definition at line 263 of file OgreVector4.h.

Vector4 operator+ | ( | const Vector4 & | lhs,
|  | const Real | rhs
| ) | `[friend]`

| Definition at line 254 of file OgreVector4.h.

Vector4 operator- | ( | const Real | lhs,
|  | const Vector4 & | rhs
| ) | `[friend]`

| Definition at line 281 of file OgreVector4.h.

Vector4 operator- | ( | const Vector4 & | lhs,
|  | Real | rhs
| ) | `[friend]`

| Definition at line 272 of file OgreVector4.h.

Vector4 operator/ | ( | const Real | fScalar,
|  | const Vector4 & | rkVector
| ) | `[friend]`

| Definition at line 245 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 386 of file OgreVector4.h.

## Member Data Documentation

Real Ogre::Vector4::w

| Definition at line 43 of file OgreVector4.h.

Real Ogre::Vector4::x

| Definition at line 43 of file OgreVector4.h.

Real Ogre::Vector4::y

| Definition at line 43 of file OgreVector4.h.

Real Ogre::Vector4::z

| Definition at line 43 of file OgreVector4.h.

const Vector4 Ogre::Vector4::ZERO`[static]`

| Definition at line 392 of file OgreVector4.h.

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

- OgreVector4.h

Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Thu Mar 6 09:49:41 2008