Gazebo Common
API Reference
5.7.0
insert_drive_file
Tutorials
library_books
Classes
toc
Namespaces
insert_drive_file
Files
launch
Gazebo Website
Index
List
Hierarchy
Members: All
Members: Functions
Members: Variables
Members: Typedefs
Members: Enumerations
Members: Enumerator
List
Members
Functions
Typedefs
Variables
Enumerations
Enumerator
src
gz-common
graphics
include
gz
common
gz/common/ColladaExporter.hh
Go to the documentation of this file.
1
/*
2
* Copyright (C) 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
#ifndef GZ_COMMON_COLLADAEXPORTER_HH_
18
#define GZ_COMMON_COLLADAEXPORTER_HH_
19
20
#include <memory>
21
#include <string>
22
#include <vector>
23
24
#include <
gz/common/MeshExporter.hh
>
25
#include <gz/common/graphics/Export.hh>
26
27
#include <gz/math/Color.hh>
28
#include <gz/math/Matrix4.hh>
29
30
#include <gz/utils/ImplPtr.hh>
31
32
namespace
gz
33
{
34
namespace
common
35
{
38
struct
ColladaLight
39
{
41
std::string
name
;
42
44
std::string
type
;
45
47
math::Vector3d
direction
;
48
50
math::Vector3d
position
;
51
53
math::Color
diffuse
;
54
56
double
constantAttenuation
= 1.0;
57
59
double
linearAttenuation
= 0.0;
60
62
double
quadraticAttenuation
= 0.0;
63
65
double
falloffAngleDeg
= 180.0;
66
68
double
falloffExponent
= 0.0;
69
};
70
72
class
GZ_COMMON_GRAPHICS_VISIBLE
ColladaExporter
:
public
MeshExporter
73
{
75
public
:
ColladaExporter
();
76
78
public
:
virtual
~
ColladaExporter
();
79
85
public
:
virtual
void
Export(
const
Mesh
*_mesh,
86
const
std::string
&_filename,
bool
_exportTextures =
false
);
87
94
public
:
void
Export(
const
Mesh
*_mesh,
95
const
std::string
&_filename,
bool
_exportTextures,
96
const
std::vector<math::Matrix4d>
&_submeshToMatrix);
97
105
public
:
void
Export(
const
Mesh
*_mesh,
106
const
std::string
&_filename,
bool
_exportTextures,
107
const
std::vector<math::Matrix4d>
&_submeshToMatrix,
108
const
std::vector<ColladaLight>
&_lights);
109
111
GZ_UTILS_IMPL_PTR(dataPtr)
112
};
113
}
114
}
115
#endif