2
Copyright (c) 2009 NetAllied Systems GmbH
4
This file is part of dae23ds.
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
11
#ifndef __DAE23DS_SCENEGRAPHWRITER_H__
12
#define __DAE23DS_SCENEGRAPHWRITER_H__
14
#include "DAE23dsPrerequisites.h"
15
#include "DAE23dsSceneGraphBase.h"
20
class SceneGraphWriter : public SceneGraphBase
25
NodeInfo( COLLADABU::Math::Matrix4 _worldTransformation)
26
: worldTransformation(_worldTransformation){}
27
COLLADABU::Math::Matrix4 worldTransformation;
30
typedef std::stack<NodeInfo> NodeInfoStack;
34
Common::Buffer& mBuffer;
36
NodeInfoStack mNodeInfoStack;
37
Writer::UniqueIdNodeMap& mUniqueIdNodeMap;
39
/** The 3ds node id that will be used by the next frame work node.*/
44
SceneGraphWriter( Writer* writer3ds, const COLLADAFW::VisualScene* visualScene, const Writer::LibraryNodesList& libraryNodesList );
46
virtual ~SceneGraphWriter();
48
bool write( ChunkLength scenegraphLength );
53
/** Disable default copy ctor. */
54
SceneGraphWriter( const SceneGraphWriter& pre );
56
/** Disable default assignment operator. */
57
const SceneGraphWriter& operator= ( const SceneGraphWriter& pre );
59
bool writeNodes( const COLLADAFW::NodePointerArray& nodesToWriter, short parent3dsNodeId);
61
bool writeNode(const char* objectRefName, ChunkLength objectRefLength, short nodeId, short parent3dsNodeId, const COLLADABU::Math::Matrix4& matrix );
63
bool writeNode( const COLLADAFW::Node* nodeToWriter, short parent3dsNodeId);
65
void writeInstanceGeometries( const COLLADAFW::InstanceGeometryPointerArray& instanceGeometries, short parent3dsNodeId );
67
void writeInstanceNodes( const COLLADAFW::InstanceNodePointerArray& instanceNodes, short parent3dsNodeIde);
71
} // namespace DAE23ds
73
#endif // __DAE23DS_SCENEGRAPHWRITER_H__