/* ------------------------------------------------------------------
 * GEM - Graphics Environment for Multimedia
 *
 * SPDX-FileCopyrightText: © 2002, IOhannes m zmölnig and the GEM contributors
 * SPDX-License-Identifier: GPL-2.0-or-later
 *
 * this file has been generated...
 * ------------------------------------------------------------------
 */

#ifndef _INCLUDE__GEM_OPENGL_GEMGLFRUSTUM_H_
#define _INCLUDE__GEM_OPENGL_GEMGLFRUSTUM_H_

#include "Base/GemGLBase.h"

/*
 CLASS
        GEMglFrustum
 KEYWORDS
        openGL  0
 DESCRIPTION
        wrapper for the openGL-function
        "glFrustum( GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)"
 */

class GEM_EXTERN GEMglFrustum : public GemGLBase
{
  CPPEXTERN_HEADER(GEMglFrustum, GemGLBase);

public:
  // Constructor
  GEMglFrustum (int, t_atom*);  // CON

protected:
  // Destructor
  virtual ~GEMglFrustum ();
  // Do the rendering
  virtual void  render (GemState *state);

  // variables
  GLdouble      left;           // VAR
  virtual void  leftMess(t_float);      // FUN

  GLdouble      right;          // VAR
  virtual void  rightMess(t_float);     // FUN

  GLdouble      bottom;         // VAR
  virtual void  bottomMess(t_float);    // FUN

  GLdouble      top;            // VAR
  virtual void  topMess(t_float);       // FUN

  GLdouble      zNear;          // VAR
  virtual void  zNearMess(t_float);     // FUN

  GLdouble      zFar;           // VAR
  virtual void  zFarMess(t_float);      // FUN


private:

  // we need some inlets
  t_inlet *m_inlet[6];

  // static member functions
  static void    leftMessCallback (void*, t_float);
  static void    rightMessCallback (void*, t_float);
  static void    bottomMessCallback (void*, t_float);
  static void    topMessCallback (void*, t_float);
  static void    zNearMessCallback (void*, t_float);
  static void    zFarMessCallback (void*, t_float);
};
#endif // for header file
