gKit2 light
Loading...
Searching...
No Matches

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 &v, const float _z)
 constructeur par defaut.
 vec3 (const vec4 &v)
 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 168 of file vec.h.

Constructor & Destructor Documentation

◆ vec3() [1/3]

vec3::vec3 ( )
inline

constructeur par defaut.

Definition at line 171 of file vec.h.

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

◆ vec3() [2/3]

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

Definition at line 172 of file vec.h.

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

◆ vec3() [3/3]

vec3::vec3 ( const vec2 & v,
const float _z )
inline

constructeur par defaut.

Definition at line 174 of file vec.h.

174: x(v.x), y(v.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 183 of file vec.h.

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

◆ operator()() [2/2]

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

Definition at line 184 of file vec.h.

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

Member Data Documentation

◆ x

float vec3::x

Definition at line 186 of file vec.h.

◆ y

float vec3::y

Definition at line 186 of file vec.h.

◆ z

float vec3::z

Definition at line 186 of file vec.h.


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