Herezh_dev/Resultats/VRML/Animation_vrml.h
2023-05-03 17:23:49 +02:00

140 lines
6.6 KiB
C++

// This file is part of the Herezh++ application.
//
// The finite element software Herezh++ is dedicated to the field
// of mechanics for large transformations of solid structures.
// It is developed by Gérard Rio (APP: IDDN.FR.010.0106078.000.R.P.2006.035.20600)
// INSTITUT DE RECHERCHE DUPUY DE LÔME (IRDL) <https://www.irdl.fr/>.
//
// Herezh++ is distributed under GPL 3 license ou ultérieure.
//
// Copyright (C) 1997-2022 Université Bretagne Sud (France)
// AUTHOR : Gérard Rio
// E-MAIL : gerardrio56@free.fr
//
// This program 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 3 of the License,
// or (at your option) any later version.
//
// This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
//
// For more information, please consult: <https://herezh.irdl.fr/>.
/************************************************************************
* DATE: 23/01/97 *
* $ *
* AUTEUR: G RIO (mailto:gerardrio56@free.fr) *
* $ *
* PROJET: Herezh++ *
* $ *
************************************************************************
* BUT: Sortie de l'animation. *
* Celle-ci est automatique lorsqu'il y a plus d'un increment *
* différent de 0. *
* $ *
* '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' * *
* VERIFICATION: *
* *
* ! date ! auteur ! but ! *
* ------------------------------------------------------------ *
* ! ! ! ! *
* $ *
* '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' *
* MODIFICATIONS: *
* ! date ! auteur ! but ! *
* ------------------------------------------------------------ *
* $ *
************************************************************************/
#ifndef ANIMATION_T
#define ANIMATION_T
#include "OrdreVisu.h"
#include "Isovaleurs_vrml.h"
#include "ChoixDesMaillages_vrml.h"
#include "Deformees_vrml.h"
/// @addtogroup Les_sorties_vrml
/// @{
///
class Animation_vrml : public OrdreVisu
{
public :
// CONSTRUCTEURS :
// par defaut
Animation_vrml () ;
// constructeur de copie
Animation_vrml (const Animation_vrml& ord);
// DESTRUCTEUR :
~Animation_vrml () ;
// METHODES PUBLIQUES :
// execution de l'ordre
// tab_mail : donne les numéros de maillage concerné
// incre : numéro d'incrément qui en cours
// type_incre : indique si c'est le premier le dernier ou l'incrément courant a visualiser ou pas
// animation : indique si l'on est en animation ou pas
// unseul_incre : indique si oui ou non il y a un seul increment à visualiser
void ExeOrdre(ParaGlob * ,const Tableau <int>& tab_mail ,LesMaillages *,bool unseul_incre,LesReferences*
,LesLoisDeComp* ,DiversStockage*,Charge*,LesCondLim*,LesContacts*
,Resultats*,UtilLecture & entreePrinc,EnumTypeIncre type_incre,int incre
,bool animation,const map < string, const double * , std::less <string> >& listeVarGlob
,const List_io < TypeQuelconque >& listeVecGlob);
// choix de l'ordre, cet méthode peut entraîner la demande d'informations
// supplémentaires si nécessaire. qui sont ensuite gérer par la classe elle même
void ChoixOrdre();
// --- méthodes particulière -----
// initialisation d'une liaison avec une instance de classe d'isovaleur
void Jonction_isovaleur(const Isovaleurs_vrml * iso) {isovaleurs_vrml = iso;};
// initialisation d'une liaison avec une instance de classe de choix des maillages
void Jonction_ChoixDesMaillages(const ChoixDesMaillages_vrml* choix_m) {choix_mail = choix_m;};
// initialisation d'une liaison avec une instance de classe de choix de la déformée
void Jonction_Deformees_vrml(const Deformees_vrml* choix_def) {choix_deformee = choix_def;};
// initialisation des listes de coordonnées
void Init_liste_coordonnee();
// lecture des paramètres de l'ordre dans un flux
void Lecture_parametres_OrdreVisu(UtilLecture & entreePrinc);
// écriture des paramètres de l'ordre dans un flux
void Ecriture_parametres_OrdreVisu(UtilLecture & entreePrinc);
private :
// VARIABLES PROTEGEES :
double cycleInterval; // durée de l'animation
bool loop; // indique si on boucle ou pas
double startTime; // temps de démarrage en absolu depuis 1970
double stopTime; // temps de fin en absolu depuis 1970,
// si < a starttime on n'en tiend pas compte
bool debut_auto; // pour le début automatique
double inter_2pas; // interval entre deux dessins dans le cas d'un début automatique
const Isovaleurs_vrml * isovaleurs_vrml; // contient lorqu'il est actif les couleurs des noeuds
const ChoixDesMaillages_vrml* choix_mail; // contient lorqu'il est actif le choix des maillages
const Deformees_vrml* choix_deformee; // contient lorsqu'il est actif les choix relatifs à la déformée
// dans le cas de l'animation : définition des listes de positions et de nom si rattachant
// METHODES PROTEGEES :
};
/// @} // end of group
#endif