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 {
98 bool relative =
true)
override;
100 const Eigen::Vector3d& center)
override;
102 const Eigen::Vector3d& center)
override;
157 return (m_bbMax - m_bbMin).maxCoeff();
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.
const ccBBox operator*(const ccGLMatrixd &mat)
Applies transformation to the bounding box.
const ccBBox operator*(const ccGLMatrix &mat)
Applies transformation to the bounding box.
void draw(CC_DRAW_CONTEXT &context) override
Draws entity and its children.
const ccBBox & operator*=(double scaleFactor)
virtual ccBBox & Translate(const Eigen::Vector3d &translation, bool relative=true) override
Apply translation to the geometry coordinates.
virtual ecvOrientedBBox GetOrientedBoundingBox() const override
PointCoordinateType GetMaxExtent() const
const ccBBox & operator+=(const Eigen::Vector3d &V)
virtual ccBBox & Scale(const double s, const Eigen::Vector3d ¢er) override
Apply scaling to the geometry coordinates. Given a scaling factor , and center , a given point is tr...
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)
void draw(CC_DRAW_CONTEXT &context, const ecvColor::Rgb &col)
Draws bounding box (OpenGL)
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.
const ccBBox & operator+=(const CCVector3 &V) override
ccBBox()
Default constructor.
std::string GetPrintInfo() const
Returns the 3D dimensions of the bounding box in string format.
const ccBBox & operator*=(const cloudViewer::SquareMatrix &mat) override
const ccBBox & operator-=(const Eigen::Vector3d &V)
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 & Transform(const Eigen::Matrix4d &transformation) override
Apply transformation (4x4 matrix) to the geometry coordinates.
virtual ccBBox getOwnBB(bool withGLFeatures=false) override
Returns the entity's own bounding-box.
virtual ccBBox & Rotate(const Eigen::Matrix3d &R, const Eigen::Vector3d ¢er) override
Apply rotation to the geometry coordinates and normals. Given a rotation matrix , and center ,...
const ccBBox & operator+=(const ccBBox &other)
~ccBBox() override=default
virtual Eigen::Vector3d GetMinBound() const override
Returns min bounds for geometry coordinates.
const ccBBox & operator*=(float scaleFactor) override
Scales the bounding box.
Eigen::Vector3d GetHalfExtent() const
Returns the half extent of the bounding box.
const ccBBox & operator-=(const CCVector3 &V) override
ccBBox(const Eigen::Vector3d &min_bound, const Eigen::Vector3d &max_bound, const std::string &name="ccBBox")
Parameterized constructor.
static ccBBox CreateFromPoints(const std::vector< CCVector3 > &points)
const ccBBox & operator*=(const Eigen::Matrix3d &mat)
static ccBBox CreateFromPoints(const std::vector< Eigen::Vector3d > &points)
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)
std::vector< Eigen::Vector3d > GetBoxPoints() const
Returns the eight points that define the bounding box.
virtual bool IsEmpty() const override
Float version of ccGLMatrixTpl.
Double version of ccGLMatrixTpl.
Hierarchical CLOUDVIEWER Object.
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.
Generic file read and write utility for python interface.
BoundingBoxTpl< PointCoordinateType > BoundingBox
Default bounding-box type.