33 const std::string&
name =
"ccBBox")
41 ccBBox(
const Eigen::Vector3d& min_bound,
42 const Eigen::Vector3d& max_bound,
43 const std::string&
name =
"ccBBox")
49 const std::string&
name =
"ccBBox")
72 inline virtual bool IsEmpty()
const override {
87 virtual inline Eigen::Vector3d
GetCenter()
const override {
96 virtual ccBBox&
Transform(
const Eigen::Matrix4d& transformation)
override;
98 bool relative =
true)
override;
100 const Eigen::Vector3d& center)
override;
102 const Eigen::Vector3d& center)
override;
130 std::string GetPrintInfo()
const;
142 static ccBBox CreateFromPoints(
const std::vector<CCVector3>&
points);
144 static ccBBox CreateFromPoints(
const std::vector<Eigen::Vector3d>&
points);
157 return (m_bbMax - m_bbMin).maxCoeff();
161 std::vector<Eigen::Vector3d> GetBoxPoints()
const;
Vector3Tpl< float > operator*(float s, const Vector3Tpl< float > &v)
Multiplication of a 3D vector by a scalar (front) operator (float version)
float PointCoordinateType
Type of the coordinates of a (N-D) point.
int64_t CV_CLASS_ENUM
Type of object type flags (64 bits)
static Vector3Tpl fromArray(const int a[3])
Constructor from an int array.
PointCoordinateType GetMaxExtent() const
ccBBox(const cloudViewer::BoundingBox &bbox, const std::string &name="ccBBox")
Constructor from two vectors (lower min. and upper max. corners)
virtual Eigen::Vector3d GetMaxBound() const override
Returns max bounds for geometry coordinates.
void SetMinBounds(const Eigen::Vector3d &minBound)
ccBBox(const CCVector3 &bbMinCorner, const CCVector3 &bbMaxCorner, const std::string &name="ccBBox")
Constructor from two vectors (lower min. and upper max. corners)
Eigen::Vector3d GetExtent() const
Get the extent/length of the bounding box in x, y, and z dimension.
ccBBox()
Default constructor.
virtual ccBBox GetAxisAlignedBoundingBox() const override
Returns an axis-aligned bounding box of the geometry.
CV_CLASS_ENUM getClassID() const override
Returns unique class ID.
virtual ccBBox getOwnBB(bool withGLFeatures=false) override
Returns the entity's own bounding-box.
~ccBBox() override=default
virtual Eigen::Vector3d GetMinBound() const override
Returns min bounds for geometry coordinates.
Eigen::Vector3d GetHalfExtent() const
Returns the half extent of the bounding box.
ccBBox(const Eigen::Vector3d &min_bound, const Eigen::Vector3d &max_bound, const std::string &name="ccBBox")
Parameterized constructor.
virtual Eigen::Vector3d GetCenter() const override
Returns the center of the geometry coordinates.
bool isSerializable() const override
Returns whether object is serializable of not.
void SetMaxBounds(const Eigen::Vector3d &maxBound)
virtual bool IsEmpty() const override
Float version of ccGLMatrixTpl.
Double version of ccGLMatrixTpl.
Hierarchical CLOUDVIEWER Object.
virtual ecvOrientedBBox GetOrientedBoundingBox() const
virtual ccHObject & Scale(const double s, const Eigen::Vector3d ¢er)
Apply scaling to the geometry coordinates. Given a scaling factor , and center , a given point is tr...
void draw(CC_DRAW_CONTEXT &context) override
Draws entity and its children.
virtual ccHObject & Translate(const Eigen::Vector3d &translation, bool relative=true)
Apply translation to the geometry coordinates.
virtual ccHObject & Rotate(const Eigen::Matrix3d &R, const Eigen::Vector3d ¢er)
Apply rotation to the geometry coordinates and normals. Given a rotation matrix , and center ,...
virtual ccHObject & Transform(const Eigen::Matrix4d &transformation)
Apply transformation (4x4 matrix) to the geometry coordinates.
Vector3Tpl< PointCoordinateType > getDiagVec() const
Returns diagonal vector.
Vector3Tpl< PointCoordinateType > getCenter() const
Returns center.
PointCoordinateType getMaxBoxDim() const
Returns maximal box dimension.
bool isValid() const
Returns whether bounding box is valid or not.
void operator*=(MiniVec< T, N > &a, const MiniVec< T, N > &b)
void operator+=(MiniVec< T, N > &a, const MiniVec< T, N > &b)
void operator-=(MiniVec< T, N > &a, const MiniVec< T, N > &b)
Generic file read and write utility for python interface.
BoundingBoxTpl< PointCoordinateType > BoundingBox
Default bounding-box type.