gKit3
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members

vecteur generique, utilitaire. More...

#include <vec.h>

Public Member Functions

 vec3 ()
 constructeur par defaut.
 
 vec3 (const float _x, const float _y, const float _z)
 
 vec3 (const vec2 &a, const float _z)
 constructeur par defaut.
 
 vec3 (const Point &a)
 cree un vecteur generique a partir des coordonnees du point a.
 
 vec3 (const Vector &v)
 cree un vecteur generique a partir des coordonnees du vecteur v.
 
float operator() (const unsigned int i) const
 renvoie la ieme composante du vecteur.
 
float & operator() (const unsigned int i)
 

Public Attributes

float x
 
float y
 
float z
 

Detailed Description

vecteur generique, utilitaire.

Definition at line 148 of file vec.h.

Constructor & Destructor Documentation

◆ vec3() [1/3]

vec3::vec3 ( )
inline

constructeur par defaut.

Definition at line 151 of file vec.h.

151: x(0), y(0), z(0) {}

◆ vec3() [2/3]

vec3::vec3 ( const float  _x,
const float  _y,
const float  _z 
)
inline

Definition at line 152 of file vec.h.

152: x(_x), y(_y), z(_z) {}

◆ vec3() [3/3]

vec3::vec3 ( const vec2 a,
const float  _z 
)
inline

constructeur par defaut.

Definition at line 154 of file vec.h.

154: x(a.x), y(a.y), z(_z) {}

Member Function Documentation

◆ operator()() [1/2]

float vec3::operator() ( const unsigned int  i) const
inline

renvoie la ieme composante du vecteur.

Definition at line 162 of file vec.h.

162{ return (&x)[i]; }

◆ operator()() [2/2]

float & vec3::operator() ( const unsigned int  i)
inline

Definition at line 163 of file vec.h.

163{ return (&x)[i]; }

Member Data Documentation

◆ x

float vec3::x

Definition at line 165 of file vec.h.

◆ y

float vec3::y

Definition at line 165 of file vec.h.

◆ z

float vec3::z

Definition at line 165 of file vec.h.


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