<commit_before>/*************** <auto-copyright.pl BEGIN do not edit this line> **************
 *
 * VR Juggler is (C) Copyright 1998-2002 by Iowa State University
 *
 * Original Authors:
 *   <NAME>, <NAME>,
 *   <NAME>, <NAME>,
 *   <NAME>, <NAME>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library 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
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 *
 * -----------------------------------------------------------------
 * File:          $RCSfile$
 * Date modified: $Date$
 * Version:       $Revision$
 * -----------------------------------------------------------------
 *
 *************** <auto-copyright.pl END do not edit this line> ***************/

#ifndef _VRJ_FRUSTUM_H_
#define _VRJ_FRUSTUM_H_

#include <vrj/vrjConfig.h>

namespace vrj
{

/**
 * A frustum object.  This is a frustum.
 *
 * @date 10-1-97
 */
class VJ_CLASS_API Frustum
{
public:
   enum entry
   {VJ_LEFT = 0, VJ_RIGHT = 1, VJ_BOTTOM, VJ_TOP, VJ_NEAR, VJ_FAR};

   Frustum()
   {
      frust[0] = frust[1] = frust[2] = 0.0f;
      frust[3] = frust[4] = frust[5] = 0.0f;
   }

   void setBottomLeftTopRight(float bot_val, float left_val, float top_val, float right_val)
   {
      frust[VJ_BOTTOM] = bot_val;
      frust[VJ_LEFT] = left_val;
      frust[VJ_TOP] = top_val;
      frust[VJ_RIGHT] = right_val;
   }

   void setNearFar(float near_val, float far_val)
   {
      frust[VJ_NEAR] = near_val;
      frust[VJ_FAR] = far_val;
   }

   void set(float left_val, float right_val, float bottom_val, float top_val, float near_val, float far_val)
   {
      frust[VJ_LEFT] = left_val;
      frust[VJ_RIGHT] = right_val;
      frust[VJ_BOTTOM] = bottom_val;
      frust[VJ_TOP] = top_val;
      frust[VJ_NEAR] = near_val;
      frust[VJ_FAR] = far_val;
   }

   float& operator[](int elt)
   {
      return frust[elt];
   }

public:
   float frust[6];  /**<  Left, Right, Bottom, Top, Near, Far */
};


// ---- FRIEND FUNCTIONS ---- //
std::ostream& operator<<(std::ostream& out, Frustum& _frust);

};
#endif<commit_msg>Include the iostream header since we declare an overloaded operator<< for std::ostream and vrj::Frustum.<commit_after>/*************** <auto-copyright.pl BEGIN do not edit this line> **************
 *
 * VR Juggler is (C) Copyright 1998-2002 by Iowa State University
 *
 * Original Authors:
 *   <NAME>, <NAME>,
 *   <NAME>, <NAME>,
 *   <NAME>, <NAME>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library 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
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 *
 * -----------------------------------------------------------------
 * File:          $RCSfile$
 * Date modified: $Date$
 * Version:       $Revision$
 * -----------------------------------------------------------------
 *
 *************** <auto-copyright.pl END do not edit this line> ***************/

#ifndef _VRJ_FRUSTUM_H_
#define _VRJ_FRUSTUM_H_

#include <vrj/vrjConfig.h>

#include <iostream>


namespace vrj
{

/**
 * A frustum object.  This is a frustum.
 *
 * @date 10-1-97
 */
class VJ_CLASS_API Frustum
{
public:
   enum entry
   {VJ_LEFT = 0, VJ_RIGHT = 1, VJ_BOTTOM, VJ_TOP, VJ_NEAR, VJ_FAR};

   Frustum()
   {
      frust[0] = frust[1] = frust[2] = 0.0f;
      frust[3] = frust[4] = frust[5] = 0.0f;
   }

   void setBottomLeftTopRight(float bot_val, float left_val, float top_val, float right_val)
   {
      frust[VJ_BOTTOM] = bot_val;
      frust[VJ_LEFT] = left_val;
      frust[VJ_TOP] = top_val;
      frust[VJ_RIGHT] = right_val;
   }

   void setNearFar(float near_val, float far_val)
   {
      frust[VJ_NEAR] = near_val;
      frust[VJ_FAR] = far_val;
   }

   void set(float left_val, float right_val, float bottom_val, float top_val, float near_val, float far_val)
   {
      frust[VJ_LEFT] = left_val;
      frust[VJ_RIGHT] = right_val;
      frust[VJ_BOTTOM] = bottom_val;
      frust[VJ_TOP] = top_val;
      frust[VJ_NEAR] = near_val;
      frust[VJ_FAR] = far_val;
   }

   float& operator[](int elt)
   {
      return frust[elt];
   }

public:
   float frust[6];  /**<  Left, Right, Bottom, Top, Near, Far */
};

// ---- FRIEND FUNCTIONS ---- //
std::ostream& operator<<(std::ostream& out, Frustum& _frust);

}

#endif
{'fraction_non_alphanumeric': 0.17445309603262885, 'fraction_numerical': 0.015202076381164257, 'mean_word_length': 2.632996632996633, 'pattern_counts': {'":': 0, '<': 30, '<?xml version=': 0, '>': 22, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1996740', 'n_tokens_mistral': 1897, 'n_tokens_neox': 1827, 'n_words': 552}