root / trunk / pysoy / include / soy._datatypes.pxd

Revision 1278, 4.8 kB (checked in by ArcRiley, 5 months ago)

Ticket #955 :

  • enabled basic render cycle for new material system
  • updated models.Shape and shapes example - needs more work for texcoords
  • Canvas now takes responsibility to turn it's own texture on
  • a few additional Pyrex 0.9.8.2 fixes
  • Property svn:keywords set to Id
Line 
1# PySoy _datatypes 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$
19
20cimport al
21cimport gl
22cimport glib
23cimport ode
24cimport py
25cimport stdio
26cimport soy._internals
27
28
29##############################################################################
30
31# Forward Declarations
32
33#######################################
34
35# soy.models
36#
37cimport soy.models
38cdef class soy.models.Model
39cdef class soy.models.Mesh   (soy.models.Model)
40#
41##############################################################################
42
43
44cdef :
45  struct Face :
46    unsigned short a
47    unsigned short b
48    unsigned short c
49
50  struct Vert :
51    float px
52    float py
53    float pz
54    float nx
55    float ny
56    float nz
57    float tx
58    float ty
59    float tz
60    float ux
61    float uy
62    float uz
63
64  struct Range :
65    int offset
66    int length
67
68
69cdef class AudioDeviceTuple :
70  cdef al.ALCenum        _param
71  cdef object            _slice
72  cdef int               _get                           ( self, char*, int )
73  cdef int               _len                           ( self, char* )
74  cdef object            _addSlice                      ( self, object,
75                                                          object, object )
76
77cdef class BodyPosition :
78  cdef void*                      _body
79  cdef float                      _position[3]
80
81
82cdef class Datatype :
83  cdef void*                      _alloc                ( self, int, int*,
84                                                          void*, int )
85
86cdef class HashTable :
87  cdef glib.GHashTable*           _hashtable
88  cdef void                       _insert               ( self, char*,
89                                                          float )         nogil
90  cdef float                      _lookup               ( self, char* )   nogil
91  cdef int                        _has_key              ( self, char* )   nogil
92  cdef int                        _remove               ( self, char* )   nogil
93
94
95cdef class MaterialList (Datatype) :
96  cdef soy.models.Mesh            _mesh
97  cdef soy._internals.Children    _children
98  cdef Range                     *_ranges
99  cdef int                        _rangesAlloc
100  cdef int                        _hasBumps
101  # General C functions
102  cdef void                       _allocRanges          ( self, int )
103  # WindowLoop functions
104  cdef void                       _render               ( self, void* )
105
106
107cdef class FaceList (Datatype) :
108  cdef soy.models.Mesh            _mesh
109  cdef soy._internals.Children    _children
110  cdef Face*                      _array
111  cdef unsigned int*              _arrayList
112  cdef unsigned int               _arraySize
113  cdef int                        _arrayAlloc
114  cdef gl.GLuint                  _buffer
115  cdef int                        _bufferAlloc
116  cdef Range                      _updateRange
117  cdef void                       _allocArray           ( self, int )
118  cdef void                       _render               ( self, int, int )
119  cdef void                       _renderBumpPass       ( self, int, int )
120  cdef void                       _createBuffer         ( self )
121  cdef void                       _sendUpdated          ( self )
122  cdef void                       _flagUpdated          ( self, int, int )
123
124
125cdef class VertexList (Datatype) :
126  cdef soy.models.Mesh            _mesh
127  cdef soy._internals.Children    _children
128  cdef Vert*                      _array
129  cdef float*                     _fogArray
130  cdef int                        _fogSize
131  cdef float*                     _tslvArray
132  cdef int                        _tslvSize
133  cdef unsigned short             _arraySize
134  cdef int                        _arrayAlloc
135  cdef gl.GLuint                  _buffer
136  cdef int                        _bufferAlloc
137  cdef Range                      _updateRange
138  cdef void                       _allocArray           ( self, int )
139  cdef void                       _render               ( self )
140  cdef void                       _createBuffer         ( self )
141  cdef void                       _sendUpdated          ( self )
142  cdef void                       _flagUpdated          ( self, int )
143  cdef void                       _calculateTSLV        ( self, void* body )
Note: See TracBrowser for help on using the browser.