tags:

views:

740

answers:

2

How can i get the new bounds after applying a translation transform to a WPF mesh geometry 3D?

A: 

What I found:

Rect3D newRec3D = modelVisual3D.Transform.TransformBounds(modelVisual3D.Geometry.Bounds);

If you have better way, please post it.

A: 

As you're just applying a translation you can just apply that translation to the bounds of the geometry, so your solution is correct. It's a rigid transform so each part of the mesh will keep its relative positions to all other parts of the mesh.

In fact this is true of rotation, scale and even skew transformations too. You only have to recalculate the bounds if you deform the mesh.

ChrisF