app
android
jni
tango-gl
include
tango-gl
bounding_box.h
Go to the documentation of this file.
1
/*
2
* Copyright 2014 Google Inc. All Rights Reserved.
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 TANGO_GL_BOUNDING_BOX_H_
18
#define TANGO_GL_BOUNDING_BOX_H_
19
20
#include <vector>
21
22
#include "
tango-gl/segment.h
"
23
#include "
tango-gl/util.h
"
24
25
namespace
tango_gl
{
26
class
BoundingBox
{
27
public
:
28
BoundingBox
()
29
:
bounding_min_
(
glm
::vec3(0, 0, 0)),
bounding_max_
(
glm
::vec3(0, 0, 0)) {}
30
BoundingBox
(
const
std::vector<float>&
vertices
);
31
BoundingBox
(
const
glm::vec3
&
min
,
const
glm::vec3
&
max
)
32
:
bounding_min_
(
min
),
bounding_max_
(
max
) {}
33
bool
IsIntersecting
(
const
Segment
& segment,
const
glm::quat
&
rotation
,
34
const
glm::mat4
& transformation);
35
36
private
:
37
// Axis-aligned bounding box minimum and maximum point.
38
glm::vec3
bounding_min_
;
39
glm::vec3
bounding_max_
;
40
};
41
}
// namespace tango_gl
42
#endif // TANGO_GL_BOUNDING_BOX_H_
glm::min
GLM_FUNC_DECL genType min(genType const &x, genType const &y)
tango_gl::BoundingBox::IsIntersecting
bool IsIntersecting(const Segment &segment, const glm::quat &rotation, const glm::mat4 &transformation)
Definition:
bounding_box.cpp:20
tango_gl::vertices
static const float vertices[]
Definition:
quad.cpp:39
util.h
tango_gl::BoundingBox::bounding_min_
glm::vec3 bounding_min_
Definition:
bounding_box.h:38
glm::detail::tquat
Definition:
fwd.hpp:41
glm::detail::tvec3
Definition:
type_mat.hpp:37
glm::detail::tmat4x4
Definition:
type_mat.hpp:47
tango_gl::BoundingBox::BoundingBox
BoundingBox(const glm::vec3 &min, const glm::vec3 &max)
Definition:
bounding_box.h:31
tango_gl::Segment
Definition:
segment.h:23
glm::max
GLM_FUNC_DECL genType max(genType const &x, genType const &y)
glm
Definition:
_literals.hpp:31
tango_gl::BoundingBox::bounding_max_
glm::vec3 bounding_max_
Definition:
bounding_box.h:39
glm::rotation
GLM_FUNC_DECL detail::tquat< T, P > rotation(detail::tvec3< T, P > const &orig, detail::tvec3< T, P > const &dest)
tango_gl::BoundingBox
Definition:
bounding_box.h:26
tango_gl
Definition:
axis.cpp:20
tango_gl::BoundingBox::BoundingBox
BoundingBox()
Definition:
bounding_box.h:28
segment.h
rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jul 25 2024 02:50:06