Flow123d
jenkins-Flow123d-linux-release-multijob-282
|
Bounding box in 3d ambient space. More...
#include <bounding_box.hh>
Public Types | |
typedef Space< dimension >::Point | Point |
Currently we assume. More... | |
Public Member Functions | |
TYPEDEF_ERR_INFO (EI_split_point, double) | |
TYPEDEF_ERR_INFO (EI_interval_left, double) | |
TYPEDEF_ERR_INFO (EI_interval_right, double) | |
DECLARE_EXCEPTION (ExcSplitting,<< "Split point "<< EI_split_point::val<< "out of bounds: <"<< EI_interval_left::val<< ", "<< EI_interval_right::val<< ">\n") | |
BoundingBox () | |
BoundingBox (const Point &min) | |
BoundingBox (const Point &min, const Point &max) | |
BoundingBox (const vector< Point > &points) | |
void | set_max (unsigned int axis, double max) |
void | set_min (unsigned int axis, double min) |
const Point & | min () const |
const Point & | max () const |
double | min (unsigned int axis) const |
double | max (unsigned int axis) const |
double | size (unsigned int axis) const |
Point | center () const |
double | projection_center (unsigned int axis) const |
bool | contains_point (const Point &point) const |
bool | intersect (const BoundingBox &b2) const |
bool | projection_lt (unsigned int axis, double value) const |
bool | projection_gt (unsigned int axis, double value) const |
void | split (unsigned int axis, double splitting_point, BoundingBox &left, BoundingBox &right) const |
void | expand (const Point &point) |
unsigned char | longest_axis () const |
Static Public Attributes | |
static const unsigned int | dimension = 3 |
Currently we set dimension to 3. More... | |
Private Attributes | |
Point | min_vertex_ |
minimal coordinates of bounding box More... | |
Point | max_vertex_ |
maximal coordinates of bounding box More... | |
Static Private Attributes | |
static const double | epsilon = 64*numeric_limits<double>::epsilon() |
stabilization parameter More... | |
Bounding box in 3d ambient space.
Copyright (C) 2007 Technical University of Liberec. All rights reserved.
Please make a following refer to Flow123d on your project site if you use the program for any purpose, especially for academic research: Flow123d, Research Centre: Advanced Remedial Technologies, Technical University of Liberec, Czech Republic
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 021110-1307, USA.
Primary intention is usage in BIHTree and various speedups of non-compatible intersections.
Copy constructor and assignment are default provided by compiler. These can be used to set bounds latter on without particular method to this end:
Don;t worry about performance, all is inlined.
Definition at line 55 of file bounding_box.hh.
typedef Space<dimension>::Point BoundingBox::Point |
Currently we assume.
Definition at line 67 of file bounding_box.hh.
|
inline |
Default constructor. No initialization of vertices. Be very careful using this. One necessary usage is vector of BoundigBox.
Definition at line 74 of file bounding_box.hh.
|
inline |
Constructor for point box.
Definition at line 79 of file bounding_box.hh.
|
inline |
Return center of the bounding box.
Definition at line 159 of file bounding_box.hh.
|
inline |
Returns true is the box element contains point
point | Testing point |
Definition at line 178 of file bounding_box.hh.
BoundingBox::DECLARE_EXCEPTION | ( | ExcSplitting | ) |
|
inline |
Expand bounding box to contain also given point
.
Definition at line 246 of file bounding_box.hh.
|
inline |
Returns true if two bounding boxes have intersection.
This serves as an estimate of intersection of elements. To make it safe (do not exclude possible intersection) for 1d and 2d elements aligned with axes, we use some tolerance. Since this tolerance is fixed, there could be problem with highly refined meshes (get false positive result).
Definition at line 196 of file bounding_box.hh.
|
inline |
Return index of the axis in which the box has longest projection.
Definition at line 256 of file bounding_box.hh.
|
inline |
Return maximal vertex of the bounding box.
Definition at line 129 of file bounding_box.hh.
|
inline |
Return maximal value on given axis.
Definition at line 143 of file bounding_box.hh.
|
inline |
Return minimal vertex of the bounding box.
Definition at line 122 of file bounding_box.hh.
|
inline |
Return minimal value on given axis.
Definition at line 136 of file bounding_box.hh.
|
inline |
Return center of projection of the bounding box to given axis
. Axis coding is: 0 - axis x, 1 - axis y, 2 - axis z.
Definition at line 167 of file bounding_box.hh.
|
inline |
Returns true if projection of the box to axis
is an interval greater then (with tolerance) to given value
.
Definition at line 218 of file bounding_box.hh.
|
inline |
Returns true if projection of the box to axis
is an interval less then (with tolerance) to given value
.
Definition at line 209 of file bounding_box.hh.
|
inline |
Set maximum in given axis.
Definition at line 104 of file bounding_box.hh.
|
inline |
Set minimum on given axis.
Definition at line 113 of file bounding_box.hh.
|
inline |
Return size of the box in given axis.
Definition at line 151 of file bounding_box.hh.
|
inline |
Split box into two boxes along axis
by the plane going through splitting_point
on the axis.
Definition at line 227 of file bounding_box.hh.
BoundingBox::TYPEDEF_ERR_INFO | ( | EI_split_point | , |
double | |||
) |
BoundingBox::TYPEDEF_ERR_INFO | ( | EI_interval_left | , |
double | |||
) |
BoundingBox::TYPEDEF_ERR_INFO | ( | EI_interval_right | , |
double | |||
) |
|
static |
Currently we set dimension to 3.
Definition at line 65 of file bounding_box.hh.
|
staticprivate |
stabilization parameter
Copyright (C) 2007 Technical University of Liberec. All rights reserved.
Please make a following refer to Flow123d on your project site if you use the program for any purpose, especially for academic research: Flow123d, Research Centre: Advanced Remedial Technologies, Technical University of Liberec, Czech Republic
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 021110-1307, USA.
Definition at line 265 of file bounding_box.hh.
|
private |
maximal coordinates of bounding box
Definition at line 269 of file bounding_box.hh.
|
private |
minimal coordinates of bounding box
Definition at line 267 of file bounding_box.hh.