ColladaExporter.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-2016 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 
18 #ifndef _GAZEBO_COLLADAEXPORTER_HH_
19 #define _GAZEBO_COLLADAEXPORTER_HH_
20 
21 #include <map>
22 #include <string>
23 #include <vector>
24 
26 #include "gazebo/util/system.hh"
27 
28 class TiXmlElement;
29 
30 namespace gazebo
31 {
32  namespace common
33  {
34  class Material;
35  class ColladaExporterPrivate;
36 
39 
42  class GZ_COMMON_VISIBLE ColladaExporter : public MeshExporter
43  {
45  public: enum GeometryType {POSITION, NORMAL, UVMAP};
46 
48  public: ColladaExporter();
49 
51  public: virtual ~ColladaExporter();
52 
58  public: virtual void Export(const Mesh *_mesh,
59  const std::string &_filename, bool _exportTextures);
60 
63  private: void ExportAsset(TiXmlElement *_assetXml);
64 
70  private: void ExportGeometrySource(
71  const gazebo::common::SubMesh *_subMesh,
72  TiXmlElement *_meshXml, GeometryType _type, const char *_meshID);
73 
77  private: void ExportGeometries(TiXmlElement *_libraryGeometriesXml);
78 
83  private: int ExportImages(TiXmlElement *_libraryImagesXml);
84 
88  private: void ExportMaterials(TiXmlElement *_libraryMaterialsXml);
89 
93  private: void ExportEffects(TiXmlElement *_libraryEffectsXml);
94 
98  private: void ExportVisualScenes(TiXmlElement *_libraryVisualScenesXml);
99 
102  private: void ExportScene(TiXmlElement *_sceneXml);
103 
106  private: ColladaExporterPrivate *dataPtr;
107  };
109  }
110 }
111 #endif
A 3D mesh.
Definition: Mesh.hh:44
Forward declarations for the common classes.
Definition: Animation.hh:33
Base class for exporting meshes.
Definition: MeshExporter.hh:34
A child mesh.
Definition: Mesh.hh:216
GeometryType
Geometry types.
Definition: ColladaExporter.hh:45
Class used to export Collada mesh files.
Definition: ColladaExporter.hh:42