Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
Vec3D Class Reference

#include <vec3d.h>

Public Member Functions

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

Public Attributes

float x
float y
float z

Friends

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

Detailed Description

Definition at line 12 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

◆ Vec3D() [2/2]

Vec3D::Vec3D ( const Vec3D & v)
inline

Definition at line 19 of file vec3d.h.

References Vec3D(), x, y, and z.

Member Function Documentation

◆ length()

float Vec3D::length ( ) const
inline

Definition at line 91 of file vec3d.h.

References x, y, and z.

Referenced by normalize().

◆ lengthSquared()

float Vec3D::lengthSquared ( ) const
inline

Definition at line 86 of file vec3d.h.

References x, y, and z.

◆ normalize()

Vec3D & Vec3D::normalize ( )
inline

Definition at line 96 of file vec3d.h.

References length(), operator*=(), and Vec3D().

Referenced by operator~().

◆ operator float *()

Vec3D::operator float * ( )
inline

Definition at line 121 of file vec3d.h.

◆ operator%()

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

Definition at line 56 of file vec3d.h.

References Vec3D(), x, y, and z.

◆ operator*() [1/2]

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

Definition at line 40 of file vec3d.h.

References Vec3D(), x, y, and z.

◆ operator*() [2/2]

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

Definition at line 45 of file vec3d.h.

References Vec3D(), x, y, and z.

◆ operator*=()

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

Definition at line 78 of file vec3d.h.

References Vec3D(), x, y, and z.

Referenced by normalize().

◆ operator+()

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

Definition at line 28 of file vec3d.h.

References Vec3D(), x, y, and z.

◆ operator+=()

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

Definition at line 62 of file vec3d.h.

References Vec3D(), x, y, and z.

◆ operator-()

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

Definition at line 34 of file vec3d.h.

References Vec3D(), x, y, and z.

◆ operator-=()

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

Definition at line 70 of file vec3d.h.

References Vec3D(), x, y, and z.

◆ operator=()

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

Definition at line 21 of file vec3d.h.

References Vec3D(), x, y, and z.

◆ operator~()

Vec3D Vec3D::operator~ ( ) const
inline

Definition at line 102 of file vec3d.h.

References normalize(), and Vec3D().

◆ operator*

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

Definition at line 51 of file vec3d.h.

References Vec3D().

◆ operator<<

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

Definition at line 115 of file vec3d.h.

References Vec3D(), x, y, and z.

◆ operator>>

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

Definition at line 109 of file vec3d.h.

References Vec3D(), x, y, and z.

Member Data Documentation

◆ x

◆ y

◆ z


The documentation for this class was generated from the following file:
  • src/tools/vmap4_extractor/vec3d.h