17 class AxisAlignedBoundingBox;
33 R_(
Eigen::Matrix3d::Identity()),
43 const Eigen::Matrix3d& R,
44 const Eigen::Vector3d& extent)
54 virtual Eigen::Vector3d
GetMinBound()
const override;
55 virtual Eigen::Vector3d
GetMaxBound()
const override;
56 virtual Eigen::Vector3d
GetCenter()
const override;
64 bool robust)
const override;
68 bool robust)
const override;
71 const Eigen::Matrix4d& transformation)
override;
73 bool relative =
true)
override;
75 const Eigen::Vector3d& center)
override;
77 const Eigen::Vector3d& center)
override;
106 const std::vector<Eigen::Vector3d>&
points)
const;
125 const std::vector<Eigen::Vector3d>&
points,
bool robust =
false);
138 const std::vector<Eigen::Vector3d>&
points,
bool robust =
false);
174 const Eigen::Vector3d& max_bound)
184 virtual Eigen::Vector3d
GetMinBound()
const override;
185 virtual Eigen::Vector3d
GetMaxBound()
const override;
186 virtual Eigen::Vector3d
GetCenter()
const override;
194 bool robust =
false)
const override;
199 bool robust =
false)
const override;
201 const Eigen::Matrix4d& transformation)
override;
203 const Eigen::Vector3d& translation,
bool relative =
true)
override;
215 const double scale,
const Eigen::Vector3d& center)
override;
220 const Eigen::Matrix3d& R,
const Eigen::Vector3d& center)
override;
255 const std::vector<Eigen::Vector3d>&
points)
const;
264 const std::vector<Eigen::Vector3d>&
points);
A bounding box that is aligned along the coordinate axes.
Definition: BoundingVolume.h:159
Eigen::Vector3d GetHalfExtent() const
Returns the half extent of the bounding box.
Definition: BoundingVolume.h:228
double Volume() const
Returns the volume of the bounding box.
Definition: BoundingVolume.cpp:334
AxisAlignedBoundingBox()
Default constructor.
Definition: BoundingVolume.h:164
~AxisAlignedBoundingBox() override
Definition: BoundingVolume.h:179
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:287
virtual Eigen::Vector3d GetCenter() const override
Returns the center of the geometry coordinates.
Definition: BoundingVolume.cpp:240
double GetXPercentage(double x) const
Definition: BoundingVolume.h:234
virtual OrientedBoundingBox GetMinimalOrientedBoundingBox(bool robust=false) const override
Definition: BoundingVolume.cpp:254
virtual AxisAlignedBoundingBox & Transform(const Eigen::Matrix4d &transformation) override
Apply transformation (4x4 matrix) to the geometry coordinates.
Definition: BoundingVolume.cpp:259
Eigen::Vector3d min_bound_
The lower x, y, z bounds of the bounding box.
Definition: BoundingVolume.h:268
virtual Eigen::Vector3d GetMinBound() const override
Returns min bounds for geometry coordinates.
Definition: BoundingVolume.cpp:232
bool IsEmpty() const override
Returns true iff the geometry is empty.
Definition: BoundingVolume.cpp:230
virtual AxisAlignedBoundingBox GetAxisAlignedBoundingBox() const override
Returns the object itself.
Definition: BoundingVolume.cpp:244
virtual AxisAlignedBoundingBox & Translate(const Eigen::Vector3d &translation, bool relative=true) override
Apply translation to the geometry coordinates.
Definition: BoundingVolume.cpp:267
AxisAlignedBoundingBox & operator+=(const AxisAlignedBoundingBox &other)
Definition: BoundingVolume.cpp:301
virtual OrientedBoundingBox GetOrientedBoundingBox(bool robust=false) const override
Definition: BoundingVolume.cpp:249
Eigen::Vector3d GetExtent() const
Get the extent/length of the bounding box in x, y, and z dimension.
Definition: BoundingVolume.h:225
std::string GetPrintInfo() const
Returns the 3D dimensions of the bounding box in string format.
Definition: BoundingVolume.cpp:295
AxisAlignedBoundingBox & Clear() override
Clear all elements in the geometry.
Definition: BoundingVolume.cpp:224
double GetZPercentage(double z) const
Definition: BoundingVolume.h:242
static AxisAlignedBoundingBox CreateFromPoints(const std::vector< Eigen::Vector3d > &points)
Definition: BoundingVolume.cpp:313
double GetMaxExtent() const
Definition: BoundingVolume.h:232
double GetYPercentage(double y) const
Definition: BoundingVolume.h:238
std::vector< Eigen::Vector3d > GetBoxPoints() const
Returns the eight points that define the bounding box.
Definition: BoundingVolume.cpp:336
std::vector< size_t > GetPointIndicesWithinBoundingBox(const std::vector< Eigen::Vector3d > &points) const
Definition: BoundingVolume.cpp:350
virtual AxisAlignedBoundingBox & Scale(const double scale, const Eigen::Vector3d ¢er) override
Scales the axis-aligned bounding boxes. If is the min_bound and is the max_bound of the axis aligne...
Definition: BoundingVolume.cpp:280
AxisAlignedBoundingBox(const Eigen::Vector3d &min_bound, const Eigen::Vector3d &max_bound)
Parameterized constructor.
Definition: BoundingVolume.h:173
Eigen::Vector3d color_
The color of the bounding box in RGB.
Definition: BoundingVolume.h:272
virtual Eigen::Vector3d GetMaxBound() const override
Returns max bounds for geometry coordinates.
Definition: BoundingVolume.cpp:236
Eigen::Vector3d max_bound_
The upper x, y, z bounds of the bounding box.
Definition: BoundingVolume.h:270
The base geometry class for 3D geometries.
Definition: Geometry3D.h:28
The base geometry class.
Definition: Geometry.h:18
GeometryType
Specifies possible geometry types.
Definition: Geometry.h:23
A bounding box oriented along an arbitrary frame of reference.
Definition: BoundingVolume.h:25
static OrientedBoundingBox CreateFromPointsMinimal(const std::vector< Eigen::Vector3d > &points, bool robust=false)
Definition: BoundingVolume.cpp:190
Eigen::Vector3d extent_
The extent of the bounding box in its frame of reference.
Definition: BoundingVolume.h:147
OrientedBoundingBox()
Default constructor.
Definition: BoundingVolume.h:30
OrientedBoundingBox & Clear() override
Clear all elements in the geometry.
Definition: BoundingVolume.cpp:21
Eigen::Vector3d color_
The color of the bounding box in RGB.
Definition: BoundingVolume.h:149
Eigen::Matrix3d R_
Definition: BoundingVolume.h:145
virtual Eigen::Vector3d GetMaxBound() const override
Returns max bounds for geometry coordinates.
Definition: BoundingVolume.cpp:36
~OrientedBoundingBox() override
Definition: BoundingVolume.h:49
virtual OrientedBoundingBox & Transform(const Eigen::Matrix4d &transformation) override
Apply transformation (4x4 matrix) to the geometry coordinates.
Definition: BoundingVolume.cpp:56
virtual Eigen::Vector3d GetCenter() const override
Returns the center of the geometry coordinates.
Definition: BoundingVolume.cpp:41
OrientedBoundingBox(const Eigen::Vector3d ¢er, const Eigen::Matrix3d &R, const Eigen::Vector3d &extent)
Parameterized constructor.
Definition: BoundingVolume.h:42
static OrientedBoundingBox CreateFromPoints(const std::vector< Eigen::Vector3d > &points, bool robust=false)
Definition: BoundingVolume.cpp:134
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:81
std::vector< Eigen::Vector3d > GetBoxPoints() const
Definition: BoundingVolume.cpp:92
static OrientedBoundingBox CreateFromAxisAlignedBoundingBox(const AxisAlignedBoundingBox &aabox)
Definition: BoundingVolume.cpp:125
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:74
double Volume() const
Returns the volume of the bounding box.
Definition: BoundingVolume.cpp:88
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:108
virtual OrientedBoundingBox GetOrientedBoundingBox(bool robust) const override
Returns the object itself.
Definition: BoundingVolume.cpp:47
virtual Eigen::Vector3d GetMinBound() const override
Returns min bounds for geometry coordinates.
Definition: BoundingVolume.cpp:31
virtual OrientedBoundingBox GetMinimalOrientedBoundingBox(bool robust) const override
Returns the object itself.
Definition: BoundingVolume.cpp:51
virtual OrientedBoundingBox & Translate(const Eigen::Vector3d &translation, bool relative=true) override
Apply translation to the geometry coordinates.
Definition: BoundingVolume.cpp:64
virtual AxisAlignedBoundingBox GetAxisAlignedBoundingBox() const override
Definition: BoundingVolume.cpp:43
bool IsEmpty() const override
Returns true iff the geometry is empty.
Definition: BoundingVolume.cpp:29
Eigen::Vector3d center_
The center point of the bounding box.
Definition: BoundingVolume.h:142
Definition: NonRigidOptimizer.cpp:22
Definition: PinholeCameraIntrinsic.cpp:16