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

#ifndef _CYLINDER_H
#define _CYLINDER_H 1

#ifndef WIN32
#define __rtti
#endif

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

#ifdef _CYLINDER_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 Cylinder
//==================================================================

//##ModelId=4030D7800177
class _impexp __rtti Cylinder : public Primitive {
  public:
    // builds a round Cylinder with Bottom on XY-plane
    // out of default 16 slices
    // the MidVec moves the BottomSide away
	//##ModelId=4030D7800187
    static Primitive *create (const double& rad, const double& height,
                              const Vec3D& mvec = Vec3D (), const unsigned& slices = 16);

    // builds an elliptic Cylinder with Bottom on XY-plane
    // out of default 16 slices
    // the MidVec moves the BottomSide away
	//##ModelId=4030D7800198
    static Primitive *create (const double& xRad, const double& yRad, const double& height,
                              const Vec3D& mvec = Vec3D (), const unsigned& slices = 16);

    // builds an elliptic Cylinder with Bottom on XY-plane
    // with Start-Angle and End-Angle out of default 16 slices
    // the MidVec moves the BottomSide away
	//##ModelId=4030D78001A7
    static Primitive *create (const double& xRad, const double& yRad, const double& height,
                              const Angle& begin, const Angle& end,
                              const Vec3D& mvec = Vec3D (), const unsigned& slices = 16);

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

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

  private:
	//##ModelId=4030D78001C8
    Cylinder (const double& xRad, const double& yRad, const double& height,
              const Vec3D& mvec, const unsigned& slices);

	//##ModelId=4030D78001D6
    Cylinder (const double& xRad, const double& yRad, const double& height,
              const Angle& begin, const Angle& end,
              const Vec3D& mvec, const unsigned& slices);

    // destructor
	//##ModelId=4030D78001E8
    virtual ~Cylinder ();

    // default constructor declared, but not defined
	//##ModelId=4030D78001EA
    Cylinder ();

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

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

    // data members
	//##ModelId=4030D78001F8
    double   ObjRadX;
	//##ModelId=4030D7800203
    double   ObjRadY;
	//##ModelId=4030D7800204
    double   ObjHeight;
	//##ModelId=4030D7800214
    Angle    ObjBeginAgl;
	//##ModelId=4030D7800219
    Angle    ObjEndAgl;
	//##ModelId=4030D7800223
    Vec3D    ObjMidVec;
	//##ModelId=4030D7800228
    unsigned ObjSlices;

  //friends
    friend class Primitive;

};	// class Cylinder


#endif	// !defined _CYLINDER_H

