
#ifndef TFONTAINE_H_INCLUDED
#define TFONTAINE_H_INCLUDED

/*
OBJET       classe d'une fontaine

DATE        04/2025

AUTEUR      philippe Thebaud

COMMENTAIRE
*/

#include <GL/glew.h>
#include <string>
#include <vector>

#include "../ECO/OUtils.h"
#include "../ECO/OTexturelist.h"
#include "../ECO/defered/ODshGeo.h"
#include "../ECO/OMesh_obj.h"

#include "common.h"

#include "Tdetector.h"
#include "TprtJet.h"
// pour bassin
#include "Tsh_ripple.h"


class Tfontaine
{
public:
	Tfontaine();
	~Tfontaine();

	void        addDetecteur(std::string flux);
	void        addEau(std::string flux);
	void        addJet(std::string flux);

    void        create(std::string flux);

    void        draw(ODshGeo& dshGeo);
    // pas defered geo
    void        draw_water(const OMat4& vp, float ambient);
	void        draw_particle();

	void        getIn(OVec3_f& srcPos);

	void        update(float ambient);

private:

    void        _composition();

    void        _setModel();

private:

    std::string m_code, m_path, m_file;
    bool        m_cull_face;

    OMesh_obj   mesh_bassin;

    OMesh_obj   mesh_eau;
    Tsh_ripple  sh_ripple;
    float       m_time;
    bool        m_eau_exist;

	Tdetector   detecteur;
	TprtJet     prtJet;

    OMat4       m_model;
	OVec3_f     m_pos;
    OVec3_f     m_rot;
    //Ovec3_f     m_scale;


};



#endif
