Aether3D Game Engine
Public Member Functions | Public Attributes | List of all members
Vec4 Struct Reference

4-component vector. More...

#include <Vec3.hpp>

Public Member Functions

 Vec4 ()
 Constructor.
 
 Vec4 (float ax, float ay, float az, float aw)
 
 Vec4 (const Vec3 &v)
 
 Vec4 (const Vec3 &v, float aW)
 
Vec4 operator* (float f) const
 
Vec4operator+= (const Vec4 &v)
 
Vec4operator-= (const Vec4 &v)
 
float Dot (const Vec4 &v) const
 
float Length () const
 
void Normalize ()
 

Public Attributes

float x
 
float y
 
float z
 
float w
 

Detailed Description

4-component vector.

Constructor & Destructor Documentation

Vec4::Vec4 ( float  ax,
float  ay,
float  az,
float  aw 
)
inline

Constructor.

Parameters
axX-coordinate.
ayY-coordinate.
azZ-coordinate.
awW-coordinate.
Vec4::Vec4 ( const Vec3 v)
inline
Parameters
vVec3
Vec4::Vec4 ( const Vec3 v,
float  aW 
)
inline

Constructor.

Parameters
vVec3
aW.w component

Member Function Documentation

float Vec4::Dot ( const Vec4 v) const
inline

Dot product.

Parameters
vanother vector.
Returns
Dot product of this vector and v.
float Vec4::Length ( ) const
inline
Returns
length.
void Vec4::Normalize ( )
inline

Normalizes this vector.

Vec4 Vec4::operator* ( float  f) const
inline

Multiplication operator.

Parameters
fA value that is multiplied with this vector.
Returns
This vector multiplied by f.
Vec4& Vec4::operator+= ( const Vec4 v)
inline

Operator addition and assign.

Parameters
vVector that is to be added to this vector.
Vec4& Vec4::operator-= ( const Vec4 v)
inline

Operator subtract and assign.

Parameters
vVector that is to be subtracted from this vector.

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