Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ModelVisual3D vs Model3DGroup

Is there any disadvantage of using ModelVisual3D over Model3DGroup. How much can the resource/performance impact possibly be?

ModelVisual3D gives me much more than Model3DGroup does but AFAIK everything that can be done with Model3DGroup can alos be done with ModelVisual3D.

So why not just always use ModelVisual3D?

like image 858
bitbonk Avatar asked Feb 25 '10 10:02

bitbonk


1 Answers

The answer is Yes. Having many ModelVisual3ds will be orders of magnitude slower than using a Model3DGroup

My understanding is that ModelVisual3D is more akin to a UIElement, i.e. more of a heavy weight object. MSDN says about ModelVisual3d:

"Provides services and properties that are common to all visual objects, including hit-testing, coordinate transformation, and bounding-box calculations."

So if you wanted to 100 clickable 3d objects in your scene you would need 100 ModelVisual3d elements.

Model3DGroup (along with GeometryModel3D) on the other hand is a Model3D - the building blocks of 3d models. A single Model3D can appear as the content for several ModelVisual3Ds. Model3Ds are more lightweight than ModelVisual3D.

If you wanted to construct 3d models from building blocks (like Lego), you could define several GeometryModel3Ds, then combine them together using a Model3dGroup.

Yes, the class naming is horribly confusing, and I don't think the Daniel Lehenbauer sheds any light on the subject for the average human.

like image 140
Jack Ukleja Avatar answered Nov 16 '22 11:11

Jack Ukleja