L4A/Box.cpp

26 lines
414 B
C++
Raw Normal View History

2024-11-06 16:49:37 -07:00
#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;
}
}