// $Source: /usr/local/SimSoft/SoftShop/XGraph/Primitiv/Lineloop.h,v $
// $Revision: 1.20 $
// $Author: baum $
// $Date: 2001/11/29 15:52:24 $
//
// Login name of the user who locked the revision
// $Locker:  $
// Tag name used to checkout the file
// $Name: Release-20 $
// State assigned to revision
// $State: Exp $
//
//
// $Log: Lineloop.h,v $
// Revision 1.20  2001/11/29 15:52:24  baum
// -In Kalender.cpp und Kalender.h Handsteuerung eingebaut
//

#ifndef _LINELOOP_H
#define _LINELOOP_H 1

#ifndef WIN32
#define __rtti
#endif

#include "Primitiv.h"
#include "Vec3D.h"
#include "Array.h"
#include "Wrap.h"

#ifdef _LINELOOP_CPP
#  undef _impexp
#  define _impexp __declspec(dllexport)
#elif defined BUILD_XGRAPH_DLL
#  undef _impexp
#  define _impexp
#else
#  undef _impexp
#  define _impexp __declspec(dllimport)
#endif

#if defined __GNUG__ || defined __hpux
#  undef _impexp
#  define _impexp
#endif

//==================================================================
//		Class-Header
//		for class LineLoop 
//==================================================================

//##ModelId=4030D77E0290
class _impexp __rtti LineLoop : public Primitive
  {
  public:
    // constructs a PlanePolygon
	//##ModelId=4030D77E02A0
    static Primitive *create (const Array<Vec3D>& vecs, const Array<int>& index);

    // constructs a LineLoop
	//##ModelId=4030D77E02A4
    static Primitive *create (const Vec3D& p1, const Vec3D& p2);

    // constructs a LineLoop
    // with 'pointNr' of Vec3D* 
	//##ModelId=4030D77E02B1
    static Primitive *create (unsigned pointsNo, ...);

    // inserting Vec3D
	//##ModelId=4030D77E02B5
    void insert (const Vec3D&);

    // virtual functions for Building Display-Lists
	//##ModelId=4030D77E02C0
    virtual void buildOGL (Vec2D* texSize = NULL);

  protected:
    // writing create-command to ostr
	//##ModelId=4030D77E02C3
    void stream (ostream& ostr) const;

  private:
    // data-members
	//##ModelId=4030D77E02CF
    unsigned     ObjLast;
	//##ModelId=4030D77E02D4
    WrapBox      ObjWrap;
	//##ModelId=4030D77E02DF
    Array<Vec3D> ObjVecs;
	//##ModelId=4030D77E02EF
    Array<int>   ObjVecsIndex;

    // constructors
	//##ModelId=4030D77E02F3
    LineLoop (const Array<Vec3D>& vecs, const Array<int>& index);
	//##ModelId=4030D77E02FF
    LineLoop (const Vec3D& p1, const Vec3D& p2);

    // destructor
	//##ModelId=4030D77E030E
    virtual ~LineLoop ( );

    // default constructor declared, but not defined
	//##ModelId=4030D77E0310
    LineLoop ();

    // copy constructor declared, but not defined
	//##ModelId=4030D77E0311
    LineLoop (const LineLoop&);

    // assignment operator declared, but not defined
	//##ModelId=4030D77E031D
    LineLoop& operator = (const LineLoop&);

  //friends
    friend class Primitive;

};	// class LineLoop 

#endif	// !defined _LINELOOP_H

