/*
*     ___                       ____ ___
*    / _ \___ _    _____ ____  |_  // _ \
*   / ___/ _ \ |/|/ / -_) __/ _/_ </ // /
*  /_/   \___/__,__/\__/_/   /____/____/
*
*
*   Original Code by John Garrison
*   Written September 3, 1999
*
*   To be released under the LGPL
*
*   Basic drawing of 3d solid objects
*
*   See LICENSE.TXT for more LGPL info
*/

#ifndef _p3dobjects_H
#define _p3dobjects_H

#ifdef __cplusplus
extern "C" {
#endif

#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glut.h>

#include "power3d.h"


#define STACKDEPTH 10

typedef struct {
    GLdouble    mat[4][4];
    GLdouble    norm[3][3];
} mat_t;

extern mat_t matstack[STACKDEPTH];
extern int identitymat;
extern int mattop;

P3D_Object P3D_CreateWireSphere (float Radius, P3D_Color Color);
P3D_Object P3D_CreateSolidSphere (float Radius, P3D_Color Color);

P3D_Object P3D_CreateWireCube (float Size, P3D_Color Color);
P3D_Object P3D_CreateSolidCube (float Size, P3D_Color Color);
P3D_Object P3D_CreateWireBox(float Width, float Height, float Depth, P3D_Color Color);
P3D_Object P3D_CreateSolidBox(float Width, float Height, float Depth, P3D_Color Color);

P3D_Object P3D_CreateWireTorus (float InnerRadius, float OuterRadius, P3D_Color Color);
P3D_Object P3D_CreateSolidTorus (float InnerRadius, float OuterRadius, P3D_Color Color);

P3D_Object P3D_CreateWireCylinder (float Radius, float Height, P3D_Color Color);
P3D_Object P3D_CreateSolidCylinder (float Radius, float Height, P3D_Color Color);
P3D_Object P3D_CreateWireCone (float Base, float Height, P3D_Color Color);
P3D_Object P3D_CreateSolidCone (float Base, float Height, P3D_Color Color);

P3D_Object P3D_CreateWirePrizm (float Width, float Length, P3D_Color Color);
P3D_Object P3D_CreateSolidPrizm (float Width, float Length, P3D_Color Color);
P3D_Object P3D_CreateWirePyramid (float Base, float Height, P3D_Color Color);
P3D_Object P3D_CreateSolidPyramid (float Base, float Height, P3D_Color Color);

#ifdef __cplusplus
};
#endif

#endif