// -*- Mode: c++; tab-width: 8; c-basic-offset: 2; indent-tabs-mode: nil -*-
// NOTE: the first line of this file sets up source code indentation rules
// for Emacs; it is also a hint to anyone modifying this file.

// File         : the_curve_proc.hxx
// Author       : Paul A. Koshevoy
// Created      : Sun Nov 27 16:17:00 MDT 2005
// Copyright    : (C) 2005
// License      : GPL.
// Description  :

#ifndef THE_CURVE_PROC_HXX_
#define THE_CURVE_PROC_HXX_

// thelib includes:
#include <doc/the_procedure.hxx>
#include <utils/the_text.hxx>
#include <opengl/the_disp_list.hxx>
#include <sel/the_curve_selset.hxx>

// forward declarations:
class the_bbox_t;
class the_view_t;
class the_view_volume_t;
class the_bspline_geom_t;


//----------------------------------------------------------------
// the_curve_proc_t
// 
class the_curve_proc_t : public the_procedure_t
{
public:
  the_curve_proc_t();
  the_curve_proc_t(const the_curve_proc_t & proc);
  ~the_curve_proc_t();
  
  // virtual: the curve procedures don't live long enough to justify cloning:
  the_primitive_t * clone() const
  { return new the_curve_proc_t(*this); }
  
  // virtual:
  const char * name() const
  { return "curve"; }
  
  // virtual:
  bool regenerate();
  
  // virtual:
  void draw(const the_view_t & view) const;
  
  // virtual: calculate the model bounding box:
  void calc_bbox(const the_view_t & view, the_bbox_t & bbox) const;
  
  // accessors:
  inline const the_curve_selset_t & selset() const
  { return selset_; }
  
  inline the_curve_selset_t & selset()
  { return selset_; }
  
protected:
  // display lists:
  the_disp_list_t dl_lines_;
  the_disp_list_t dl_points_;
  
  // the selection set:
  the_curve_selset_t selset_;
};


#endif // THE_CURVE_PROC_HXX_

