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

#ifndef _TORUS_H
#define _TORUS_H 1

#ifndef WIN32
#define __rtti
#endif

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

#ifdef _TORUS_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

//==================================================================
//		Klassen-Header
//		for class Torus 
//==================================================================

//##ModelId=4030D77C0196
class _impexp __rtti Torus : public Primitive {
  public:
    // builds a Torus in X-Y-plane
    // 'innerRad' is the inner radius of the torus (roll)
    // 'outerRad' is outer radius of the torus (ring)
    // out of default 16 sides for each radial section
    // and 16 rings of radial divisions for the torus
    // the MidVec moves the centre away
    // virtual functions for Building Display-Lists
	//##ModelId=4030D77C01A5
    static Primitive * create (const double& innerRad, const double& outerRad,
                               const Vec3D& mvec = Vec3D(),
                               const unsigned& sides = 16,
		                       const unsigned& rings = 16);

	//##ModelId=4030D77C01B5
    virtual void buildOGL (Vec2D* texSize = NULL);

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

  private:
    // constructors
	//##ModelId=4030D77C01C5
    Torus (const double& innerRad, const double& outerRad,
           const Vec3D& mvec, const unsigned& sides,
	   const unsigned& rings);

    // destructor
	//##ModelId=4030D77C01CB
    virtual ~Torus ();

    // default constructor declared, but not defined
	//##ModelId=4030D77C01D5
    Torus ();

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

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

    // data members
	//##ModelId=4030D77C01E5
    double   ObjInnerRad;
	//##ModelId=4030D77C01E6
    double   ObjOuterRad;
	//##ModelId=4030D77C01F5
    unsigned ObjSides;
	//##ModelId=4030D77C01FA
    unsigned ObjRings;
	//##ModelId=4030D77C0205
    Vec3D    ObjMidVec;

  //friends
    friend class Primitive;

};	// class Torus 


#endif	// !defined _TORUS_H

