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

#ifndef _BUILDING_H
#define _BUILDING_H  1

#include <stdarg.h>

#include "Vec3D.h"
#include "Angle.h"
#include "Location.h"
#include "Wrap.h"
#include "Color.h"

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

//##################################################################
//      global Functions to
//      build all sorts of PATTERNS 
//##################################################################

// _impexp void buildAllPatterns       ();
// _impexp void buildAllAttribPatterns ();
// _impexp void buildAllGeoPatterns    ();
// _impexp void buildAllAttributes     ();


_impexp void buildPattern (const char *name, unsigned attribsNo, ...);

_impexp void buildAttribPattern (const char *name,
                                 const char *geopatternName,
                                 const char *attributeName);

_impexp void buildColorAttributeByName (const char *colorName);

_impexp void buildColorAttribute (const char *name,
                                  const RGBAColor& color);

_impexp void buildMaterialAttributeByName (const char *materialName);

_impexp void buildMaterialAttribute (const char *name,
                              const RGBAColor& ambient,
                              const RGBAColor& diffuse,
                              const RGBAColor& specular = RGBAColor (0.0,0.0,0.0,1.0),
                              const double& shininess   = 0.0);

_impexp void buildGeoPattern (const char *name,
                              const char *primitivName,
                              const char *attribName,
                              const Location& loc = Location ());


//##################################################################
//      global Functions to
//      build all sorts of PRIMITIVES 
//##################################################################

// _impexp void buildAllPrimitives ();

//==================================================================
//      Spot and linear Primitives 
//==================================================================

_impexp void buildLogicWrap        (const char *name,
                                    const Vec3D& anyCorner,
				    const Vec3D& oppositeCorner);

_impexp void buildSpot             (const char *name,
                                    const Vec3D& point);

_impexp void buildLine             (const char *name,
                                    const Vec3D& pStart, const Vec3D& pEnd);

_impexp void buildLineQuad         (const char *name,
                                    const Vec3D& p1, const Vec3D& p2,
				    const Vec3D& p3, const Vec3D& p4);

_impexp void buildLineCube         (const char *name,
                                    const Vec3D& anyCorner,
				    const Vec3D& oppositeCorner);

_impexp void buildLineArc          (const char *name,
                                    const double& rad,
				    const Vec3D& center = Vec3D (),
                                    const Angle& begin = 0,
				    const Angle& end = 360,
				    unsigned slices = 16);

_impexp void buildEllipticLineArc  (const char *name,
                                    const double& xRad, const double& yRad,
				    const Vec3D& center = Vec3D (),
                                    const Angle& begin = 0,
				    const Angle& end = 360,
				    unsigned slices = 16);

_impexp void buildLineStrip        (const char *name,
                                    unsigned pointsNo,
				    // "pointsNo" points as Vec3D*
				    ...);

_impexp void buildLineLoop         (const char *name,
                                    unsigned pointsNo,
				    // "pointsNo" points as Vec3D*
				    ...);


//==================================================================
//      plane Primitives (surfaces)
//==================================================================
_impexp void buildPlaneQuad        (const char *name,
                                    const Vec3D& p1, const Vec3D& p2,
                                    const Vec3D& p3, const Vec3D& p4);

_impexp void buildPlaneArc         (const char *name,
                                    const double& rad,
				    const double& dist,
				    const Vec3D& center = Vec3D (),
                                    const Angle& begin = 0,
				    const Angle& end = 360,
                                    unsigned slices = 16);

_impexp void buildEllipticPlaneArc (const char *name,
                                    const double& xRad, const double& yRad,
				    const double& dist,
				    const Vec3D& center = Vec3D (),
                                    const Angle& begin = 0,
				    const Angle& end = 360,
                                    unsigned slices = 16);

_impexp void buildTriangle         (const char *name,
                                    const Vec3D& p1,
				    const Vec3D& p2, const Vec3D& p3);

_impexp void buildTriangleFan      (const char *name,
                                    const Vec3D& center,
                                    unsigned outerPointsNo, // must be >= 2
				    // "outerpointsNo" further points as Vec3D*
				    ...);

_impexp void buildTriangleStrip    (const char *name,
                                    unsigned pointsNo, // must be >= 3
				    // "pointsNo" points as Vec3D*
				    ...);

_impexp void buildPlanePolygon     (const char *name,
                                    unsigned pointsNo, // must be >= 3
				    // "pointsNo" points as Vec3D*
				    ...);

_impexp void buildCylinderJacket   (const char *name,
                                    const double& xRad, const double& yRad,
                                    const double& height,
				    const Vec3D& bottomCenter = Vec3D (),
				    const Angle& begin = 0,
				    const Angle& end = 360,
				    unsigned slices = 16);

_impexp void buildConeJacket       (const char *name,
                                    const double& xRadAtBottom,
				    const double& yRadAtBottom,
				    const double& xRadAtTop,
				    const double& yRadAtTop,
                                    const double& height,
				    const Vec3D& bottomCenter = Vec3D (),
				    const Angle& begin = 0,
				    const Angle& end = 360,
				    unsigned slices = 16);


//==================================================================
//      solid Primitives (volumes)
//==================================================================
_impexp void buildCube             (const char *name,
                                    const Vec3D& anyCorner,
				    const Vec3D& oppositeCorner);

_impexp void buildSphere           (const char *name,
                                    const double& rad,
				    const Vec3D& center = Vec3D (),
				    unsigned slices = 16, unsigned disks = 16);

_impexp void buildCylinder         (const char *name,
                                    const double& rad,
                                    const double& height,
				    const Vec3D& bottomCenter = Vec3D (),
                                    const Angle& begin = 0,
				    const Angle& end = 360,
				    unsigned slices = 16);

_impexp void buildEllipticCylinder (const char *name,
                                    const double& xRad, const double& yRad,
                                    const double& height,
				    const Vec3D& bottomCenter = Vec3D (),
                                    const Angle& begin = 0,
				    const Angle& end = 360,
				    unsigned slices = 16);

_impexp void buildTube             (const char *name,
                                    const double& rad,
				    const double& dist, const double& height,
				    const Vec3D& bottomCenter = Vec3D (),
                                    const Angle& begin = 0,
				    const Angle& end = 360,
				    unsigned slices = 16);

_impexp void buildEllipticTube     (const char *name,
                                    const double& xRad, const double& yRad,
				    const double& dist, const double& height,
				    const Vec3D& bottomCenter = Vec3D (),
                                    const Angle& begin = 0,
				    const Angle& end = 360,
				    unsigned slices = 16);

_impexp void buildCone             (const char *name,
                                    const double& radAtBottom,
				    const double& radAtTop,
                                    const double& height,
				    const Vec3D& bottomCenter = Vec3D (),
                                    const Angle& begin = 0,
				    const Angle& end = 360,
				    unsigned slices = 16);

_impexp void buildEllipticCone     (const char *name,
                                    const double& xRadAtBottom, const double& yRadAtBottom,
				    const double& xRadAtTop,    const double& yRadAtTop,
                                    const double& height,
				    const Vec3D& bottomCenter = Vec3D (),
                                    const Angle& begin = 0,
				    const Angle& end = 360,
				    unsigned slices = 16);

_impexp void buildConeTube         (const char *name,
                                    const double& radAtBottom,
				    const double& radAtTop,
                                    const double& dist, const double& height,
				    const Vec3D& bottomCenter = Vec3D (),
                                    const Angle& begin = 0,
				    const Angle& end = 360,
				    unsigned slices = 16);

_impexp void buildEllipticConeTube (const char *name,
                                    const double& xRadAtBottom, const double& yRadAtBottom,
				    const double& xRadAtTop,    const double& yRadAtTop,
                                    const double& dist,         const double& height,
				    const Vec3D& bottomCenter = Vec3D (),
                                    const Angle& begin = 0,
				    const Angle& end = 360,
				    unsigned slices = 16);

_impexp void buildTorus            (const char *name,
                                    const double& innerRad, const double& outerRad,
				    const Vec3D& center = Vec3D (),
                                    unsigned slices = 16, unsigned disks = 16);


//==================================================================
//      Text Primitive
//==================================================================
_impexp void buildText             (const char *name,
                                    const char *text,
				    const double& size, const double& thickness,
				    const Vec3D& bottomLeftCenter = Vec3D ());

#endif

//	$Filename: C:\Software\SoftShop\XGraph\Space\AutoBld.h $	ends
