Skip to content

Commit 6a09385

Browse files
committed
single construct parameter
1 parent 4c9c280 commit 6a09385

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/shared/common/geometric_primitive.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,12 @@ class BoundingBox
4444
BoundingBox() : lower_(VecType::Zero()), upper_(VecType::Zero()) {};
4545
BoundingBox(const VecType &lower, const VecType &upper)
4646
: lower_(lower), upper_(upper) {};
47-
BoundingBox(const VecType &center, const VecType &hlf_size)
48-
: lower_(center - hlf_size), upper_(center + hlf_size) {};
47+
BoundingBox(VecType &hlfsize) : lower_(-hlfsize), upper_(hlfsize) {};
48+
49+
BoundingBox translate(const VecType &translate) const
50+
{
51+
return BoundingBox(translate + lower_, translate + upper_);
52+
};
4953

5054
bool checkContain(const VecType &point) const
5155
{

0 commit comments

Comments
 (0)