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

#ifndef _TUBE_H
#define _TUBE_H 1

#ifndef WIN32
#define __rtti
#endif

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

#ifdef _TUBE_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 Tube 
//==================================================================

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

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

    // builds an elliptic Tube 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=4030D77B03B9
    static Primitive *create (const double& xRad, const double& yRad, 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=4030D77B03CB
    virtual void buildOGL (Vec2D* texSize = NULL);

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

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

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

    // destructor
	//##ModelId=4030D77C0013
    virtual ~Tube ();

    // default constructor declared, but not defined
	//##ModelId=4030D77C0015
    Tube ();

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

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

    // data members
	//##ModelId=4030D77C002E
    double   ObjRadX;
	//##ModelId=4030D77C002F
    double   ObjRadY;
	//##ModelId=4030D77C0030
    double   ObjHeight;
	//##ModelId=4030D77C003E
    double   ObjDist;
	//##ModelId=4030D77C0040
    Angle    ObjBeginAgl;
	//##ModelId=4030D77C004F
    Angle    ObjEndAgl;
	//##ModelId=4030D77C005D
    Vec3D    ObjMidVec;
	//##ModelId=4030D77C0062
    unsigned ObjSlices;

  //friends
    friend class Primitive;

};	// class Tube 


#endif	// !defined _TUBE_H

