new assertions
stair fixes
This commit is contained in:
@@ -119,6 +119,10 @@ public:
|
||||
|
||||
}
|
||||
|
||||
float align(const float val) {
|
||||
const float gridSize_cm = grid.getGridSize_cm();
|
||||
return std::round(val/gridSize_cm) * gridSize_cm;
|
||||
}
|
||||
|
||||
/** shrink the given bbox to be grid-aligned */
|
||||
BBox2 shrinkAlign(const BBox2& bb) {
|
||||
@@ -135,7 +139,7 @@ public:
|
||||
/** add a new platform-stair between the two given floors */
|
||||
void buildPlatformStair(const PlatformStair& s, const float z1_cm, const float z2_cm) {
|
||||
|
||||
const float zCenter_cm = (z2_cm + z1_cm) / 2;
|
||||
const float zCenter_cm = align((z2_cm + z1_cm) / 2);
|
||||
std::vector<int> indices;
|
||||
|
||||
// add the platform in the middle
|
||||
|
||||
Reference in New Issue
Block a user