| 1 | # PySoy model declarations |
|---|
| 2 | # |
|---|
| 3 | # Copyright (C) 2006,2007,2008 PySoy Group |
|---|
| 4 | # |
|---|
| 5 | # This program is free software; you can redistribute it and/or modify |
|---|
| 6 | # it under the terms of the GNU Affero General Public License as published |
|---|
| 7 | # by the Free Software Foundation, either version 3 of the License, or |
|---|
| 8 | # (at your option) any later version. |
|---|
| 9 | # |
|---|
| 10 | # This program is distributed in the hope that it will be useful, |
|---|
| 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 13 | # GNU Affero General Public License for more details. |
|---|
| 14 | # |
|---|
| 15 | # You should have received a copy of the GNU Affero General Public License |
|---|
| 16 | # along with this program; if not, see http://www.gnu.org/licenses |
|---|
| 17 | # |
|---|
| 18 | # $Id: soy.models.pxd 1090 2008-03-07 17:07:46Z ArcRiley $ |
|---|
| 19 | |
|---|
| 20 | cimport gl |
|---|
| 21 | cimport py |
|---|
| 22 | cimport stdio |
|---|
| 23 | cimport soy._datatypes |
|---|
| 24 | cimport soy._internals |
|---|
| 25 | cimport soy.materials |
|---|
| 26 | cimport soy.textures |
|---|
| 27 | cimport soy.shapes |
|---|
| 28 | |
|---|
| 29 | ############################################################################## |
|---|
| 30 | # |
|---|
| 31 | # Forward Declarations |
|---|
| 32 | # |
|---|
| 33 | ####################################### |
|---|
| 34 | # |
|---|
| 35 | # soy._datatypes |
|---|
| 36 | # |
|---|
| 37 | cimport soy._datatypes |
|---|
| 38 | cdef class soy._datatypes.Datatype |
|---|
| 39 | cdef class soy._datatypes.MaterialList (soy._datatypes.Datatype) |
|---|
| 40 | cdef class soy._datatypes.FaceList (soy._datatypes.Datatype) |
|---|
| 41 | cdef class soy._datatypes.VertexList (soy._datatypes.Datatype) |
|---|
| 42 | # |
|---|
| 43 | ####################################### |
|---|
| 44 | # |
|---|
| 45 | # soy.bodies |
|---|
| 46 | # |
|---|
| 47 | cimport soy.bodies |
|---|
| 48 | cdef class soy.bodies.Body |
|---|
| 49 | # |
|---|
| 50 | ############################################################################## |
|---|
| 51 | # |
|---|
| 52 | # Structs |
|---|
| 53 | # |
|---|
| 54 | |
|---|
| 55 | cdef : |
|---|
| 56 | struct Line : |
|---|
| 57 | unsigned char a |
|---|
| 58 | unsigned char b |
|---|
| 59 | |
|---|
| 60 | struct Face : |
|---|
| 61 | unsigned short a |
|---|
| 62 | unsigned short b |
|---|
| 63 | unsigned short c |
|---|
| 64 | |
|---|
| 65 | struct VertPC : |
|---|
| 66 | float px |
|---|
| 67 | float py |
|---|
| 68 | float pz |
|---|
| 69 | float cr |
|---|
| 70 | float cg |
|---|
| 71 | float cb |
|---|
| 72 | |
|---|
| 73 | |
|---|
| 74 | cdef class Model : |
|---|
| 75 | cdef void* _mutex |
|---|
| 76 | # |
|---|
| 77 | # WindowLoop functions |
|---|
| 78 | cdef void _render ( self, soy.bodies.Body ) |
|---|
| 79 | cdef void _calcFogCoords ( self, float ) nogil |
|---|
| 80 | |
|---|
| 81 | |
|---|
| 82 | cdef class Mesh (Model) : |
|---|
| 83 | cdef soy._datatypes.MaterialList _mates |
|---|
| 84 | cdef soy._datatypes.FaceList _faces |
|---|
| 85 | cdef soy._datatypes.VertexList _verts |
|---|
| 86 | |
|---|
| 87 | |
|---|
| 88 | cdef class Shape (Model) : |
|---|
| 89 | cdef soy.materials.Material _material |
|---|
| 90 | # |
|---|
| 91 | # WindowLoop functions |
|---|
| 92 | cdef void _renderSphere ( self, soy.shapes.Shape ) |
|---|
| 93 | cdef void _renderCapsule ( self, soy.shapes.Shape ) |
|---|
| 94 | cdef void _renderBox ( self, soy.shapes.Shape ) |
|---|
| 95 | cdef void _renderRay ( self, soy.shapes.Shape ) |
|---|
| 96 | |
|---|
| 97 | |
|---|
| 98 | cdef class Billboard (Model) : |
|---|
| 99 | cdef soy.materials.Material _material |
|---|
| 100 | cdef float _size[2] |
|---|
| 101 | |
|---|
| 102 | |
|---|
| 103 | cdef class Sun (Model) : |
|---|
| 104 | cdef soy.materials.Material _center_mat |
|---|
| 105 | cdef soy.materials.Material _aura_mat |
|---|
| 106 | cdef soy.materials.Material _spike_mat |
|---|
| 107 | cdef int _num_spikes |
|---|
| 108 | cdef int _circle_verts |
|---|
| 109 | cdef float _center_size[2] |
|---|
| 110 | cdef float _aura_size[2] |
|---|
| 111 | cdef float _spike_size |
|---|
| 112 | |
|---|
| 113 | |
|---|
| 114 | cdef class Liquid (Model) : |
|---|
| 115 | cdef float _size[3] |
|---|
| 116 | cdef soy.materials.Material _material |
|---|
| 117 | cdef soy.colors.Color _color |
|---|
| 118 | # |
|---|
| 119 | # WindowLoop functions |
|---|
| 120 | cdef void _renderSurf ( self ) |
|---|
| 121 | cdef void _renderBottom ( self ) |
|---|
| 122 | |
|---|
| 123 | cdef class Axis (Model) : |
|---|
| 124 | cdef gl.GLuint _vertBuffer |
|---|
| 125 | cdef gl.GLuint _elmtBuffer |
|---|
| 126 | |
|---|
| 127 | |
|---|