2 * Implementationclass to derive controllers from
6 * ***** BEGIN GPL LICENSE BLOCK *****
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software Foundation,
20 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
23 * All rights reserved.
25 * The Original Code is: all of this file.
27 * Contributor(s): none yet.
29 * ***** END GPL LICENSE BLOCK *****
32 /** \file SG_Controller.h
36 #ifndef __SG_CONTROLLER_H
37 #define __SG_CONTROLLER_H
39 #include "SG_IObject.h"
42 * A scenegraph controller
48 #ifdef WITH_CXX_GUARDEDALLOC
49 void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "SG_Controller"); }
50 void operator delete( void *mem ) { MEM_freeN(mem); }
87 class SG_Node* destnode
91 * Hacky way of passing options to specific controllers
92 * @param option An integer identifying the option.
93 * @param value The value of this option.
94 * @attention This has been placed here to give sca-elements
95 * @attention some control over the controllers. This is
96 * @attention necessary because the identity of the controller
97 * @attention is lost on the way here.
107 * Option-identifiers: SG_CONTR_<controller-type>_<option>.
108 * Options only apply to a specific controller type. The
109 * semantics are defined by whoever uses the setting.
111 enum SG_Controller_option {
113 SG_CONTR_IPO_IPO_AS_FORCE,
114 SG_CONTR_IPO_IPO_ADD,
117 SG_CONTR_CAMIPO_LENS,
118 SG_CONTR_CAMIPO_CLIPEND,
119 SG_CONTR_CAMIPO_CLIPSTART,
124 SG_IObject* m_pObject;
128 #endif //__SG_CONTROLLER_H