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() [1/3]

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

Constructor.

Parameters
axX-coordinate.
ayY-coordinate.
azZ-coordinate.
awW-coordinate.

◆ Vec4() [2/3]

Vec4::Vec4 ( const Vec3 v)
inlineexplicit
Parameters
vVec3

◆ Vec4() [3/3]

Vec4::Vec4 ( const Vec3 v,
float  aW 
)
inline

Constructor.

Parameters
vVec3
aW.w component

Member Function Documentation

◆ Dot()

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

Dot product.

Parameters
vanother vector.
Returns
Dot product of this vector and v.

◆ Length()

float Vec4::Length ( ) const
inline
Returns
length.

◆ Normalize()

void Vec4::Normalize ( )
inline

Normalizes this vector.

◆ operator*()

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

Multiplication operator.

Parameters
fA value that is multiplied with this vector.
Returns
This vector multiplied by f.

◆ operator+=()

Vec4& Vec4::operator+= ( const Vec4 v)
inline

Operator addition and assign.

Parameters
vVector that is to be added to this vector.

◆ operator-=()

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: