/**
 ** sipp - SImple Polygon Processor
 **
 **  A general 3d graphic package
 **
 **  Copyright Equivalent Software HB  1992
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License as published by
 ** the Free Software Foundation; either version 1, or any later version.
 ** This program is distributed in the hope that it will be useful,
 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ** GNU General Public License for more details.
 ** You can receive a copy of the GNU General Public License from the
 ** Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 **/

/**
 ** primitives.h - Interface to the various primitive object functions.
 **/

#ifndef PRIMITIVES_H
#define PRIMITIVES_H

#include <sipp.h>


/*
 * Types of texture coordinates.
 */
#define WORLD         0
#define CYLINDRICAL   1
#define SPHERICAL     2
#define NATURAL       3


EXTERN void
LoadPrimPolygon _ANSI_ARGS_((Object *poly,
			     FILE   *fp,
			     void   *mat,
			     Shader *shader,
			     int     texture));

EXTERN void
CreateTorus _ANSI_ARGS_((Object *torus,
			 double x, double y, double z,
			 double  bigradius,
			 double  smallradius,
			 int     res1,
			 int     res2,
			 void   *surface,
			 Shader *shader,
			 int     texture));

EXTERN void
CreateCone _ANSI_ARGS_((Object *cone,
			double x, double y, double z,
			double   radius_bot,
                       double   radius_top,
                       double   length,
                       int      res,
                       void    *surface,
                       Shader  *shader,
                       int      texture));

EXTERN void
CreateCylinder _ANSI_ARGS_((Object *cylinder,
			    double x, double y, double z,
			    double    radius,
                           double    length,
                           int       res,
                           void     *surface,
                           Shader   *shader,
                           int       texture));

EXTERN void
CreateEllipsoid _ANSI_ARGS_((Object *ellipsoid,
			     double x,
			     double y,
			     double z,
			     double  x_rad,
			     double  y_rad,
			     double  z_rad,
			     int     res,
			     void   *surface,
			     Shader *shader,
			     int     texture));

EXTERN void
CreateSphere _ANSI_ARGS_((Object *sphere,
			  double  x,
			  double  y,
			  double  z,
			  double  radius,
			  int     res,
			  void   *surface,
			  Shader *shader,
			  int     texture));

EXTERN void
CreatePrism _ANSI_ARGS_((Object *prism,
			int	 num_points,
                        Vector  *points,
                        double zcenter,
			double   length,
                        void    *surface,
                        Shader  *shader,
                        int      texture));

EXTERN void
CreateBlock _ANSI_ARGS_((Object *block,
			 double xcenter,
			 double ycenter,
			 double zcenter,
			 double   xsize,
			 double   ysize,
			 double   zsize,
			 void    *surface,
			 Shader  *shader,
			 int      texture));

EXTERN void
CreateCube _ANSI_ARGS_((Object *cube,
			double xcenter,
			double ycenter,
			double zcenter,
			double   size,
			void    *surface,
			Shader  *shader,
			int      texture));

EXTERN Object *
sipp_bezier_file _ANSI_ARGS_((FILE    *file,
                              int      res,
                              void    *surface,
                              Shader  *shader,
                              int      texture));

EXTERN void
CreateBezierPatch _ANSI_ARGS_((Object *bezierPatch,
			       int     nvert,
			       Vector *vertex,
			       int     npatch,
			       int    *cp_index,
			       int     res,
			       void   *surface,
			       Shader *shader,
			       int     texture));

EXTERN void
CreateCylBezier _ANSI_ARGS_((Object *cylBezier,
			     int     nvert,
			     Vector *vertex,
			     int     ncurve,
			     int    *cp_index,
			     int     res,
			     void   *surface,
			     Shader *shader,
			     int     texture));

EXTERN void
CreateTeapot _ANSI_ARGS_((Object *teapot,
			  int          resolution,
			  void        *surface,
			  Shader      *shader,
			  int          texture));

EXTERN void
CreateTeapotBody _ANSI_ARGS_((Object *body,
			      int          resolution,
                              void        *surface,
                              Shader      *shader,
                              int          texture));

EXTERN void
CreateTeapotLid _ANSI_ARGS_((Object *lid,
			     int         resolution,
                             void       *surface,
                             Shader     *shader,
                             int         texture));

EXTERN void
CreateTeapotSpout _ANSI_ARGS_((Object *spout,
			       int         resolution,
                               void       *surface,
                               Shader     *shader,
                               int         texture));

EXTERN void
CreateTeapotHandle _ANSI_ARGS_((Object *handle,
				int         resolution,
                                void       *surface,
                                Shader     *shader,
                                int         texture));


#endif /* PRIMITIVES_H */
