Range BBox of a PartsList

Top  Previous  Next

Notice that you declare the Box2d but don't must not make it with pTrGeom->CreateBox2d(&BBoxOfLists);. In other words get_RangeBox expects a null input and he hands you back the created box.

 

 

           // Find out the size of the bounding box

           CComPtr<Box2d> BBoxOfLists; // Inits to nullptr

           MyPartsList->get_RangeBox(&BBoxOfLists);

 

           gLogger.Printf(ekLogMsg, L"Bbox = %.2f %.2f %.2f %.2f ",

                          BBoxOfLists->GetMinPoint()->GetX(),

                          BBoxOfLists->GetMinPoint()->GetY(),

                          BBoxOfLists->GetMaxPoint()->GetX(),

                          BBoxOfLists->GetMaxPoint()->GetY());

 

Text, images and diagrams © 2021 Owen F. Ransen. All rights reserved. (But copy the source code as much as you want!)