ColladaExporter.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-2015 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/math/MathTypes.hh"
27 #include "gazebo/util/system.hh"
28 
29 class TiXmlElement;
30 
31 namespace gazebo
32 {
33  namespace common
34  {
35  class Material;
36  class ColladaExporterPrivate;
37 
40 
44  {
46  public: enum GeometryType {POSITION, NORMAL, UVMAP};
47 
49  public: ColladaExporter();
50 
52  public: virtual ~ColladaExporter();
53 
59  public: virtual void Export(const Mesh *_mesh,
60  const std::string &_filename, bool _exportTextures);
61 
64  private: void ExportAsset(TiXmlElement *_assetXml);
65 
71  private: void ExportGeometrySource(
72  const gazebo::common::SubMesh *_subMesh,
73  TiXmlElement *_meshXml, GeometryType _type, const char *_meshID);
74 
78  private: void ExportGeometries(TiXmlElement *_libraryGeometriesXml);
79 
84  private: int ExportImages(TiXmlElement *_libraryImagesXml);
85 
89  private: void ExportMaterials(TiXmlElement *_libraryMaterialsXml);
90 
94  private: void ExportEffects(TiXmlElement *_libraryEffectsXml);
95 
99  private: void ExportVisualScenes(TiXmlElement *_libraryVisualScenesXml);
100 
103  private: void ExportScene(TiXmlElement *_sceneXml);
104 
107  private: ColladaExporterPrivate *dataPtr;
108  };
110  }
111 }
112 #endif
A 3D mesh.
Definition: Mesh.hh:40
Base class for exporting meshes.
Definition: MeshExporter.hh:34
A child mesh.
Definition: Mesh.hh:209
Private data for the ColladaExporter class.
Definition: ColladaExporterPrivate.hh:34
Forward declarations for the math classes.
Class used to export Collada mesh files.
Definition: ColladaExporter.hh:43
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:48
GeometryType
Geometry types.
Definition: ColladaExporter.hh:46