// $Source: /usr/local/SimSoft/SoftShop/XGraph/Primitiv/Linearc.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: Linearc.h,v $
// Revision 1.20  2001/11/29 15:52:24  baum
// -In Kalender.cpp und Kalender.h Handsteuerung eingebaut
//

#ifndef _LINEARC_H
#define _LINEARC_H 1

#ifndef WIN32
#define __rtti
#endif

#include "Primitiv.h"
#include "Angle.h"
#include "Vec3D.h"

#ifdef _LINEARC_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 LineArc 
//==================================================================

//##ModelId=4030D77E038A
class _impexp __rtti LineArc : public Primitive {
  public:
    // builds a LineCircle in XY-plane
    // out of default 16 slizes
	//##ModelId=4030D77E0399
    static Primitive *create (const double& rad, const Vec3D& mvec = Vec3D(),
                              const unsigned& slices = 16);

    //build an Oval
	//##ModelId=4030D77E039E
    static Primitive *create (const double& xrad, const double& yrad, const Vec3D& mvec = Vec3D(),
                              const unsigned& slices = 16);

    // build an Arc of Oval
	//##ModelId=4030D77E03AC
    static Primitive *create (const double& xrad, const double& yrad, const Angle& begin,
                              const Angle& end, const Vec3D& mvec = Vec3D(),
                              const unsigned& slices = 16);

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

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

  private:
    // constructors
    // builds a LineCircle in XY-plane
    // out of default 16 slizes
	//##ModelId=4030D77E03CA
    LineArc (const double& rad, const Vec3D& mvec,
             const unsigned& slices);

    //build an Oval
	//##ModelId=4030D77E03D8
    LineArc (const double& xrad, const double& yrad, const Vec3D& mvec,
             const unsigned& slices);

    // build an Arc of Oval
	//##ModelId=4030D77E03DD
    LineArc (const double& xrad, const double& yrad, const Angle& begin,
             const Angle& end, const Vec3D& mvec,
             const unsigned& slices);

    // destructor
	//##ModelId=4030D77F000F
    virtual ~LineArc ( );

    // default constructor declared, but not defined
	//##ModelId=4030D77F0011
    LineArc ();

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

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

    // data members
	//##ModelId=4030D77F0020
    double ObjRadX;
	//##ModelId=4030D77F0021
    double ObjRadY;
	//##ModelId=4030D77F002F
    Angle  ObjBeginAgl;
	//##ModelId=4030D77F0034
    Angle  ObjEndAgl;
	//##ModelId=4030D77F003F
    unsigned ObjSlices;
	//##ModelId=4030D77F0044
    Vec3D  ObjMidVec;

  //friends
    friend class Primitive;

};	// class LineArc 


#endif	// !defined _LINEARC_H

