source: src/models/Model.pym @ 1226:ee334223e887

Revision 1226:ee334223e887, 1.5 KB checked in by Arc Riley <arcriley@…>, 7 years ago (diff)

Pyrex 0.9.8.2 fixes :

  • fog coords are now calculated in the Mesh, marked nogil
Line 
1# PySoy's models.Model class
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: Model.pym 1272 2008-05-18 19:28:37Z ArcRiley $
19
20cdef class Model :
21  '''soy.models.Model
22
23    This is the base class for all renderable objects.
24
25    See dir(soy.models) for a list of other models.
26  '''
27
28  ############################################################################
29  #
30  # Python functions
31  #
32 
33  def __cinit__(self, *args, **keywords) :
34    self._mutex = py.PyThread_allocate_lock()
35
36
37  def __dealloc__(self) :
38    py.PyThread_free_lock(self._mutex)
39
40
41  def __repr__(self) :
42    cdef object _name
43    _name = self.__class__.__name__
44    return '<%s>' % _name
45
46
47  ############################################################################
48  #
49  # WindowLoop Functions
50  #
51
52  cdef void _render(self, soy.bodies.Body _body) :
53    return
54
55  cdef void _calcFogCoords(self, float _depth) nogil :
56    return
57
Note: See TracBrowser for help on using the repository browser.