2
Copyright (c) 2008-2009 NetAllied Systems GmbH
4
This file is part of COLLADAMax.
6
Portions of the code are:
7
Copyright (c) 2005-2007 Feeling Software Inc.
8
Copyright (c) 2005-2007 Sony Computer Entertainment America
10
Based on the 3dsMax COLLADASW Tools:
11
Copyright (c) 2005-2006 Autodesk Media Entertainment
13
Licensed under the MIT Open Source License,
14
for details please see LICENSE file or the website
15
http://www.opensource.org/licenses/mit-license.php
19
#ifndef __COLLADAMAX_GEOMETRIESEXPORTER_H__
20
#define __COLLADAMAX_GEOMETRIESEXPORTER_H__
22
#include "COLLADAMaxPrerequisites.h"
24
#include "COLLADASWStreamWriter.h"
25
#include "COLLADASWLibraryGeometries.h"
27
#include "COLLADAMaxDocumentExporter.h"
32
class ExportSceneGraph;
36
/** Class to exports all nodes in an export scene graph.*/
38
class GeometriesExporter : public COLLADASW::LibraryGeometries
42
/** List of material ids.*/
43
typedef std::vector<size_t> MaterialIDList;
45
/** Maps Objects to material lists.*/
46
typedef std::map<Object*, MaterialIDList> ObjectMaterialIDListMap;
49
/** The export scene graph to export.*/
50
ExportSceneGraph * mExportSceneGraph;
52
/** The document exporter used to export the document.*/
53
DocumentExporter * mDocumentExporter;
55
/** Prefix of the symbol names.*/
56
static const String SYMBOL_NAME_PREFIX;
58
/** Maps exported geometry objects to their list of material ids.*/
59
GeometriesExporter::ObjectMaterialIDListMap mExportedObjectMaterialIDListMap;
63
@param streamWriter The stream the animation should be written to
64
@param exportSceneGraph The scene graph to export
65
@param documentExporter The document exporter this exporter belongs to
67
GeometriesExporter ( COLLADASW::StreamWriter * streamWriter, ExportSceneGraph * exportSceneGraph, DocumentExporter * documentExporter );
69
/** Exports all geometries in the export scene graph.*/
72
/** Creates an id for the geometry, derived from the node id*/
73
static String getGeometryId(const ExportNode& exportNode);
76
GeometriesExporter ( const GeometriesExporter & geometriesExporter );
77
GeometriesExporter &operator= ( const GeometriesExporter & geometriesExporter );
79
friend class GeometryExporter;
81
/** Exports all the geometries in @a node and all its child nodes.*/
82
void doExport ( ExportNode* exportNode );
84
/** Returns the map of exported geometry objects to their list of material ids.*/
85
ObjectMaterialIDListMap& getExportedObjectMaterialIDListMap(){return mExportedObjectMaterialIDListMap;}
92
#endif //__COLLADAMAX_GEOMETRIESEXPORTER_H__