coal
3.0.4
Coal, The Collision Detection Library. Previously known as HPP-FCL, fork of FCL -- The Flexible Collision Library
Toggle main menu visibility
Loading...
Searching...
No Matches
broadphase_callbacks.h
Go to the documentation of this file.
1
/*
2
* Software License Agreement (BSD License)
3
*
4
* Copyright (c) 2022, INRIA
5
* All rights reserved.
6
*
7
* Redistribution and use in source and binary forms, with or without
8
* modification, are permitted provided that the following conditions
9
* are met:
10
*
11
* * Redistributions of source code must retain the above copyright
12
* notice, this list of conditions and the following disclaimer.
13
* * Redistributions in binary form must reproduce the above
14
* copyright notice, this list of conditions and the following
15
* disclaimer in the documentation and/or other materials provided
16
* with the distribution.
17
* * Neither the name of the copyright holder nor the names of its
18
* contributors may be used to endorse or promote products derived
19
* from this software without specific prior written permission.
20
*
21
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32
* POSSIBILITY OF SUCH DAMAGE.
33
*/
34
36
37
#ifndef COAL_BROADPHASE_BROAD_PHASE_CALLBACKS_H
38
#define COAL_BROADPHASE_BROAD_PHASE_CALLBACKS_H
39
40
#include "
coal/fwd.hh
"
41
#include "
coal/data_types.h
"
42
43
namespace
coal
{
44
49
struct
COAL_DLLAPI
CollisionCallBackBase
{
52
virtual
void
init
() {};
53
60
virtual
bool
collide
(
CollisionObject
* o1,
CollisionObject
* o2) = 0;
61
63
virtual
bool
operator()
(
CollisionObject
* o1,
CollisionObject
* o2) {
64
return
collide
(o1, o2);
65
}
66
};
67
72
struct
COAL_DLLAPI
DistanceCallBackBase
{
75
virtual
void
init
() {};
76
84
virtual
bool
distance
(
CollisionObject
* o1,
CollisionObject
* o2,
85
CoalScalar
& dist) = 0;
86
88
virtual
bool
operator()
(
CollisionObject
* o1,
CollisionObject
* o2,
89
CoalScalar
& dist) {
90
return
distance
(o1, o2, dist);
91
}
92
};
93
94
}
// namespace coal
95
96
#endif
// COAL_BROADPHASE_BROAD_PHASE_CALLBACKS_H
coal::CollisionObject
the object for collision or distance computation, contains the geometry and the transform information
Definition
collision_object.h:214
data_types.h
fwd.hh
coal
Main namespace.
Definition
broadphase_bruteforce.h:44
coal::CoalScalar
double CoalScalar
Definition
data_types.h:76
coal::CollisionCallBackBase
Base callback class for collision queries. This class can be supersed by child classes to provide des...
Definition
broadphase_callbacks.h:49
coal::CollisionCallBackBase::operator()
virtual bool operator()(CollisionObject *o1, CollisionObject *o2)
Functor call associated to the collide operation.
Definition
broadphase_callbacks.h:63
coal::CollisionCallBackBase::collide
virtual bool collide(CollisionObject *o1, CollisionObject *o2)=0
Collision evaluation between two objects in collision. This callback will cause the broadphase evalua...
coal::CollisionCallBackBase::init
virtual void init()
Initialization of the callback before running the collision broadphase manager.
Definition
broadphase_callbacks.h:52
coal::DistanceCallBackBase
Base callback class for distance queries. This class can be supersed by child classes to provide desi...
Definition
broadphase_callbacks.h:72
coal::DistanceCallBackBase::distance
virtual bool distance(CollisionObject *o1, CollisionObject *o2, CoalScalar &dist)=0
Distance evaluation between two objects in collision. This callback will cause the broadphase evaluat...
coal::DistanceCallBackBase::init
virtual void init()
Initialization of the callback before running the collision broadphase manager.
Definition
broadphase_callbacks.h:75
coal::DistanceCallBackBase::operator()
virtual bool operator()(CollisionObject *o1, CollisionObject *o2, CoalScalar &dist)
Functor call associated to the distance operation.
Definition
broadphase_callbacks.h:88
include
coal
broadphase
broadphase_callbacks.h
Generated by
1.17.0