1 /*
2     Copyright (c) 2008-2009 NetAllied Systems GmbH
3 
4     This file is part of DAE2MA.
5 
6     Licensed under the MIT Open Source License,
7     for details please see LICENSE file or the website
8     http://www.opensource.org/licenses/mit-license.php
9 */
10 
11 #ifndef __DAE2MA_NODEIMPORTER_H__
12 #define __DAE2MA_NODEIMPORTER_H__
13 
14 #include "DAE2MAPrerequisites.h"
15 #include "DAE2MABaseImporter.h"
16 
17 
18 namespace DAE2MA
19 {
20 
21     /** This class imports a visual scene into the scene graph. */
22 	class NodeImporter : public BaseImporter
23     {
24 	private:
25 
26         /**
27         * Maps unique ids of nodes to the frame word node itself.
28         */
29         UniqueIdFWNodeMap mUniqueIdFWNodeMap;
30 
31 	public:
32 
33         /** Constructor. */
34 		NodeImporter ( DocumentImporter* documentImporter );
35 
36         /** Destructor. */
37 		virtual ~NodeImporter();
38 
39         /** Maps unique ids of nodes to the frame word node itself. */
40         bool importNodes ( const COLLADAFW::NodePointerArray& nodes );
41 
42         /** Maps unique ids of nodes to the frame word node itself. */
43         bool importNode ( const COLLADAFW::Node* node );
44 
45         /** Get the framework node to the current unique node id. */
46         const COLLADAFW::Node* findNode ( const COLLADAFW::UniqueId& nodeId ) const;
47 
48     private:
49 
50         /** Adds UniqueId frame work node pair to the UniqueIdFWNodeMap. */
addUniqueIdFWNode(const COLLADAFW::UniqueId & nodeId,const COLLADAFW::Node * node)51         void addUniqueIdFWNode (
52             const COLLADAFW::UniqueId& nodeId,
53             const COLLADAFW::Node* node )
54         {
55             mUniqueIdFWNodeMap [nodeId] = node;
56         }
57 
58 
59         /** Disable default copy ctor. */
60 		NodeImporter( const NodeImporter& pre );
61 
62         /** Disable default assignment operator. */
63 		const NodeImporter& operator= ( const NodeImporter& pre );
64 
65 	};
66 
67 } // namespace DAE2MA
68 
69 #endif // __DAE2MA_NODEIMPORTER_H__
70