Fonctions membres publiques statiques

Référence de la classe Castor::MtxUtils

Opérations basiques sur des matrices 4x4. Plus de détails...

Liste de tous les membres

Fonctions membres publiques statiques

template<typename TypeA , typename TypeB >
static void rotate (SquareMatrix< TypeA, 4 > &p_matrix, Angle const &p_angle, Point< TypeB, 3 > const &p_axis)
 Fonction de rotation, construit une matrice de rotation a partir d'un angle et d'un axe.
template<typename TypeA >
static void rotate (SquareMatrix< TypeA, 4 > &p_matrix, Quaternion const &p_quat)
 Fonction de rotation, construit une matrice de rotation a partir d'un quaternion.
template<typename TypeA , typename TypeB >
static void set_rotate (SquareMatrix< TypeA, 4 > &p_matrix, Angle const &p_angle, Point< TypeB, 3 > const &p_axis)
 Fonction de rotation, construit une matrice de rotation a partir d'un angle et d'un axe.
template<typename TypeA >
static void set_rotate (SquareMatrix< TypeA, 4 > &p_matrix, Quaternion const &p_quat)
 Fonction de rotation, construit une matrice de rotation a partir d'un quaternion.
template<typename TypeA >
static void yaw (SquareMatrix< TypeA, 4 > &p_matrix, Angle const &p_angle)
 Fonction de rotation autour de l'axe Y, construit une matrice de rotation a partir d'un angle.
template<typename TypeA >
static void pitch (SquareMatrix< TypeA, 4 > &p_matrix, Angle const &p_angle)
 Fonction de rotation autour de l'axe X, construit une matrice de rotation a partir d'un angle.
template<typename TypeA >
static void roll (SquareMatrix< TypeA, 4 > &p_matrix, Angle const &p_angle)
 Fonction de rotation autour de l'axe Z, construit une matrice de rotation a partir d'un angle.
template<typename TypeA , typename TypeB >
static void scale (SquareMatrix< TypeA, 4 > &p_matrix, TypeB p_hx, TypeB p_hy, TypeB p_hz)
 Fonction de mise a l'echelle.
template<typename TypeA , typename TypeB >
static void scale (SquareMatrix< TypeA, 4 > &p_matrix, Point< TypeB, 3 > const &p_scale)
 Fonction de mise a l'echelle.
template<typename TypeA , typename TypeB >
static void set_scale (SquareMatrix< TypeA, 4 > &p_matrix, TypeB p_hx, TypeB p_hy, TypeB p_hz)
 Fonction de mise a l'echelle.
template<typename TypeA , typename TypeB >
static void set_scale (SquareMatrix< TypeA, 4 > &p_matrix, Point< TypeB, 3 > const &p_scale)
 Fonction de mise a l'echelle.
template<typename TypeA , typename TypeB >
static void translate (SquareMatrix< TypeA, 4 > &p_matrix, TypeB p_tx, TypeB p_ty, TypeB p_tz)
 Fonction de construction de matrice de translation.
template<typename TypeA , typename TypeB >
static void translate (SquareMatrix< TypeA, 4 > &p_matrix, Point< TypeB, 3 > const &p_translation)
 Fonction de construction de matrice de translation.
template<typename TypeA , typename TypeB >
static void set_translate (SquareMatrix< TypeA, 4 > &p_matrix, TypeB p_tx, TypeB p_ty, TypeB p_tz)
 Fonction de construction de matrice de translation.
template<typename TypeA , typename TypeB >
static void set_translate (SquareMatrix< TypeA, 4 > &p_matrix, Point< TypeB, 3 > const &p_translation)
 Fonction de construction de matrice de translation.
template<typename TypeA , typename TypeB >
static void perspective (SquareMatrix< TypeA, 4 > &p_matrix, Angle const &p_aFOVY, TypeB aspect, TypeB zNear, TypeB zFar)
 Construit une matrice de projection en perspective centree.
template<typename TypeA , typename TypeB >
static void frustum (SquareMatrix< TypeA, 4 > &p_matrix, TypeB left, TypeB right, TypeB bottom, TypeB top, TypeB nearVal, TypeB farVal)
 Construit une matrice de projection en perspective non centree.
template<typename TypeA , typename TypeB >
static void ortho (SquareMatrix< TypeA, 4 > &p_matrix, TypeB left, TypeB right, TypeB top, TypeB bottom)
 Construit une matrice de projection orthographique centree.
template<typename TypeA , typename TypeB >
static void ortho (SquareMatrix< TypeA, 4 > &p_matrix, TypeB left, TypeB right, TypeB bottom, TypeB top, TypeB zNear, TypeB zFar)
 Construit une matrice de projection orthographique non centree.
template<typename TypeA , typename TypeB , std::size_t Count>
static Point< TypeB, Count > mult (SquareMatrix< TypeA, 4 > const &p_matrix, Point< TypeB, Count > const &p_vertex)
 Transforme un vecteur par une matrice de transformation.
template<typename TypeA , typename TypeB >
static SquareMatrix< TypeA, 4 > mult (SquareMatrix< TypeA, 4 > const &p_matrixA, SquareMatrix< TypeB, 4 > const &p_matrixB)
 Multiplie 2 matrices.
template<typename TypeA >
static SquareMatrix< TypeA, 4 > switch_hand (SquareMatrix< TypeA, 4 > const &p_matrix)
 Change la main de la matrice (de main gauche a droite et inversement).

Description détaillée

Opérations basiques sur des matrices 4x4.

Auteur:
Sylvain DOREMUS
Version:
0.6.1.0
Date:
19/10/2011
Remarques:
Contient des fonctions de rotation, translation, scale et multiplication (optimisees pour des matrices 4x4)
Permet aussi de calculer les frustum, persperctive, ortho, le passage main gauche main droite et inversement

Documentation des fonctions membres

template<typename TypeA , typename TypeB >
static void Castor::MtxUtils::frustum ( SquareMatrix< TypeA, 4 > &  p_matrix,
TypeB  left,
TypeB  right,
TypeB  bottom,
TypeB  top,
TypeB  nearVal,
TypeB  farVal 
) [static]

Construit une matrice de projection en perspective non centree.

Paramètres:
[out] p_matrix La matrice qui contiendra le resultat
[in] left Position du plan gauche
[in] right Position du plan droit
[in] bottom Position du plan bas
[in] top Position du plan haut
[in] nearVal Position du plan proche
[in] farVal Position du plan lointain
template<typename TypeA , typename TypeB , std::size_t Count>
static Point<TypeB, Count> Castor::MtxUtils::mult ( SquareMatrix< TypeA, 4 > const &  p_matrix,
Point< TypeB, Count > const &  p_vertex 
) [static]

Transforme un vecteur par une matrice de transformation.

Paramètres:
[in] p_matrix La matrice
[in] p_vertex Le vecteur
Renvoie:
Le vecteur tranforme
template<typename TypeA , typename TypeB >
static SquareMatrix<TypeA, 4> Castor::MtxUtils::mult ( SquareMatrix< TypeA, 4 > const &  p_matrixA,
SquareMatrix< TypeB, 4 > const &  p_matrixB 
) [static]

Multiplie 2 matrices.

Paramètres:
[in] p_matrixA La premiere matrice
[in] p_matrixB La seconde matrice
Renvoie:
La matrice resultat
template<typename TypeA , typename TypeB >
static void Castor::MtxUtils::ortho ( SquareMatrix< TypeA, 4 > &  p_matrix,
TypeB  left,
TypeB  right,
TypeB  bottom,
TypeB  top,
TypeB  zNear,
TypeB  zFar 
) [static]

Construit une matrice de projection orthographique non centree.

Paramètres:
[out] p_matrix La matrice qui contiendra le resultat
[in] left Position du plan gauche
[in] right Position du plan droit
[in] bottom Position du plan bas
[in] top Position du plan haut
[in] zNear Position du plan proche
[in] zFar Position du plan lointain
template<typename TypeA , typename TypeB >
static void Castor::MtxUtils::ortho ( SquareMatrix< TypeA, 4 > &  p_matrix,
TypeB  left,
TypeB  right,
TypeB  top,
TypeB  bottom 
) [static]

Construit une matrice de projection orthographique centree.

Paramètres:
[out] p_matrix La matrice qui contiendra le resultat
[in] left Position du plan gauche
[in] right Position du plan droit
[in] bottom Position du plan bas
[in] top Position du plan haut
template<typename TypeA , typename TypeB >
static void Castor::MtxUtils::perspective ( SquareMatrix< TypeA, 4 > &  p_matrix,
Angle const &  p_aFOVY,
TypeB  aspect,
TypeB  zNear,
TypeB  zFar 
) [static]

Construit une matrice de projection en perspective centree.

Paramètres:
[out] p_matrix La matrice qui contiendra le resultat
[in] p_aFOVY Angle de vision Y
[in] aspect Ratio Largeur / Hauteur
[in] zNear Position du plan proche
[in] zFar Position du plan lointain
template<typename TypeA >
static void Castor::MtxUtils::pitch ( SquareMatrix< TypeA, 4 > &  p_matrix,
Angle const &  p_angle 
) [static]

Fonction de rotation autour de l'axe X, construit une matrice de rotation a partir d'un angle.

Paramètres:
[out] p_matrix La matrice qui contiendra le resultat
[in] p_angle L'angle de rotation
template<typename TypeA >
static void Castor::MtxUtils::roll ( SquareMatrix< TypeA, 4 > &  p_matrix,
Angle const &  p_angle 
) [static]

Fonction de rotation autour de l'axe Z, construit une matrice de rotation a partir d'un angle.

Paramètres:
[out] p_matrix La matrice qui contiendra le resultat
[in] p_angle L'angle de rotation
template<typename TypeA >
static void Castor::MtxUtils::rotate ( SquareMatrix< TypeA, 4 > &  p_matrix,
Quaternion const &  p_quat 
) [static]

Fonction de rotation, construit une matrice de rotation a partir d'un quaternion.

Paramètres:
[out] p_matrix La matrice qui contiendra le resultat
[in] p_quat Le quaternion contenant la rotation
template<typename TypeA , typename TypeB >
static void Castor::MtxUtils::rotate ( SquareMatrix< TypeA, 4 > &  p_matrix,
Angle const &  p_angle,
Point< TypeB, 3 > const &  p_axis 
) [static]

Fonction de rotation, construit une matrice de rotation a partir d'un angle et d'un axe.

Paramètres:
[out] p_matrix La matrice qui contiendra le resultat
[in] p_angle L'angle de rotation
[in] p_axis L'axe autour duquel l'angle est defini
template<typename TypeA , typename TypeB >
static void Castor::MtxUtils::scale ( SquareMatrix< TypeA, 4 > &  p_matrix,
TypeB  p_hx,
TypeB  p_hy,
TypeB  p_hz 
) [static]

Fonction de mise a l'echelle.

Paramètres:
[out] p_matrix La matrice qui contiendra le resultat
[in] p_hx,p_hy,p_hz Les valeurs d'echelle sur les 3 axes
template<typename TypeA , typename TypeB >
static void Castor::MtxUtils::scale ( SquareMatrix< TypeA, 4 > &  p_matrix,
Point< TypeB, 3 > const &  p_scale 
) [static]

Fonction de mise a l'echelle.

Paramètres:
[out] p_matrix La matrice qui contiendra le resultat
[in] p_scale Les valeurs d'echelle sur les 3 axes
template<typename TypeA >
static void Castor::MtxUtils::set_rotate ( SquareMatrix< TypeA, 4 > &  p_matrix,
Quaternion const &  p_quat 
) [static]

Fonction de rotation, construit une matrice de rotation a partir d'un quaternion.

Paramètres:
[out] p_matrix La matrice qui contiendra le resultat
[in] p_quat Le quaternion contenant la rotation
template<typename TypeA , typename TypeB >
static void Castor::MtxUtils::set_rotate ( SquareMatrix< TypeA, 4 > &  p_matrix,
Angle const &  p_angle,
Point< TypeB, 3 > const &  p_axis 
) [static]

Fonction de rotation, construit une matrice de rotation a partir d'un angle et d'un axe.

Paramètres:
[out] p_matrix La matrice qui contiendra le resultat
[in] p_angle L'angle de rotation
[in] p_axis L'axe autour duquel l'angle est defini
template<typename TypeA , typename TypeB >
static void Castor::MtxUtils::set_scale ( SquareMatrix< TypeA, 4 > &  p_matrix,
Point< TypeB, 3 > const &  p_scale 
) [static]

Fonction de mise a l'echelle.

Paramètres:
[out] p_matrix La matrice qui contiendra le resultat
[in] p_scale Les valeurs d'echelle sur les 3 axes
template<typename TypeA , typename TypeB >
static void Castor::MtxUtils::set_scale ( SquareMatrix< TypeA, 4 > &  p_matrix,
TypeB  p_hx,
TypeB  p_hy,
TypeB  p_hz 
) [static]

Fonction de mise a l'echelle.

Paramètres:
[out] p_matrix La matrice qui contiendra le resultat
[in] p_hx,p_hy,p_hz Les valeurs d'echelle sur les 3 axes
template<typename TypeA , typename TypeB >
static void Castor::MtxUtils::set_translate ( SquareMatrix< TypeA, 4 > &  p_matrix,
Point< TypeB, 3 > const &  p_translation 
) [static]

Fonction de construction de matrice de translation.

Paramètres:
[out] p_matrix La matrice qui contiendra le resultat
[in] p_translation Les valeurs de translation sur les 3 axes
template<typename TypeA , typename TypeB >
static void Castor::MtxUtils::set_translate ( SquareMatrix< TypeA, 4 > &  p_matrix,
TypeB  p_tx,
TypeB  p_ty,
TypeB  p_tz 
) [static]

Fonction de construction de matrice de translation.

Paramètres:
[out] p_matrix La matrice qui contiendra le resultat
[in] p_tx,p_ty,p_tz Les valeurs de translation sur les 3 axes
template<typename TypeA >
static SquareMatrix<TypeA, 4> Castor::MtxUtils::switch_hand ( SquareMatrix< TypeA, 4 > const &  p_matrix  )  [static]

Change la main de la matrice (de main gauche a droite et inversement).

Paramètres:
[in] p_matrix La matrice a changer
Renvoie:
La matrice changee
template<typename TypeA , typename TypeB >
static void Castor::MtxUtils::translate ( SquareMatrix< TypeA, 4 > &  p_matrix,
Point< TypeB, 3 > const &  p_translation 
) [static]

Fonction de construction de matrice de translation.

Paramètres:
[out] p_matrix La matrice qui contiendra le resultat
[in] p_translation Les valeurs de translation sur les 3 axes
template<typename TypeA , typename TypeB >
static void Castor::MtxUtils::translate ( SquareMatrix< TypeA, 4 > &  p_matrix,
TypeB  p_tx,
TypeB  p_ty,
TypeB  p_tz 
) [static]

Fonction de construction de matrice de translation.

Paramètres:
[out] p_matrix La matrice qui contiendra le resultat
[in] p_tx,p_ty,p_tz Les valeurs de translation sur les 3 axes
template<typename TypeA >
static void Castor::MtxUtils::yaw ( SquareMatrix< TypeA, 4 > &  p_matrix,
Angle const &  p_angle 
) [static]

Fonction de rotation autour de l'axe Y, construit une matrice de rotation a partir d'un angle.

Paramètres:
[out] p_matrix La matrice qui contiendra le resultat
[in] p_angle L'angle de rotation

La documentation de cette classe a été générée à partir du fichier suivant :
 Tout Classes Espaces de nommage Fichiers Fonctions Variables Définition de type Énumérations Valeurs énumérées Amis Macros