[CONNECT C++] View Decoration vs. Element Decorator

Class IViewManager provides methods Add/Drop ViewDecoration and ElementDecorator.

Both types of decorator must inherit from IViewDecoration, which has a single method to be overridden: _DrawDecoration (IndexedViewportR);

What is the difference between a view decoration and an element decorator?  If we want to create an element decorator, what should we do in method _DrawDecoration (since it gives us a Viewport but not an element)?

Parents
  • The ElementDecorator inherits the render mode, lighting, and other view flags just as persistent elements do. If the view is 3d, you can draw 3d geometry in your decorator that will intermix with the persistent geometry according to z value. This type of decoration doesn't get used much internally as "dynamics" or IViewTransients are often more appropriate.

    The ViewDecoration is called after switching into "overlay" mode. Overlay mode is effectively smooth shading with default lighting. Here z wrting/testing is disabled, so it's suitable for drawing 2d geometry that you want to appear on top of the persistent geometry.

    HTH

    -B



    Answer Verified By: Jon Summers 

Reply
  • The ElementDecorator inherits the render mode, lighting, and other view flags just as persistent elements do. If the view is 3d, you can draw 3d geometry in your decorator that will intermix with the persistent geometry according to z value. This type of decoration doesn't get used much internally as "dynamics" or IViewTransients are often more appropriate.

    The ViewDecoration is called after switching into "overlay" mode. Overlay mode is effectively smooth shading with default lighting. Here z wrting/testing is disabled, so it's suitable for drawing 2d geometry that you want to appear on top of the persistent geometry.

    HTH

    -B



    Answer Verified By: Jon Summers 

Children
No Data