Fix an off-by-one error that missed the last point when generating screen bounding boxes
This commit is contained in:
parent
0e5a246a70
commit
679e2b9202
@ -70,7 +70,7 @@ BBox Entity::GetOrGenerateScreenBBox(bool *hasBBox) {
|
|||||||
Vector first = SS.GW.ProjectPoint3(sbl->l[0].ctrl[0]);
|
Vector first = SS.GW.ProjectPoint3(sbl->l[0].ctrl[0]);
|
||||||
screenBBox = BBox::From(first, first);
|
screenBBox = BBox::From(first, first);
|
||||||
for(auto &sb : sbl->l) {
|
for(auto &sb : sbl->l) {
|
||||||
for(int i = 0; i < sb.deg; ++i) { screenBBox.Include(SS.GW.ProjectPoint3(sb.ctrl[i])); }
|
for(int i = 0; i <= sb.deg; ++i) { screenBBox.Include(SS.GW.ProjectPoint3(sb.ctrl[i])); }
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
ssassert(false, "Expected entity to be a point or have beziers");
|
ssassert(false, "Expected entity to be a point or have beziers");
|
||||||
|
Loading…
Reference in New Issue
Block a user