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.
15 * @see SG_ParentRelation for more information about this
20 * ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
22 * This program is free software; you can redistribute it and/or
23 * modify it under the terms of the GNU General Public License
24 * as published by the Free Software Foundation; either version 2
25 * of the License, or (at your option) any later version. The Blender
26 * Foundation also sells licenses for use in proprietary software under
27 * the Blender License. See http://www.blender.org/BL/ for information
30 * This program is distributed in the hope that it will be useful,
31 * but WITHOUT ANY WARRANTY; without even the implied warranty of
32 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33 * GNU General Public License for more details.
35 * You should have received a copy of the GNU General Public License
36 * along with this program; if not, write to the Free Software Foundation,
37 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
39 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
40 * All rights reserved.
42 * The Original Code is: all of this file.
44 * Contributor(s): none yet.
46 * ***** END GPL/BL DUAL LICENSE BLOCK *****
50 #include "SG_Spatial.h"
51 #include "SG_ParentRelation.h"
54 class KX_NormalParentRelation : public SG_ParentRelation
60 * Allocate and construct a new KX_NormalParentRelation
65 KX_NormalParentRelation *
70 * Method inherited from KX_ParentRelation
74 UpdateChildCoordinates(
76 const SG_Spatial * parent
80 * Method inherited from KX_ParentRelation
87 ~KX_NormalParentRelation(
92 KX_NormalParentRelation(
98 class KX_VertexParentRelation : public SG_ParentRelation
104 * Allocate and construct a new KX_VertexParentRelation
109 KX_VertexParentRelation *
114 * Method inherited from KX_ParentRelation
118 UpdateChildCoordinates(
120 const SG_Spatial * parent
124 * Method inherited from KX_ParentRelation
131 ~KX_VertexParentRelation(
136 KX_VertexParentRelation(
142 class KX_SlowParentRelation : public SG_ParentRelation
148 * Allocate and construct a new KX_VertexParentRelation
153 KX_SlowParentRelation *
159 * Method inherited from KX_ParentRelation
163 UpdateChildCoordinates(
165 const SG_Spatial * parent
169 * Method inherited from KX_ParentRelation
176 ~KX_SlowParentRelation(
181 KX_SlowParentRelation(
185 // the relaxation coefficient.
190 * Looks like a hack flag to me.
191 * We need to compute valid world coordinates the first
192 * time we update spatial data of the child. This is done
193 * by just doing a normal parent relation the first time
194 * UpdateChildCoordinates is called and then doing the
195 * slow parent relation