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 #ifndef __KX_SG_NODERELATIONS_H__
51 #define __KX_SG_NODERELATIONS_H__
53 #include "SG_Spatial.h"
54 #include "SG_ParentRelation.h"
56 class KX_NormalParentRelation : public SG_ParentRelation
62 * Allocate and construct a new KX_NormalParentRelation
67 KX_NormalParentRelation *
72 * Method inherited from KX_ParentRelation
76 UpdateChildCoordinates(
78 const SG_Spatial * parent
82 * Method inherited from KX_ParentRelation
89 ~KX_NormalParentRelation(
94 KX_NormalParentRelation(
100 class KX_VertexParentRelation : public SG_ParentRelation
106 * Allocate and construct a new KX_VertexParentRelation
111 KX_VertexParentRelation *
116 * Method inherited from KX_ParentRelation
120 UpdateChildCoordinates(
122 const SG_Spatial * parent
126 * Method inherited from KX_ParentRelation
133 ~KX_VertexParentRelation(
138 KX_VertexParentRelation(
144 class KX_SlowParentRelation : public SG_ParentRelation
150 * Allocate and construct a new KX_VertexParentRelation
155 KX_SlowParentRelation *
161 * Method inherited from KX_ParentRelation
165 UpdateChildCoordinates(
167 const SG_Spatial * parent
171 * Method inherited from KX_ParentRelation
178 ~KX_SlowParentRelation(
183 KX_SlowParentRelation(
187 // the relaxation coefficient.
192 * Looks like a hack flag to me.
193 * We need to compute valid world coordinates the first
194 * time we update spatial data of the child. This is done
195 * by just doing a normal parent relation the first time
196 * UpdateChildCoordinates is called and then doing the
197 * slow parent relation