/***************************************************************************** * * Copyright (C) 2003 Cédric Brégardis <cedric.bregardis@free.fr> * * This file is part of BRIQUOLO * * BRIQUOLO is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * BRIQUOLO is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with BRIQUOLO; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *****************************************************************************/ #ifndef MOGL_ELEMENTARBRE #define MOGL_ELEMENTARBRE #include "MOGL_MatriceTransformation.h" #include "MOGL_Afficheur.h" class MOGL_ElementArbre { protected : /** Matrice de transformation locale à l'élément de l'arbre. */ MOGL_MatriceTransformation _Matrice; /** Indique que la matrice a été modifiée. L'objet enfant qui utilise cet attribut doit le remettre à faux de sa propre initiative */ bool _ModifieMatrice; public : /** Constructeur par défaut. */ MOGL_ElementArbre(); /** Constructeur par copie. */ MOGL_ElementArbre(const MOGL_ElementArbre & p_ElementArbre); /** Destructeur. */ virtual ~MOGL_ElementArbre(); /** Méthode de préparation de l'affichage. TnL() (<i>Transform and Lighting</i>) est appelée, de façon à transférer les données représentée par l'élément de l'arbre à un MOGL_Afficheur. @param p_Afficheur : pointeur vers le MOGL_Afficheur destinée à représenter les informations stockées par l'élément de l'arbre. */ virtual void TnL(MOGL_Afficheur * p_Afficheur)=0; /** Permet de réinitialiser la matrice de transformation locale. */ virtual void ReinitialiserPosition(); /** Permet d'ajouter une transformation à l'élément de l'arbre. @param p_Matrice : matrice de transformation à ajouter à la matrice de transformation locale (cette matrice va être multipliée à gauche de #_Matrice) */ void AjouteTransformation(const MOGL_MatriceTransformation & p_Matrice); /** Permet d'ajouter une translation à l'élément de l'arbre. @param p_X : valeur en X de la translation. @param p_Y : valeur en Y de la translation. @param p_Z : valeur en Z de la translation. */ void AjouterTranslation(GLfloat p_X, GLfloat p_Y, GLfloat p_Z); }; #endif