| [1045] | 1 | # PySoy's models.Model class |
|---|
| [62] | 2 | # |
|---|
| [1345] | 3 | # Copyright (C) 2006,2007,2008,2009 PySoy Group |
|---|
| [62] | 4 | # |
|---|
| 5 | # This program is free software; you can redistribute it and/or modify |
|---|
| [1144] | 6 | # it under the terms of the GNU Affero General Public License as published |
|---|
| [1145] | 7 | # by the Free Software Foundation, either version 3 of the License, or |
|---|
| [62] | 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 |
|---|
| [1144] | 13 | # GNU Affero General Public License for more details. |
|---|
| [62] | 14 | # |
|---|
| [1144] | 15 | # You should have received a copy of the GNU Affero General Public License |
|---|
| [62] | 16 | # along with this program; if not, see http://www.gnu.org/licenses |
|---|
| 17 | # |
|---|
| [1345] | 18 | # $Id: Model.pym 1393 2008-12-31 23:51:25Z ArcRiley $ |
|---|
| [62] | 19 | |
|---|
| [1045] | 20 | cdef class Model : |
|---|
| 21 | '''soy.models.Model |
|---|
| [62] | 22 | |
|---|
| [1045] | 23 | This is the base class for all renderable objects. |
|---|
| [1025] | 24 | |
|---|
| [1045] | 25 | See dir(soy.models) for a list of other models. |
|---|
| [62] | 26 | ''' |
|---|
| [1166] | 27 | |
|---|
| 28 | ############################################################################ |
|---|
| 29 | # |
|---|
| 30 | # Python functions |
|---|
| 31 | # |
|---|
| 32 | |
|---|
| [587] | 33 | def __cinit__(self, *args, **keywords) : |
|---|
| [1039] | 34 | self._mutex = py.PyThread_allocate_lock() |
|---|
| [1019] | 35 | |
|---|
| 36 | |
|---|
| 37 | def __dealloc__(self) : |
|---|
| 38 | py.PyThread_free_lock(self._mutex) |
|---|
| [205] | 39 | |
|---|
| [203] | 40 | |
|---|
| [399] | 41 | def __repr__(self) : |
|---|
| [1045] | 42 | cdef object _name |
|---|
| 43 | _name = self.__class__.__name__ |
|---|
| 44 | return '<%s>' % _name |
|---|
| [399] | 45 | |
|---|
| 46 | |
|---|
| [1045] | 47 | ############################################################################ |
|---|
| 48 | # |
|---|
| 49 | # WindowLoop Functions |
|---|
| 50 | # |
|---|
| [211] | 51 | |
|---|
| [1212] | 52 | cdef void _render(self, soy.bodies.Body _body) : |
|---|
| [1045] | 53 | return |
|---|
| [1211] | 54 | |
|---|
| [1226] | 55 | cdef void _calcFogCoords(self, float _depth) nogil : |
|---|
| [1211] | 56 | return |
|---|
| 57 | |
|---|