# PySoy model declarations # # Copyright (C) 2006,2007,2008 PySoy Group # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the License, or # (at your option) 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 Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program; if not, see http://www.gnu.org/licenses # # $Id: soy.models.pxd 1090 2008-03-07 17:07:46Z ArcRiley $ cimport gl cimport py cimport stdio cimport soy._datatypes cimport soy._internals cimport soy.materials cimport soy.textures cimport soy.shapes ############################################################################## # # Forward Declarations # ####################################### # # soy._datatypes # cimport soy._datatypes cdef class soy._datatypes.Datatype cdef class soy._datatypes.MaterialList (soy._datatypes.Datatype) cdef class soy._datatypes.FaceList (soy._datatypes.Datatype) cdef class soy._datatypes.VertexList (soy._datatypes.Datatype) # ####################################### # # soy.bodies # cimport soy.bodies cdef class soy.bodies.Body # ############################################################################## # # Structs # cdef : struct Line : unsigned char a unsigned char b struct Face : unsigned short a unsigned short b unsigned short c struct VertPC : float px float py float pz float cr float cg float cb cdef class Model : cdef void* _mutex # # WindowLoop functions cdef void _render ( self, soy.bodies.Body ) cdef void _calcFogCoords ( self, float ) nogil cdef class Mesh (Model) : cdef soy._datatypes.MaterialList _mates cdef soy._datatypes.FaceList _faces cdef soy._datatypes.VertexList _verts cdef class Shape (Model) : cdef soy.materials.Material _material # # WindowLoop functions cdef void _renderSphere ( self, soy.shapes.Shape ) cdef void _renderCapsule ( self, soy.shapes.Shape ) cdef void _renderBox ( self, soy.shapes.Shape ) cdef void _renderRay ( self, soy.shapes.Shape ) cdef class Billboard (Model) : cdef soy.materials.Material _material cdef float _size[2] cdef class Sun (Model) : cdef soy.materials.Material _center_mat cdef soy.materials.Material _aura_mat cdef soy.materials.Material _spike_mat cdef int _num_spikes cdef int _circle_verts cdef float _center_size[2] cdef float _aura_size[2] cdef float _spike_size cdef class Liquid (Model) : cdef float _size[3] cdef soy.materials.Material _material cdef soy.colors.Color _color # # WindowLoop functions cdef void _renderSurf ( self ) cdef void _renderBottom ( self ) cdef class Axis (Model) : cdef gl.GLuint _vertBuffer cdef gl.GLuint _elmtBuffer