include
fcl
geometry
collision_geometry.h
Go to the documentation of this file.
1
/*
2
* Software License Agreement (BSD License)
3
*
4
* Copyright (c) 2011-2014, Willow Garage, Inc.
5
* Copyright (c) 2014-2016, Open Source Robotics Foundation
6
* All rights reserved.
7
*
8
* Redistribution and use in source and binary forms, with or without
9
* modification, are permitted provided that the following conditions
10
* are met:
11
*
12
* * Redistributions of source code must retain the above copyright
13
* notice, this list of conditions and the following disclaimer.
14
* * Redistributions in binary form must reproduce the above
15
* copyright notice, this list of conditions and the following
16
* disclaimer in the documentation and/or other materials provided
17
* with the distribution.
18
* * Neither the name of Open Source Robotics Foundation nor the names of its
19
* contributors may be used to endorse or promote products derived
20
* from this software without specific prior written permission.
21
*
22
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
32
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33
* POSSIBILITY OF SUCH DAMAGE.
34
*/
35
38
#ifndef FCL_COLLISION_GEOMETRY_H
39
#define FCL_COLLISION_GEOMETRY_H
40
41
#include <memory>
42
43
#include "
fcl/math/bv/AABB.h
"
44
#include "
fcl/math/motion/motion_base.h
"
45
46
namespace
fcl
47
{
48
50
enum
OBJECT_TYPE
{
OT_UNKNOWN
,
OT_BVH
,
OT_GEOM
,
OT_OCTREE
,
OT_COUNT
};
51
53
enum
NODE_TYPE
{
BV_UNKNOWN
,
BV_AABB
,
BV_OBB
,
BV_RSS
,
BV_kIOS
,
BV_OBBRSS
,
BV_KDOP16
,
BV_KDOP18
,
BV_KDOP24
,
54
GEOM_BOX
,
GEOM_SPHERE
,
GEOM_ELLIPSOID
,
GEOM_CAPSULE
,
GEOM_CONE
,
GEOM_CYLINDER
,
GEOM_CONVEX
,
GEOM_PLANE
,
GEOM_HALFSPACE
,
GEOM_TRIANGLE
,
GEOM_OCTREE
,
NODE_COUNT
};
55
57
template
<
typename
S>
58
class
FCL_EXPORT
CollisionGeometry
59
{
60
public
:
61
CollisionGeometry
();
62
63
virtual
~
CollisionGeometry
();
64
66
virtual
OBJECT_TYPE
getObjectType()
const
;
67
69
virtual
NODE_TYPE
getNodeType()
const
;
70
72
virtual
void
computeLocalAABB() = 0;
73
75
void
* getUserData()
const
;
76
78
void
setUserData(
void
*data);
79
81
bool
isOccupied()
const
;
82
84
bool
isFree()
const
;
85
87
bool
isUncertain()
const
;
88
90
Vector3<S>
aabb_center
;
91
93
S
aabb_radius
;
94
96
AABB<S>
aabb_local
;
97
99
void
*
user_data
;
100
102
S
cost_density
;
103
105
S
threshold_occupied
;
106
108
S
threshold_free
;
109
111
virtual
Vector3<S>
computeCOM()
const
;
112
114
virtual
Matrix3<S>
computeMomentofInertia()
const
;
115
117
virtual
S computeVolume()
const
;
118
120
virtual
Matrix3<S>
computeMomentofInertiaRelatedToCOM()
const
;
121
122
};
123
124
using
CollisionGeometryf
=
CollisionGeometry<float>
;
125
using
CollisionGeometryd
=
CollisionGeometry<double>
;
126
127
}
// namespace fcl
128
129
#include "
fcl/geometry/collision_geometry-inl.h
"
130
131
#endif
fcl::GEOM_OCTREE
@ GEOM_OCTREE
Definition:
collision_geometry.h:54
fcl::GEOM_HALFSPACE
@ GEOM_HALFSPACE
Definition:
collision_geometry.h:54
fcl::CollisionGeometry::threshold_free
S threshold_free
threshold for free (<= is free)
Definition:
collision_geometry.h:108
motion_base.h
fcl::GEOM_CONE
@ GEOM_CONE
Definition:
collision_geometry.h:54
fcl::CollisionGeometry::cost_density
S cost_density
collision cost for unit volume
Definition:
collision_geometry.h:102
fcl::CollisionGeometry::aabb_radius
S aabb_radius
AABB radius.
Definition:
collision_geometry.h:93
fcl::GEOM_PLANE
@ GEOM_PLANE
Definition:
collision_geometry.h:54
fcl::BV_KDOP18
@ BV_KDOP18
Definition:
collision_geometry.h:53
fcl::OT_UNKNOWN
@ OT_UNKNOWN
Definition:
collision_geometry.h:50
fcl::GEOM_ELLIPSOID
@ GEOM_ELLIPSOID
Definition:
collision_geometry.h:54
fcl::AABB< S >
fcl::CollisionGeometry::user_data
void * user_data
pointer to user defined data specific to this object
Definition:
collision_geometry.h:99
fcl::CollisionGeometry::aabb_center
Vector3< S > aabb_center
AABB center in local coordinate.
Definition:
collision_geometry.h:90
collision_geometry-inl.h
fcl::Vector3
Eigen::Matrix< S, 3, 1 > Vector3
Definition:
types.h:70
fcl::Matrix3
Eigen::Matrix< S, 3, 3 > Matrix3
Definition:
types.h:85
fcl::CollisionGeometry
The geometry for the object for collision or distance computation.
Definition:
collision_geometry.h:58
fcl::GEOM_TRIANGLE
@ GEOM_TRIANGLE
Definition:
collision_geometry.h:54
fcl::BV_KDOP24
@ BV_KDOP24
Definition:
collision_geometry.h:53
fcl::BV_UNKNOWN
@ BV_UNKNOWN
Definition:
collision_geometry.h:53
fcl::BV_OBB
@ BV_OBB
Definition:
collision_geometry.h:53
fcl::NODE_COUNT
@ NODE_COUNT
Definition:
collision_geometry.h:54
fcl::BV_KDOP16
@ BV_KDOP16
Definition:
collision_geometry.h:53
fcl::GEOM_SPHERE
@ GEOM_SPHERE
Definition:
collision_geometry.h:54
fcl::GEOM_CYLINDER
@ GEOM_CYLINDER
Definition:
collision_geometry.h:54
fcl::GEOM_CONVEX
@ GEOM_CONVEX
Definition:
collision_geometry.h:54
fcl::OBJECT_TYPE
OBJECT_TYPE
object type: BVH (mesh, points), basic geometry, octree
Definition:
collision_geometry.h:50
fcl::BV_kIOS
@ BV_kIOS
Definition:
collision_geometry.h:53
fcl::OT_OCTREE
@ OT_OCTREE
Definition:
collision_geometry.h:50
fcl::GEOM_BOX
@ GEOM_BOX
Definition:
collision_geometry.h:54
fcl::BV_RSS
@ BV_RSS
Definition:
collision_geometry.h:53
fcl::OT_BVH
@ OT_BVH
Definition:
collision_geometry.h:50
fcl::CollisionGeometry::aabb_local
AABB< S > aabb_local
AABB in local coordinate, used for tight AABB when only translation transform.
Definition:
collision_geometry.h:96
AABB.h
fcl::CollisionGeometry::threshold_occupied
S threshold_occupied
threshold for occupied ( >= is occupied)
Definition:
collision_geometry.h:105
fcl::BV_OBBRSS
@ BV_OBBRSS
Definition:
collision_geometry.h:53
fcl::NODE_TYPE
NODE_TYPE
traversal node type: bounding volume (AABB, OBB, RSS, kIOS, OBBRSS, KDOP16, KDOP18,...
Definition:
collision_geometry.h:53
fcl::BV_AABB
@ BV_AABB
Definition:
collision_geometry.h:53
fcl
Main namespace.
Definition:
broadphase_bruteforce-inl.h:45
fcl::GEOM_CAPSULE
@ GEOM_CAPSULE
Definition:
collision_geometry.h:54
fcl::OT_GEOM
@ OT_GEOM
Definition:
collision_geometry.h:50
fcl::OT_COUNT
@ OT_COUNT
Definition:
collision_geometry.h:50
fcl
Author(s):
autogenerated on Tue Dec 5 2023 03:40:48