mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-02 18:12:43 +00:00
1st attempt of perl callback from c++ for 3DScene
This commit is contained in:
@@ -222,6 +222,16 @@ BoundingBox3Base<PointClass>::center() const
|
||||
}
|
||||
template Pointf3 BoundingBox3Base<Pointf3>::center() const;
|
||||
|
||||
//######################################################################################################################################33
|
||||
template <class PointClass> coordf_t
|
||||
BoundingBox3Base<PointClass>::max_size() const
|
||||
{
|
||||
PointClass s = size();
|
||||
return std::max(s.x, std::max(s.y, s.z));
|
||||
}
|
||||
template coordf_t BoundingBox3Base<Pointf3>::max_size() const;
|
||||
//######################################################################################################################################33
|
||||
|
||||
// Align a coordinate to a grid. The coordinate may be negative,
|
||||
// the aligned value will never be bigger than the original one.
|
||||
static inline coord_t _align_to_grid(const coord_t coord, const coord_t spacing) {
|
||||
|
||||
@@ -94,6 +94,9 @@ public:
|
||||
void translate(const Pointf3 &pos) { this->translate(pos.x, pos.y, pos.z); }
|
||||
void offset(coordf_t delta);
|
||||
PointClass center() const;
|
||||
//######################################################################################################################################33
|
||||
coordf_t max_size() const;
|
||||
//######################################################################################################################################33
|
||||
|
||||
bool contains(const PointClass &point) const {
|
||||
return BoundingBoxBase<PointClass>::contains(point) && point.z >= this->min.z && point.z <= this->max.z;
|
||||
|
||||
Reference in New Issue
Block a user