What is the difference between ModelLayer and ModelNode?

classic Classic list List threaded Threaded
3 messages Options
vigos lee vigos lee
Reply | Threaded
Open this post in threaded view
|

What is the difference between ModelLayer and ModelNode?

When I want to load an obj file, I find these two loading methods.
In which case, which method should I choose´╝č
thanks!
vigos
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: What is the difference between ModelLayer and ModelNode?

Vigos,

ModelLayer just loads an static external model file as a Map layer. It's the same as simply loading a model with osgDB::readRefNodeFile, except the get the benefit of it showing up as a Layer.

ModelNode is part of the "Annotation" subsystem and, while you can certainly load a static object with it as well, it's useful for dynamic entities since it lives under a GeoTransform and a PositionAttitudeTransform. It will also support model symbology (ModelSymbol) for things like terrain clamping.

See "simple_model.earth" for an example of a ModelLayer;
See "annotation.earth" for an example of ModelNode.

Hope this helps!
Glenn Waldron / Pelican Mapping
vigos lee vigos lee
Reply | Threaded
Open this post in threaded view
|

Re: What is the difference between ModelLayer and ModelNode?

Thank you very much. It helped me a lot
vigos