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

#ifndef _PLANEARC_H
#define _PLANEARC_H 1

#ifndef WIN32
#define __rtti
#endif

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

#ifdef _PLANEARC_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 PlaneArc 
//==================================================================

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

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

    //build an OvalRing with 'dist' between inner and outer Ring
    // ('dist' should be a positiv value)
	//##ModelId=4030D782003F
    static Primitive *create (const double& xrad, const double& yrad, const double& dist, 
                              const Vec3D& mvec = Vec3D(), const unsigned& slices = 16);

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

    // build an Arc of OvalRing
    // ('dist' should be a positiv value)
	//##ModelId=4030D782005F
    static Primitive *create (const double& xrad, const double& yrad, const double& dist,
                              const Angle& begin, const Angle& end,
                              const Vec3D& mvec = Vec3D(), const unsigned& slices = 16);

	//##ModelId=4030D7820070
    static void buildOGLForOthers (const double& xrad, const double& yrad, const double& dist,
                                   const Angle& begin, const Angle& end,
                                   const Vec3D& mvec,  const unsigned& slices,
                                   bool normalUp, Vec2D* texSize = NULL);

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

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

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

    //build an OvalDisk
	//##ModelId=4030D78200A0
    PlaneArc (const double& xrad, const double& yrad, const Vec3D& mvec,
              const unsigned& slices);

    //build an OvalRing with 'dist' between inner and outer Ring
    // ('dist' should be a positiv value)
	//##ModelId=4030D78200AE
    PlaneArc (const double& xrad, const double& yrad, const double& dist, 
              const Vec3D& mvec, const unsigned& slices);

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

    // build an Arc of OvalRing
    // ('dist' should be a positiv value)
	//##ModelId=4030D78200CE
    PlaneArc (const double& xrad, const double& yrad, const double& dist,
              const Angle& begin, const Angle& end,
              const Vec3D& mvec, const unsigned& slices);

    // default constructor declared, but not defined
	//##ModelId=4030D78200DE
    PlaneArc ();

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

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

    // destructor
	//##ModelId=4030D78200ED
    virtual ~PlaneArc ();

    // data members
	//##ModelId=4030D78200FA
    double ObjRadX;
	//##ModelId=4030D78200FB
    double ObjRadY;
	//##ModelId=4030D7820109
    double ObjDist;
	//##ModelId=4030D782010B
    Angle  ObjBeginAgl;
	//##ModelId=4030D782011A
    Angle  ObjEndAgl;
	//##ModelId=4030D782011F
    unsigned ObjSlices;
	//##ModelId=4030D7820129
    Vec3D  ObjMidVec;

  //friends
    friend class Primitive;

};	// class PlaneArc 


#endif	// !defined _PLANEARC_H

