##

MeshCSG.hh
Go to the documentation of this file.
/*
* Copyright (C) 2012 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef _GAZEBO_MESHCSG_HH_
#define _GAZEBO_MESHCSG_HH_
#include <ignition/math/Pose3.hh>
#include "gazebo/util/system.hh"
struct _GtsSurface;
typedef _GtsSurface GtsSurface;
struct _GPtrArray;
typedef _GPtrArray GPtrArray;
namespace gazebo
{
namespace common
{
class Mesh;
class GZ_COMMON_VISIBLE MeshCSG
{
public: enum BooleanOperation {UNION, INTERSECTION, DIFFERENCE};
public: MeshCSG();
public: virtual ~MeshCSG();
public: Mesh *CreateBoolean(const Mesh *_m1, const Mesh *_m2,
const int _operation,
const ignition::math::Pose3d &_offset = ignition::math::Pose3d::Zero);
private: void ConvertMeshToGTS(const Mesh *mesh, GtsSurface *surface);
// are within epsilon
private: void MergeVertices(GPtrArray * _vertices, double _epsilon);
};
}
}
#endif
gazebo::common::MeshCSG::MeshCSG
MeshCSG()
Constructor.
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
GtsSurface
_GtsSurface GtsSurface
Definition: MeshCSG.hh:24
common
common
Definition: FuelModelDatabase.hh:37
gazebo::common::MeshCSG::~MeshCSG
virtual ~MeshCSG()
Destructor.
system.hh
gazebo::common::MeshCSG::UNION
Definition: MeshCSG.hh:43
gazebo::common::MeshCSG::INTERSECTION
Definition: MeshCSG.hh:43
gazebo::common::MeshCSG
Creates CSG meshes.
Definition: MeshCSG.hh:40
gazebo::common::MeshCSG::BooleanOperation
BooleanOperation
An enumeration of the boolean operations.
Definition: MeshCSG.hh:43
gazebo::common::MeshCSG::DIFFERENCE
Definition: MeshCSG.hh:43
GPtrArray
_GPtrArray GPtrArray
Definition: MeshCSG.hh:26
gazebo::common::Mesh
A 3D mesh.
Definition: Mesh.hh:42
gazebo::common::MeshCSG::CreateBoolean
Mesh * CreateBoolean(const Mesh *_m1, const Mesh *_m2, const int _operation, const ignition::math::Pose3d &_offset=ignition::math::Pose3d::Zero)
Create a boolean mesh from two meshes.
GtsSurface
_GtsSurface GtsSurface
Definition: GTSMeshUtils.hh:27