# PySoy _datatypes 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$ cimport al cimport gl cimport glib cimport ode cimport py cimport stdio cimport soy._internals ############################################################################## # # Forward Declarations # ####################################### # # soy.models # cimport soy.models cdef class soy.models.Model cdef class soy.models.Mesh (soy.models.Model) # ############################################################################## cdef : struct Face : unsigned short a unsigned short b unsigned short c struct Vert : float px float py float pz float nx float ny float nz float tx float ty float tz float ux float uy float uz struct Range : int offset int length cdef class AudioDeviceTuple : cdef al.ALCenum _param cdef object _slice cdef int _get ( self, char*, int ) cdef int _len ( self, char* ) cdef object _addSlice ( self, object, object, object ) cdef class BodyPosition : cdef void* _body cdef float _position[3] cdef class Datatype : cdef void* _alloc ( self, int, int*, void*, int ) cdef class HashTable : cdef glib.GHashTable* _hashtable cdef void _insert ( self, char*, float ) nogil cdef float _lookup ( self, char* ) nogil cdef int _has_key ( self, char* ) nogil cdef int _remove ( self, char* ) nogil cdef class MaterialList (Datatype) : cdef soy.models.Mesh _mesh cdef soy._internals.Children _children cdef Range *_ranges cdef int _rangesAlloc cdef int _hasBumps # General C functions cdef void _allocRanges ( self, int ) # WindowLoop functions cdef void _render ( self, void* ) cdef class FaceList (Datatype) : cdef soy.models.Mesh _mesh cdef soy._internals.Children _children cdef Face* _array cdef unsigned int* _arrayList cdef unsigned int _arraySize cdef int _arrayAlloc cdef gl.GLuint _buffer cdef int _bufferAlloc cdef Range _updateRange cdef void _allocArray ( self, int ) cdef void _render ( self, int, int ) cdef void _renderBumpPass ( self, int, int ) cdef void _createBuffer ( self ) cdef void _sendUpdated ( self ) cdef void _flagUpdated ( self, int, int ) cdef class VertexList (Datatype) : cdef soy.models.Mesh _mesh cdef soy._internals.Children _children cdef Vert* _array cdef float* _fogArray cdef int _fogSize cdef float* _tslvArray cdef int _tslvSize cdef unsigned short _arraySize cdef int _arrayAlloc cdef gl.GLuint _buffer cdef int _bufferAlloc cdef Range _updateRange cdef void _allocArray ( self, int ) cdef void _render ( self ) cdef void _createBuffer ( self ) cdef void _sendUpdated ( self ) cdef void _flagUpdated ( self, int ) cdef void _calculateTSLV ( self, void* body )