L4A/Box.cpp
2024-11-06 16:49:45 -07:00

25 lines
414 B
C++

#include "Box.h"
Box::Box() {
// initialize to unit cube by default
_size = 1.0;
}
Box::Box(const double SIZE) {
// if desired size is positive, assign
if (SIZE > 0) {
_size = SIZE;
}
// otherwise default to one
else {
_size = 1.0;
}
}
double Box::getBoxSize() { return _size; }
void Box::setBoxSize(const double SIZE) {
// if desired size is positive, assign
if (SIZE > 0) {
_size = SIZE;
}
}