TrinityCore
Vec3D Class Reference

#include <vec3d.h>

Public Member Functions

 Vec3D (float x0=0.0f, float y0=0.0f, float z0=0.0f)
 
 Vec3D (Vec3D const &v)=default
 
Vec3Doperator= (Vec3D const &v)=default
 
Vec3D operator+ (Vec3D const &v) const
 
Vec3D operator- (Vec3D const &v) const
 
float operator* (Vec3D const &v) const
 
Vec3D operator* (float d) const
 
Vec3D operator% (Vec3D const &v) const
 
Vec3Doperator+= (Vec3D const &v)
 
Vec3Doperator-= (Vec3D const &v)
 
Vec3Doperator*= (float d)
 
float lengthSquared () const
 
float length () const
 
Vec3Dnormalize ()
 
Vec3D operator~ () const
 
 operator float * ()
 

Public Attributes

float x
 
float y
 
float z
 

Friends

Vec3D operator* (float d, Vec3D const &v)
 
std::istream & operator>> (std::istream &in, Vec3D &v)
 
std::ostream & operator<< (std::ostream &out, Vec3D const &v)
 

Detailed Description

Definition at line 24 of file vec3d.h.

Constructor & Destructor Documentation

◆ Vec3D() [1/2]

Vec3D::Vec3D ( float  x0 = 0.0f,
float  y0 = 0.0f,
float  z0 = 0.0f 
)
inline

Definition at line 29 of file vec3d.h.

◆ Vec3D() [2/2]

Vec3D::Vec3D ( Vec3D const &  v)
default

Member Function Documentation

◆ length()

float Vec3D::length ( ) const
inline

Definition at line 98 of file vec3d.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lengthSquared()

float Vec3D::lengthSquared ( ) const
inline

Definition at line 93 of file vec3d.h.

+ Here is the caller graph for this function:

◆ normalize()

Vec3D & Vec3D::normalize ( )
inline

Definition at line 103 of file vec3d.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator float *()

Vec3D::operator float * ( )
inline

Definition at line 128 of file vec3d.h.

◆ operator%()

Vec3D Vec3D::operator% ( Vec3D const &  v) const
inline

Definition at line 63 of file vec3d.h.

◆ operator*() [1/2]

Vec3D Vec3D::operator* ( float  d) const
inline

Definition at line 52 of file vec3d.h.

◆ operator*() [2/2]

float Vec3D::operator* ( Vec3D const &  v) const
inline

Definition at line 47 of file vec3d.h.

◆ operator*=()

Vec3D & Vec3D::operator*= ( float  d)
inline

Definition at line 85 of file vec3d.h.

◆ operator+()

Vec3D Vec3D::operator+ ( Vec3D const &  v) const
inline

Definition at line 35 of file vec3d.h.

◆ operator+=()

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

Definition at line 69 of file vec3d.h.

◆ operator-()

Vec3D Vec3D::operator- ( Vec3D const &  v) const
inline

Definition at line 41 of file vec3d.h.

◆ operator-=()

Vec3D & Vec3D::operator-= ( Vec3D const &  v)
inline

Definition at line 77 of file vec3d.h.

◆ operator=()

Vec3D & Vec3D::operator= ( Vec3D const &  v)
default

◆ operator~()

Vec3D Vec3D::operator~ ( ) const
inline

Definition at line 109 of file vec3d.h.

+ Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator*

Vec3D operator* ( float  d,
Vec3D const &  v 
)
friend

Definition at line 58 of file vec3d.h.

◆ operator<<

std::ostream & operator<< ( std::ostream &  out,
Vec3D const &  v 
)
friend

Definition at line 122 of file vec3d.h.

◆ operator>>

std::istream & operator>> ( std::istream &  in,
Vec3D v 
)
friend

Definition at line 116 of file vec3d.h.

Member Data Documentation

◆ x

float Vec3D::x

Definition at line 27 of file vec3d.h.

◆ y

float Vec3D::y

Definition at line 27 of file vec3d.h.

◆ z

float Vec3D::z

Definition at line 27 of file vec3d.h.


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