include
fcl
math
motion
taylor_model
interval.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
36
// This code is based on code developed by Stephane Redon at UNC and Inria for the CATCH library: http://graphics.ewha.ac.kr/CATCH/
39
#ifndef FCL_CCD_INTERVAL_H
40
#define FCL_CCD_INTERVAL_H
41
42
#include <iostream>
43
#include "
fcl/common/types.h
"
44
45
namespace
fcl
46
{
47
49
template
<
typename
S>
50
struct
FCL_EXPORT
Interval
51
{
52
S i_[2];
53
54
Interval
();
55
56
explicit
Interval
(S v);
57
59
Interval
(S left, S right);
60
62
void
setValue(S a, S b);
63
65
void
setValue(S x);
66
68
S operator [] (
size_t
i)
const
;
69
71
S& operator [] (
size_t
i);
72
74
bool
operator == (
const
Interval
& other)
const
;
75
77
Interval
operator +
(
const
Interval
& other)
const
;
78
80
Interval
operator -
(
const
Interval
& other)
const
;
81
82
Interval
& operator += (
const
Interval
& other);
83
84
Interval
& operator -= (
const
Interval
& other);
85
86
Interval
operator *
(
const
Interval
& other)
const
;
87
88
Interval
& operator *= (
const
Interval
& other);
89
90
Interval
operator *
(S d)
const
;
91
92
Interval
& operator *= (S d);
93
95
Interval
operator / (
const
Interval
& other)
const
;
96
97
Interval
& operator /= (
const
Interval
& other);
98
100
bool
overlap
(
const
Interval
& other)
const
;
101
102
bool
intersect(
const
Interval
& other);
103
104
Interval
operator -
()
const
;
105
107
S getAbsLower()
const
;
108
110
S getAbsUpper()
const
;
111
112
bool
contains(S v)
const
;
113
115
Interval
&
bound
(S v);
116
118
Interval
&
bound
(
const
Interval
& other);
119
120
void
print()
const
;
121
122
S center()
const
;
123
124
S diameter()
const
;
125
};
126
127
template
<
typename
S>
128
FCL_EXPORT
129
Interval<S>
bound
(
const
Interval<S>
& i, S v);
130
131
template
<
typename
S>
132
FCL_EXPORT
133
Interval<S>
bound
(
const
Interval<S>
& i,
const
Interval<S>
& other);
134
135
}
// namespace fcl
136
137
#include "
fcl/math/motion/taylor_model/interval-inl.h
"
138
139
#endif
types.h
fcl::operator-
template TMatrix3< double > operator-(const Matrix3< double > &m1, const TMatrix3< double > &m2)
interval-inl.h
fcl::overlap
bool overlap(const Eigen::MatrixBase< DerivedA > &R0, const Eigen::MatrixBase< DerivedB > &T0, const kIOS< S > &b1, const kIOS< S > &b2)
Check collision between two kIOSs, b1 is in configuration (R0, T0) and b2 is in identity.
Definition:
kIOS-inl.h:249
fcl::bound
template Interval< double > bound(const Interval< double > &i, double v)
fcl::operator*
template TMatrix3< double > operator*(const Matrix3< double > &m, const TaylorModel< double > &a)
fcl::Interval
Interval class for [a, b].
Definition:
interval.h:50
fcl
Main namespace.
Definition:
broadphase_bruteforce-inl.h:45
fcl::operator+
template TMatrix3< double > operator+(const Matrix3< double > &m1, const TMatrix3< double > &m2)
fcl
Author(s):
autogenerated on Tue Dec 5 2023 03:40:48