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

#ifndef _SPHERE_H
#define _SPHERE_H 1

#ifndef WIN32
#define __rtti
#endif

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

#ifdef _SPHERE_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 Sphere 
//==================================================================

//##ModelId=4030D77C035B
class _impexp __rtti Sphere : public Primitive {
  public:
    // builds a Sphere 
    // out of default 16 slices and stacks
    // (this is like longitudes and latitudes)
    // the MidVec moves the MiddlePoint away
	//##ModelId=4030D77C036C
    static Primitive *create (const double& rad, const Vec3D& mvec = Vec3D(),
                              const unsigned& slices = 16,
                              const unsigned& stacks = 16);

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

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

  private:
    // constructors
	//##ModelId=4030D77C038C
    Sphere (const double& rad, const Vec3D& mvec,
            const unsigned& slices, const unsigned& stacks);

    // destructor
	//##ModelId=4030D77C039A
    virtual ~Sphere ();

    // default constructor declared, but not defined
	//##ModelId=4030D77C039C
    Sphere ();

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

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

    // data members
	//##ModelId=4030D77C03AB
    double   ObjRad;
	//##ModelId=4030D77C03BA
    unsigned ObjSlices;
	//##ModelId=4030D77C03BF
    unsigned ObjStacks;
	//##ModelId=4030D77C03C9
    Vec3D    ObjMidVec;

  //friends
    friend class Primitive;

};	// class Sphere 


#endif	// !defined _SPHERE_H

