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"
57 class KX_NormalParentRelation : public SG_ParentRelation
63 * Allocate and construct a new KX_NormalParentRelation
68 KX_NormalParentRelation *
73 * Method inherited from KX_ParentRelation
77 UpdateChildCoordinates(
79 const SG_Spatial * parent
83 * Method inherited from KX_ParentRelation
90 ~KX_NormalParentRelation(
95 KX_NormalParentRelation(
101 class KX_VertexParentRelation : public SG_ParentRelation
107 * Allocate and construct a new KX_VertexParentRelation
112 KX_VertexParentRelation *
117 * Method inherited from KX_ParentRelation
121 UpdateChildCoordinates(
123 const SG_Spatial * parent
127 * Method inherited from KX_ParentRelation
134 ~KX_VertexParentRelation(
139 KX_VertexParentRelation(
145 class KX_SlowParentRelation : public SG_ParentRelation
151 * Allocate and construct a new KX_VertexParentRelation
156 KX_SlowParentRelation *
162 * Method inherited from KX_ParentRelation
166 UpdateChildCoordinates(
168 const SG_Spatial * parent
172 * Method inherited from KX_ParentRelation
179 ~KX_SlowParentRelation(
184 KX_SlowParentRelation(
188 // the relaxation coefficient.
193 * Looks like a hack flag to me.
194 * We need to compute valid world coordinates the first
195 * time we update spatial data of the child. This is done
196 * by just doing a normal parent relation the first time
197 * UpdateChildCoordinates is called and then doing the
198 * slow parent relation