OGRE-Next  3.0.0
Object-Oriented Graphics Rendering Engine
Ogre::Vector4 Class Reference

4-dimensional homogeneous vector. More...

#include <OgreVector4.h>

Public Member Functions

 Vector4 ()
 Default constructor. More...
 
 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 (const Vector3 &rhs, float fW)
 
 Vector4 (Real *const r)
 
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)
 
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)
 
bool operator== (const Vector4 &rkVector) const
 
Realoperator[] (const size_t i)
 
Real operator[] (const size_t i) const
 
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...
 
Vector2 xy () const
 
Vector3 xyz () const
 Swizzle-like narrowing operations. More...
 

Public Attributes

Real w
 
Real x
 
Real y
 
Real z
 

Static Public Attributes

static const Vector4 ZERO
 

Detailed Description

4-dimensional homogeneous vector.

Constructor & Destructor Documentation

◆ Vector4() [1/8]

Ogre::Vector4::Vector4 ( )
inline

Default constructor.

Note
It does NOT initialize the vector for efficiency.

◆ Vector4() [2/8]

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

◆ Vector4() [3/8]

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

◆ Vector4() [4/8]

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

◆ Vector4() [5/8]

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

◆ Vector4() [6/8]

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

◆ Vector4() [7/8]

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

◆ Vector4() [8/8]

Ogre::Vector4::Vector4 ( const Vector3 rhs,
float  fW 
)
inlineexplicit

Member Function Documentation

◆ dotProduct()

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.

References w, x, y, and z.

◆ isNaN()

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

Check whether this vector contains valid values.

References Ogre::Math::isNaN().

◆ operator!=()

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

References w, x, y, and z.

◆ operator*() [1/2]

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

◆ operator*() [2/2]

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

References w, x, y, and z.

◆ operator*=() [1/2]

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

◆ operator*=() [2/2]

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

References w, x, y, and z.

◆ operator+() [1/2]

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

◆ operator+() [2/2]

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

References w, x, y, and z.

◆ operator+=() [1/2]

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

◆ operator+=() [2/2]

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

References w, x, y, and z.

◆ operator-() [1/2]

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

◆ operator-() [2/2]

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

References w, x, y, and z.

◆ operator-=() [1/2]

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

◆ operator-=() [2/2]

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

References w, x, y, and z.

◆ operator/() [1/2]

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

◆ operator/() [2/2]

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

References w, x, y, and z.

◆ operator/=() [1/2]

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

◆ operator/=() [2/2]

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

References w, x, y, and z.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ operator==()

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

References w, x, y, and z.

◆ operator[]() [1/2]

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

◆ operator[]() [2/2]

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

◆ ptr() [1/2]

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

Pointer accessor for direct copying.

◆ ptr() [2/2]

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

Pointer accessor for direct copying.

◆ swap()

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

Exchange the contents of this vector with another.

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

◆ xy()

Vector2 Ogre::Vector4::xy ( ) const
inline

◆ xyz()

Vector3 Ogre::Vector4::xyz ( ) const
inline

Swizzle-like narrowing operations.

Member Data Documentation

◆ w

◆ x

◆ y

◆ z

◆ ZERO

const Vector4 Ogre::Vector4::ZERO
static

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