| 1 | # PySoy's fields 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 | |
|---|
| 20 | cimport ode |
|---|
| 21 | cimport soy._internals |
|---|
| 22 | cimport soy.bodies |
|---|
| 23 | |
|---|
| 24 | cdef class Field (soy.bodies.Body) : |
|---|
| 25 | cdef void _give ( self, int ) nogil |
|---|
| 26 | cdef int _apply ( self ) nogil |
|---|
| 27 | cdef int _exert ( self, |
|---|
| 28 | soy.bodies.Body ) nogil |
|---|
| 29 | cdef void _commit ( self ) nogil |
|---|
| 30 | |
|---|
| 31 | |
|---|
| 32 | cdef class Monopole (Field) : |
|---|
| 33 | cdef soy._internals.Children _affected |
|---|
| 34 | cdef float _multiplier |
|---|
| 35 | |
|---|
| 36 | |
|---|
| 37 | cdef class Wind (Field) : |
|---|
| 38 | cdef float _density |
|---|
| 39 | cdef float _vx |
|---|
| 40 | cdef float _vy |
|---|
| 41 | cdef float _vz |
|---|
| 42 | |
|---|
| 43 | cdef class Shockwave (Field) : |
|---|
| 44 | cdef ode.dSpaceID _space |
|---|
| 45 | cdef float _radius |
|---|
| 46 | cdef double _t0 |
|---|
| 47 | cdef double _inner |
|---|
| 48 | cdef double _outer |
|---|
| 49 | cdef float _velocity |
|---|
| 50 | cdef float _length |
|---|
| 51 | cdef float _energy |
|---|
| 52 | |
|---|
| 53 | cdef class Buoyancy (Field) : |
|---|
| 54 | cdef soy._internals.Children _affected |
|---|
| 55 | cdef float _density |
|---|
| 56 | |
|---|
| 57 | cdef extern from "math.h" nogil : |
|---|
| 58 | float powf (float x, float y) |
|---|