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

vecteur generique 4d, ou 3d homogene, utilitaire. More...

#include <vec.h>

Public Member Functions

 vec4 ()
 constructeur par defaut.
 vec4 (const float _x, const float _y, const float _z, const float _w)
 vec4 (const vec2 &v, const float _z=0, const float _w=0)
 constructeur par defaut.
 vec4 (const vec3 &v, const float _w=0)
 constructeur par defaut.
 vec4 (const Point &a)
 cree un vecteur generique a partir des coordonnees du point a, (a.x, a.y, a.z, 1).
 vec4 (const Vector &v)
 cree un vecteur generique a partir des coordonnees du vecteur v, (v.x, v.y, v.z, 0).
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
float w

Detailed Description

vecteur generique 4d, ou 3d homogene, utilitaire.

Definition at line 191 of file vec.h.

Constructor & Destructor Documentation

◆ vec4() [1/4]

vec4::vec4 ( )
inline

constructeur par defaut.

Definition at line 194 of file vec.h.

194: x(0), y(0), z(0), w(0) {}

◆ vec4() [2/4]

vec4::vec4 ( const float _x,
const float _y,
const float _z,
const float _w )
inline

Definition at line 195 of file vec.h.

195: x(_x), y(_y), z(_z), w(_w) {}

◆ vec4() [3/4]

vec4::vec4 ( const vec2 & v,
const float _z = 0,
const float _w = 0 )
inline

constructeur par defaut.

Definition at line 197 of file vec.h.

197: x(v.x), y(v.y), z(_z), w(_w) {}

◆ vec4() [4/4]

vec4::vec4 ( const vec3 & v,
const float _w = 0 )
inline

constructeur par defaut.

Definition at line 199 of file vec.h.

199: x(v.x), y(v.y), z(v.z), w(_w) {}

Member Function Documentation

◆ operator()() [1/2]

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

renvoie la ieme composante du vecteur.

Definition at line 207 of file vec.h.

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

◆ operator()() [2/2]

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

Definition at line 208 of file vec.h.

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

Member Data Documentation

◆ x

float vec4::x

Definition at line 210 of file vec.h.

◆ y

float vec4::y

Definition at line 210 of file vec.h.

◆ z

float vec4::z

Definition at line 210 of file vec.h.

◆ w

float vec4::w

Definition at line 210 of file vec.h.


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