2
* $Id: KX_StateActuator.h 15444 2008-07-05 17:05:05Z lukep $
4
* ***** BEGIN GPL LICENSE BLOCK *****
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software Foundation,
18
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
21
* All rights reserved.
23
* The Original Code is: all of this file.
25
* Contributor(s): none yet.
27
* ***** END GPL LICENSE BLOCK *****
28
* Actuator to toggle visibility/invisibility of objects
31
#ifndef __KX_STATEACTUATOR
32
#define __KX_STATEACTUATOR
34
#include "SCA_IActuator.h"
36
class KX_StateActuator : public SCA_IActuator
72
/* --------------------------------------------------------------------- */
73
/* Python interface ---------------------------------------------------- */
74
/* --------------------------------------------------------------------- */
76
virtual PyObject* _getattr(const STR_String& attr);
78
KX_PYMETHOD_DOC(KX_StateActuator,SetOperation);
79
KX_PYMETHOD_DOC(KX_StateActuator,SetMask);
2
* $Id: KX_StateActuator.h 20245 2009-05-17 21:50:31Z ben2610 $
4
* ***** BEGIN GPL LICENSE BLOCK *****
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software Foundation,
18
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
21
* All rights reserved.
23
* The Original Code is: all of this file.
25
* Contributor(s): none yet.
27
* ***** END GPL LICENSE BLOCK *****
28
* Actuator to toggle visibility/invisibility of objects
31
#ifndef __KX_STATEACTUATOR
32
#define __KX_STATEACTUATOR
34
#include "SCA_IActuator.h"
38
* Use of SG_DList : element of actuator being deactivated
39
* Head: SCA_LogicManager::m_removedActuators
40
* Use of SG_QList : element of global activated state actuator list
41
* Head: KX_StateActuator::m_stateActuatorHead
43
class KX_StateActuator : public SCA_IActuator
56
// SG_Dlist: element of objects with active actuators, always put in front of the list
57
// Head: SCA_LogicManager::m_activeActuators
58
// SG_QList: Head of active state actuators list globally
59
// Elements: KX_StateActuator
60
static SG_QList m_stateActuatorHead;
86
virtual void Deactivate();
87
virtual void Activate(SG_DList& head);
89
/* --------------------------------------------------------------------- */
90
/* Python interface ---------------------------------------------------- */
91
/* --------------------------------------------------------------------- */
93
virtual PyObject* py_getattro(PyObject *attr);
94
virtual PyObject* py_getattro_dict();
95
virtual int py_setattro(PyObject *attr, PyObject* value);
97
KX_PYMETHOD_DOC_VARARGS(KX_StateActuator,SetOperation);
98
KX_PYMETHOD_DOC_VARARGS(KX_StateActuator,SetMask);