Scaling ConvexHull

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
wmcroberts3
Posts: 2
Joined: Wed Jan 07, 2015 1:44 pm

Scaling ConvexHull

Post by wmcroberts3 »

I have seen the answers for initial scaling of MobileMesh, however I would like to scale ConvexHull and do not see a similar AffineTransform property. I can see where the AffineTransform for MobileMesh is used down in TransformableMeshData.GetTriangle, hence would it make sense to do something similar in the get of ConvexHullShape.Vertices?

Please advise when you get a chance and thank you for this cool library.

Cheers,
Bill
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Scaling ConvexHull

Post by Norbo »

The ConvexHullShape doesn't have any transform by itself. It's a simple primitive designed to do the least amount of work possible for performance reasons.

If the vertices need to be transformed, either bake the transform into the vertices given to the ConvexHullShape or wrap the ConvexHullShape in a TransformableShape. The TransformableShape adds some overhead since it's doing the transforms at runtime, so baking is preferred if possible.
Post Reply