2 * @mainpage KX_SG_NodeRelationships
6 * This file provides common concrete implementations of
7 * SG_ParentRelation used by the game engine. These are
8 * KX_SlowParentRelation a slow parent relationship.
9 * KX_NormalParentRelation a normal parent relationship where
10 * orientation and position are inherited from the parent by
12 * KX_VertexParentRelation only location information is
13 * inherited by the child.
19 * ***** BEGIN GPL LICENSE BLOCK *****
21 * This program is free software; you can redistribute it and/or
22 * modify it under the terms of the GNU General Public License
23 * as published by the Free Software Foundation; either version 2
24 * of the License, or (at your option) any later version.
26 * This program is distributed in the hope that it will be useful,
27 * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29 * GNU General Public License for more details.
31 * You should have received a copy of the GNU General Public License
32 * along with this program; if not, write to the Free Software Foundation,
33 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
35 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
36 * All rights reserved.
38 * The Original Code is: all of this file.
40 * Contributor(s): none yet.
42 * ***** END GPL LICENSE BLOCK *****
46 #ifndef __KX_SG_NODERELATIONS_H__
47 #define __KX_SG_NODERELATIONS_H__
49 #include "SG_Spatial.h"
50 #include "SG_ParentRelation.h"
52 class KX_NormalParentRelation : public SG_ParentRelation
58 * Allocate and construct a new KX_NormalParentRelation
63 KX_NormalParentRelation *
68 * Method inherited from KX_ParentRelation
72 UpdateChildCoordinates(
74 const SG_Spatial * parent
78 * Method inherited from KX_ParentRelation
85 ~KX_NormalParentRelation(
90 KX_NormalParentRelation(
96 class KX_VertexParentRelation : public SG_ParentRelation
102 * Allocate and construct a new KX_VertexParentRelation
107 KX_VertexParentRelation *
112 * Method inherited from KX_ParentRelation
116 UpdateChildCoordinates(
118 const SG_Spatial * parent
122 * Method inherited from KX_ParentRelation
129 ~KX_VertexParentRelation(
140 KX_VertexParentRelation(
146 class KX_SlowParentRelation : public SG_ParentRelation
152 * Allocate and construct a new KX_VertexParentRelation
157 KX_SlowParentRelation *
163 * Method inherited from KX_ParentRelation
167 UpdateChildCoordinates(
169 const SG_Spatial * parent
173 * Method inherited from KX_ParentRelation
182 ) { return m_relax; }
187 ) { m_relax = relaxation; }
189 ~KX_SlowParentRelation(
200 KX_SlowParentRelation(
204 // the relaxation coefficient.
209 * Looks like a hack flag to me.
210 * We need to compute valid world coordinates the first
211 * time we update spatial data of the child. This is done
212 * by just doing a normal parent relation the first time
213 * UpdateChildCoordinates is called and then doing the
214 * slow parent relation