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

#ifndef _CONE_H
#define _CONE_H 1

#ifndef WIN32
#define __rtti
#endif

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

#ifdef _CONE_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 Cone
//==================================================================

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

    // builds a round tuncated Cone with Bottom on XY-plane
    // and side thickness of dist out of default 16 slices
    // the MidVec moves the BottomSide away
	//##ModelId=4030D7810007
    static Primitive *create (const double& botRad, const double& topRad,
                              const double& height, const double& dist,
                              const Vec3D& mvec = Vec3D (), const unsigned& slices = 16);

    // builds an elliptic tuncated Cone with Bottom on XY-plane
    // and side thickness of dist out of default 16 slices
    // the MidVec moves the BottomSide away
	//##ModelId=4030D781001F
    static Primitive *create (const double& xBotRad, const double& yBotRad,
                              const double& xTopRad, const double& yTopRad,
                              const double& height, const double& dist,
                              const Vec3D& mvec = Vec3D (), const unsigned& slices = 16);

    // builds an elliptic tuncated Cone with Bottom on XY-plane
    // with Start-Angle and End-Angle and side thickness of dist out of default 16 slices
    // the MidVec moves the BottomSide away
	//##ModelId=4030D7810030
    static Primitive *create (const double& xBotRad, const double& yBotRad,
                              const double& xTopRad, const double& yTopRad,
                              const double& height, const double& dist,
                              const Angle& begin, const Angle& end,
                              const Vec3D& mvec = Vec3D (), const unsigned& slices = 16);

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

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

  private:
	//##ModelId=4030D781005D
    Cone (const double& xBotRad, const double& yBotRad,
          const double& xTopRad, const double& yTopRad,
          const double& height,  const double& dist,
          const Vec3D& mvec, const unsigned& slices);

	//##ModelId=4030D781006F
    Cone (const double& xBotRad, const double& yBotRad,
          const double& xTopRad, const double& yTopRad,
          const double& height,  const double& dist,
          const Angle& begin, const Angle& end, const Vec3D& mvec,
          const unsigned& slices);

    // destructor
	//##ModelId=4030D781008C
    virtual ~Cone ();

    // default constructor declared, but not defined
	//##ModelId=4030D781008E
    Cone ();

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

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

    // data members
	//##ModelId=4030D781009D
    double   ObjBotRadX;
	//##ModelId=4030D781009E
    double   ObjBotRadY;
	//##ModelId=4030D78100AB
    double   ObjTopRadX;
	//##ModelId=4030D78100AC
    double   ObjTopRadY;
	//##ModelId=4030D78100BB
    double   ObjHeight;
	//##ModelId=4030D78100BC
    double   ObjDist;
	//##ModelId=4030D78100CC
    Angle    ObjBeginAgl;
	//##ModelId=4030D78100D1
    Angle    ObjEndAgl;
	//##ModelId=4030D78100DB
    Vec3D    ObjMidVec;
	//##ModelId=4030D78100E0
    unsigned ObjSlices;

  //friends
    friend class Primitive;

};	// class Cone 


#endif	// !defined _CONE_H

