2 * @mainpage SG_ParentRelation
6 * This is an abstract interface class to the Scene Graph library.
7 * It allows you to specify how child nodes react to parent nodes.
8 * Normally a child will use it's parent's transforms to compute
9 * it's own global transforms. How this is performed depends on
10 * the type of relation. For example if the parent is a vertex
11 * parent to this child then the child should not inherit any
12 * rotation information from the parent. Or if the parent is a
13 * 'slow parent' to this child then the child should react
14 * slowly to changes in the parent's position. The exact relation
15 * is left for you to implement by filling out this interface
16 * with concrete examples.
18 * There is exactly one SG_ParentRelation per SG_Node. Subclasses
19 * should not be value types and should be allocated on the heap.
23 * ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
25 * This program is free software; you can redistribute it and/or
26 * modify it under the terms of the GNU General Public License
27 * as published by the Free Software Foundation; either version 2
28 * of the License, or (at your option) any later version. The Blender
29 * Foundation also sells licenses for use in proprietary software under
30 * the Blender License. See http://www.blender.org/BL/ for information
33 * This program is distributed in the hope that it will be useful,
34 * but WITHOUT ANY WARRANTY; without even the implied warranty of
35 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
36 * GNU General Public License for more details.
38 * You should have received a copy of the GNU General Public License
39 * along with this program; if not, write to the Free Software Foundation,
40 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
42 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
43 * All rights reserved.
45 * The Original Code is: all of this file.
47 * Contributor(s): none yet.
49 * ***** END GPL/BL DUAL LICENSE BLOCK *****
53 #ifndef __SG_ParentRelation_h
54 #define __SG_ParentRelation_h
62 class SG_ParentRelation {
67 * Update the childs local and global coordinates
68 * based upon the parents global coordinates.
69 * You must also handle the case when this node has no
70 * parent (parent == NULL). Usually you should just
71 * copy the local coordinates of the child to the
77 UpdateChildCoordinates(
79 const SG_Spatial * parent
88 * You must provide a way of duplicating an
89 * instance of an SG_ParentRelation. This should
90 * return a pointer to a new duplicate allocated
91 * on the heap. Responsibilty for deleting the
92 * duplicate resides with the caller of this method.
103 * Protected constructors
104 * this class is not meant to be instantiated.
112 * Copy construction should not be implemented
116 const SG_ParentRelation &