36 class AxisAlignedBoundingBox;
52 R_(
Eigen::Matrix3d::Identity()),
62 const Eigen::Matrix3d& R,
63 const Eigen::Vector3d& extent)
73 virtual Eigen::Vector3d
GetMinBound()
const override;
74 virtual Eigen::Vector3d
GetMaxBound()
const override;
75 virtual Eigen::Vector3d
GetCenter()
const override;
79 const Eigen::Matrix4d& transformation)
override;
81 bool relative =
true)
override;
83 const Eigen::Vector3d& center)
override;
85 const Eigen::Vector3d& center)
override;
114 const std::vector<Eigen::Vector3d>&
points)
const;
129 const std::vector<Eigen::Vector3d>&
points);
165 const Eigen::Vector3d& max_bound)
175 virtual Eigen::Vector3d
GetMinBound()
const override;
176 virtual Eigen::Vector3d
GetMaxBound()
const override;
177 virtual Eigen::Vector3d
GetCenter()
const override;
181 const Eigen::Matrix4d& transformation)
override;
183 const Eigen::Vector3d& translation,
bool relative =
true)
override;
195 const double scale,
const Eigen::Vector3d& center)
override;
200 const Eigen::Matrix3d& R,
const Eigen::Vector3d& center)
override;
235 const std::vector<Eigen::Vector3d>&
points)
const;
244 const std::vector<Eigen::Vector3d>&
points);
A bounding box that is aligned along the coordinate axes.
Definition: BoundingVolume.h:150
Eigen::Vector3d GetHalfExtent() const
Returns the half extent of the bounding box.
Definition: BoundingVolume.h:208
double Volume() const
Returns the volume of the bounding box.
Definition: BoundingVolume.cpp:300
AxisAlignedBoundingBox()
Default constructor.
Definition: BoundingVolume.h:155
~AxisAlignedBoundingBox() override
Definition: BoundingVolume.h:170
virtual AxisAlignedBoundingBox & Rotate(const Eigen::Matrix3d &R, const Eigen::Vector3d ¢er) override
an AxisAlignedBoundingBox can not be rotated. This method will throw an error.
Definition: BoundingVolume.cpp:253
virtual Eigen::Vector3d GetCenter() const override
Returns the center of the geometry coordinates.
Definition: BoundingVolume.cpp:212
double GetXPercentage(double x) const
Definition: BoundingVolume.h:214
virtual AxisAlignedBoundingBox & Transform(const Eigen::Matrix4d &transformation) override
Apply transformation (4x4 matrix) to the geometry coordinates.
Definition: BoundingVolume.cpp:225
Eigen::Vector3d min_bound_
The lower x, y, z bounds of the bounding box.
Definition: BoundingVolume.h:248
virtual Eigen::Vector3d GetMinBound() const override
Returns min bounds for geometry coordinates.
Definition: BoundingVolume.cpp:204
bool IsEmpty() const override
Returns true iff the geometry is empty.
Definition: BoundingVolume.cpp:202
virtual AxisAlignedBoundingBox GetAxisAlignedBoundingBox() const override
Returns an axis-aligned bounding box of the geometry.
Definition: BoundingVolume.cpp:216
virtual AxisAlignedBoundingBox & Translate(const Eigen::Vector3d &translation, bool relative=true) override
Apply translation to the geometry coordinates.
Definition: BoundingVolume.cpp:233
AxisAlignedBoundingBox & operator+=(const AxisAlignedBoundingBox &other)
Definition: BoundingVolume.cpp:267
Eigen::Vector3d GetExtent() const
Get the extent/length of the bounding box in x, y, and z dimension.
Definition: BoundingVolume.h:205
std::string GetPrintInfo() const
Returns the 3D dimensions of the bounding box in string format.
Definition: BoundingVolume.cpp:261
AxisAlignedBoundingBox & Clear() override
Clear all elements in the geometry.
Definition: BoundingVolume.cpp:196
double GetZPercentage(double z) const
Definition: BoundingVolume.h:222
static AxisAlignedBoundingBox CreateFromPoints(const std::vector< Eigen::Vector3d > &points)
Definition: BoundingVolume.cpp:279
double GetMaxExtent() const
Definition: BoundingVolume.h:212
double GetYPercentage(double y) const
Definition: BoundingVolume.h:218
virtual OrientedBoundingBox GetOrientedBoundingBox() const override
Returns an oriented bounding box of the geometry.
Definition: BoundingVolume.cpp:221
std::vector< Eigen::Vector3d > GetBoxPoints() const
Returns the eight points that define the bounding box.
Definition: BoundingVolume.cpp:302
std::vector< size_t > GetPointIndicesWithinBoundingBox(const std::vector< Eigen::Vector3d > &points) const
Definition: BoundingVolume.cpp:316
virtual AxisAlignedBoundingBox & Scale(const double scale, const Eigen::Vector3d ¢er) override
Scales the axis-aligned bounding boxs. If is the min_bound and is the max_bound of the axis aligned...
Definition: BoundingVolume.cpp:246
AxisAlignedBoundingBox(const Eigen::Vector3d &min_bound, const Eigen::Vector3d &max_bound)
Parameterized constructor.
Definition: BoundingVolume.h:164
Eigen::Vector3d color_
The color of the bounding box in RGB.
Definition: BoundingVolume.h:252
virtual Eigen::Vector3d GetMaxBound() const override
Returns max bounds for geometry coordinates.
Definition: BoundingVolume.cpp:208
Eigen::Vector3d max_bound_
The upper x, y, z bounds of the bounding box.
Definition: BoundingVolume.h:250
The base geometry class for 3D geometries.
Definition: Geometry3D.h:47
The base geometry class.
Definition: Geometry.h:37
GeometryType
Specifies possible geometry types.
Definition: Geometry.h:42
A bounding box oriented along an arbitrary frame of reference.
Definition: BoundingVolume.h:44
Eigen::Vector3d extent_
The extent of the bounding box in its frame of reference.
Definition: BoundingVolume.h:138
OrientedBoundingBox()
Default constructor.
Definition: BoundingVolume.h:49
OrientedBoundingBox & Clear() override
Clear all elements in the geometry.
Definition: BoundingVolume.cpp:40
Eigen::Vector3d color_
The color of the bounding box in RGB.
Definition: BoundingVolume.h:140
Eigen::Matrix3d R_
Definition: BoundingVolume.h:136
virtual Eigen::Vector3d GetMaxBound() const override
Returns max bounds for geometry coordinates.
Definition: BoundingVolume.cpp:55
~OrientedBoundingBox() override
Definition: BoundingVolume.h:68
virtual OrientedBoundingBox & Transform(const Eigen::Matrix4d &transformation) override
Apply transformation (4x4 matrix) to the geometry coordinates.
Definition: BoundingVolume.cpp:70
virtual Eigen::Vector3d GetCenter() const override
Returns the center of the geometry coordinates.
Definition: BoundingVolume.cpp:60
OrientedBoundingBox(const Eigen::Vector3d ¢er, const Eigen::Matrix3d &R, const Eigen::Vector3d &extent)
Parameterized constructor.
Definition: BoundingVolume.h:61
virtual OrientedBoundingBox & Rotate(const Eigen::Matrix3d &R, const Eigen::Vector3d ¢er) override
Apply rotation to the geometry coordinates and normals. Given a rotation matrix , and center ,...
Definition: BoundingVolume.cpp:95
std::vector< Eigen::Vector3d > GetBoxPoints() const
Definition: BoundingVolume.cpp:106
static OrientedBoundingBox CreateFromAxisAlignedBoundingBox(const AxisAlignedBoundingBox &aabox)
Definition: BoundingVolume.cpp:139
virtual OrientedBoundingBox & Scale(const double scale, const Eigen::Vector3d ¢er) override
Apply scaling to the geometry coordinates. Given a scaling factor , and center , a given point is tr...
Definition: BoundingVolume.cpp:88
double Volume() const
Returns the volume of the bounding box.
Definition: BoundingVolume.cpp:102
static OrientedBoundingBox CreateFromPoints(const std::vector< Eigen::Vector3d > &points)
Definition: BoundingVolume.cpp:148
virtual OrientedBoundingBox GetOrientedBoundingBox() const override
Returns an oriented bounding box of the geometry.
Definition: BoundingVolume.cpp:66
std::vector< size_t > GetPointIndicesWithinBoundingBox(const std::vector< Eigen::Vector3d > &points) const
Return indices to points that are within the bounding box.
Definition: BoundingVolume.cpp:122
virtual Eigen::Vector3d GetMinBound() const override
Returns min bounds for geometry coordinates.
Definition: BoundingVolume.cpp:50
virtual OrientedBoundingBox & Translate(const Eigen::Vector3d &translation, bool relative=true) override
Apply translation to the geometry coordinates.
Definition: BoundingVolume.cpp:78
virtual AxisAlignedBoundingBox GetAxisAlignedBoundingBox() const override
Returns an axis-aligned bounding box of the geometry.
Definition: BoundingVolume.cpp:62
bool IsEmpty() const override
Returns true iff the geometry is empty.
Definition: BoundingVolume.cpp:48
Eigen::Vector3d center_
The center point of the bounding box.
Definition: BoundingVolume.h:133
Definition: NonRigidOptimizer.cpp:41
Definition: PinholeCameraIntrinsic.cpp:35