/* Copyright (c) 2015, Mislav Bozicevic <misbozice@foi.hr> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifndef STOZAC_H #define STOZAC_H #include <assert.h> #include <stdlib.h> #include <math.h> #include <GL/gl.h> #ifndef M_PI #define M_PI 3.14159265358979323846264338327 #endif struct stozac_t{ int n; float h; float r; int vrhovi_baza_len; GLfloat *vrhovi_baza; int normale_baza_len; GLfloat *normale_baza; int indeksi_baza_len; GLuint *indeksi_baza; int vrhovi_plast_len; GLfloat *vrhovi_plast; int normale_plast_len; GLfloat *normale_plast; int indeksi_plast_len; GLuint *indeksi_plast; }; void normiraj(float *v); void vprodukt(float *, float, float, float, float, float, float); struct stozac_t* stozac_inicijaliziraj(float, float, int); void stozac_crtaj(struct stozac_t*); void stozac_oslobodi(struct stozac_t*); #endif